Little more work on GTK document dialog

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10816 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
John Spray 2006-02-06 21:54:10 +00:00
parent ca90f64323
commit 98dd757bbc
4 changed files with 73 additions and 22 deletions

View File

@ -1,6 +1,7 @@
2006-02-06 John Spray <spray@lyx.org>
* GGraphics.[Ch], glade/graphics.glade: Use GtkLengthEntry, touch up glade
* GDocument.[Ch], glade/document.glade: Only Bullet options left to do
2006-02-05 John Spray <spray@lyx.org>

View File

@ -292,6 +292,8 @@ void GDocument::doBuild()
addbranchbutton_->signal_clicked().connect(
sigc::mem_fun(*this, &GDocument::addBranch));
xml_->get_widget("RemoveBranch", removebranchbutton_);
removebranchbutton_->signal_clicked().connect(
sigc::mem_fun(*this, &GDocument::removeBranch));
branchCols_.add(branchColName_);
branchCols_.add(branchColActivated_);
branchCols_.add(branchColColor_);
@ -879,6 +881,16 @@ void GDocument::addBranch()
}
void GDocument::removeBranch()
{
Gtk::TreeModel::iterator const selected = branchsel_->get_selected();
if (!branchliststore_->iter_is_valid(selected))
return;
branchliststore_->erase (selected);
}
void GDocument::branchSelChanged()
{
if (branchsel_->get_selected() == branchliststore_->children().end())

View File

@ -148,6 +148,7 @@ private:
Glib::RefPtr<Gtk::ListStore> branchliststore_;
Glib::RefPtr<Gtk::TreeSelection> branchsel_;
void addBranch();
void removeBranch();
void branchSelChanged();
// *** End "Branches" Page ***

View File

@ -16,7 +16,6 @@
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
<property name="focus_on_map">True</property>
<property name="urgency_hint">False</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
@ -2748,7 +2747,7 @@
<widget class="GtkRadioButton" id="DocumentDefault">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="label" translatable="yes">Document default</property>
<property name="label" translatable="yes">Default</property>
<property name="use_underline">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="focus_on_click">True</property>
@ -3302,8 +3301,39 @@
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow2">
<widget class="GtkVBox" id="vbox30">
<property name="border_width">12</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">6</property>
<child>
<widget class="GtkLabel" id="label75">
<property name="visible">True</property>
<property name="label" translatable="yes">&lt;i&gt;Text entered here will be interpreted as LaTeX markup before the main text. Please see the &lt;i&gt;Extended Features&lt;/i&gt; manual for more information.&lt;/i&gt;</property>
<property name="use_underline">False</property>
<property name="use_markup">True</property>
<property name="justify">GTK_JUSTIFY_FILL</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
<property name="xalign">0</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="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkScrolledWindow" id="scrolledwindow2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
@ -3331,6 +3361,13 @@
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
<property name="tab_fill">True</property>