mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 11:16:55 +00:00
preamble editing in GTK document dialog
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10789 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d07928baf5
commit
555db1ce35
@ -2,6 +2,9 @@
|
||||
|
||||
* GtkLengthEntry.[Ch]: implement signal_changed, setup spin limits
|
||||
* GWrap.[Ch], glade/wrap.glade: Add Wrap dialog
|
||||
* GDocument.[Ch], Dialogs.C: Implemented preamble editing in
|
||||
document dialog. "dialog-show preamble" will now violate
|
||||
an assertion in Dialogs.C.
|
||||
|
||||
2006-01-27 Bernhard Reiter <ockham@gmx.net>
|
||||
|
||||
|
@ -40,7 +40,6 @@
|
||||
#include "ControlMath.h"
|
||||
#include "ControlNote.h"
|
||||
#include "ControlParagraph.h"
|
||||
#include "ControlPreamble.h"
|
||||
#include "ControlPrefs.h"
|
||||
#include "ControlPrint.h"
|
||||
#include "ControlRef.h"
|
||||
@ -80,7 +79,6 @@
|
||||
//#include "FormMathsStyle.h"
|
||||
#include "GNote.h"
|
||||
#include "GParagraph.h"
|
||||
//#include "FormPreamble.h"
|
||||
//#include "FormPreferences.h"
|
||||
#include "GPrint.h"
|
||||
#include "GRef.h"
|
||||
@ -143,7 +141,7 @@ char const * const dialognames[] = {
|
||||
"mathgreek", "mathmisc", "mathdots", "mathbigoperators", "mathamsmisc",
|
||||
"mathamsarrows", "mathamsrelations", "mathamsnegatedrelations",
|
||||
"mathamsoperators", "mathdelimiter", "mathmatrix", "mathspace", "mathstyle",
|
||||
"note", "paragraph", "preamble", "prefs", "print", "ref", "sendto",
|
||||
"note", "paragraph", "prefs", "print", "ref", "sendto",
|
||||
"spellchecker", "tabular", "tabularcreate", "texinfo",
|
||||
|
||||
#ifdef HAVE_LIBAIKSAURUS
|
||||
@ -492,11 +490,6 @@ Dialogs::DialogPtr Dialogs::build(string const & name)
|
||||
dialog->setController(new ControlParagraph(*dialog));
|
||||
dialog->setView(new GParagraph(*dialog));
|
||||
dialog->bc().bp(new OkApplyCancelReadOnlyPolicy);
|
||||
} else if (name == "preamble") {
|
||||
// dialog->bc().view(new xformsBC(dialog->bc()));
|
||||
dialog->setController(new ControlPreamble(*dialog));
|
||||
// dialog->setView(new FormPreamble(*dialog));
|
||||
dialog->bc().bp(new OkApplyCancelPolicy);
|
||||
} else if (name == "prefs") {
|
||||
// dialog->bc().view(new xformsBC(dialog->bc()));
|
||||
dialog->setController(new ControlPrefs(*dialog));
|
||||
|
@ -362,6 +362,12 @@ void GDocument::doBuild()
|
||||
(*row)[branchColName_] = "Hunch";
|
||||
(*row)[branchColActivated_] = true;
|
||||
// *** End "Branches" Page ***
|
||||
|
||||
// *** Begin "Preamble" Page ***
|
||||
Gtk::TextView *view;
|
||||
xml_->get_widget ("Preamble", view);
|
||||
preamblebuffer_ = view->get_buffer();
|
||||
// *** End "Preamble" Page ***
|
||||
}
|
||||
|
||||
|
||||
@ -587,6 +593,10 @@ void GDocument::update()
|
||||
}
|
||||
// *** End "Branches" Page ***
|
||||
|
||||
// *** Begin "Preamble" Page ***
|
||||
preamblebuffer_->set_text(params.preamble);
|
||||
// *** End "Preamble" Page ***
|
||||
|
||||
// Be a cheesy bastard, for the moment
|
||||
bc().valid();
|
||||
}
|
||||
@ -797,6 +807,10 @@ void GDocument::apply()
|
||||
params.branchlist() = branchlist;
|
||||
|
||||
// *** End "Branches" Page ***
|
||||
|
||||
// *** Begin "Preamble" Page ***
|
||||
params.preamble = preamblebuffer_->get_text();
|
||||
// *** End "Preamble" Page ***
|
||||
}
|
||||
|
||||
|
||||
|
@ -159,6 +159,10 @@ private:
|
||||
void addBranch();
|
||||
void branchSelChanged();
|
||||
// *** End "Branches" Page ***
|
||||
|
||||
// *** Begin "Preamble" Page ***
|
||||
Glib::RefPtr<Gtk::TextBuffer> preamblebuffer_;
|
||||
// *** End "Preamble" Page ***
|
||||
};
|
||||
|
||||
} // namespace frontend
|
||||
|
@ -3502,6 +3502,65 @@
|
||||
<property name="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="scrolledwindow2">
|
||||
<property name="border_width">12</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
|
||||
<property name="shadow_type">GTK_SHADOW_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTextView" id="Preamble">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="editable">True</property>
|
||||
<property name="overwrite">False</property>
|
||||
<property name="accepts_tab">True</property>
|
||||
<property name="justification">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap_mode">GTK_WRAP_NONE</property>
|
||||
<property name="cursor_visible">True</property>
|
||||
<property name="pixels_above_lines">3</property>
|
||||
<property name="pixels_below_lines">0</property>
|
||||
<property name="pixels_inside_wrap">0</property>
|
||||
<property name="left_margin">6</property>
|
||||
<property name="right_margin">0</property>
|
||||
<property name="indent">0</property>
|
||||
<property name="text" translatable="yes">You should not see this.</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label74">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">P_reamble</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
|
Loading…
Reference in New Issue
Block a user