From: John Spray Date: Mon, 6 Feb 2006 21:54:10 +0000 (+0000) Subject: Little more work on GTK document dialog X-Git-Tag: 1.6.10~13631 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=98dd757bbc707cdc30d46c8af7936408692821ca;p=features.git Little more work on GTK document dialog git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10816 a592a061-630c-0410-9148-cb99ea01b6c8 --- diff --git a/src/frontends/gtk/ChangeLog b/src/frontends/gtk/ChangeLog index 70d0304ddd..86a9fcdf9f 100644 --- a/src/frontends/gtk/ChangeLog +++ b/src/frontends/gtk/ChangeLog @@ -1,6 +1,7 @@ 2006-02-06 John Spray * 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 diff --git a/src/frontends/gtk/GDocument.C b/src/frontends/gtk/GDocument.C index a83c670a61..3912c147f3 100644 --- a/src/frontends/gtk/GDocument.C +++ b/src/frontends/gtk/GDocument.C @@ -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()) diff --git a/src/frontends/gtk/GDocument.h b/src/frontends/gtk/GDocument.h index 1b40ce04d8..e3c34cbc91 100644 --- a/src/frontends/gtk/GDocument.h +++ b/src/frontends/gtk/GDocument.h @@ -148,6 +148,7 @@ private: Glib::RefPtr branchliststore_; Glib::RefPtr branchsel_; void addBranch(); + void removeBranch(); void branchSelChanged(); // *** End "Branches" Page *** diff --git a/src/frontends/gtk/glade/document.glade b/src/frontends/gtk/glade/document.glade index 82b86b7d4e..5d274314d6 100644 --- a/src/frontends/gtk/glade/document.glade +++ b/src/frontends/gtk/glade/document.glade @@ -16,7 +16,6 @@ GDK_WINDOW_TYPE_HINT_DIALOG GDK_GRAVITY_NORTH_WEST True - False False @@ -2748,7 +2747,7 @@ True True - Document default + Default True GTK_RELIEF_NORMAL True @@ -3302,33 +3301,71 @@ - + 12 True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT + False + 6 + + + + True + <i>Text entered here will be interpreted as LaTeX markup before the main text. Please see the <i>Extended Features</i> manual for more information.</i> + False + True + GTK_JUSTIFY_FILL + True + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 + + + 0 + False + False + + - + True True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - True - 3 - 0 - 0 - 6 - 0 - 0 - You should not see this. + GTK_POLICY_AUTOMATIC + GTK_POLICY_AUTOMATIC + GTK_SHADOW_IN + GTK_CORNER_TOP_LEFT + + + + True + True + True + False + True + GTK_JUSTIFY_LEFT + GTK_WRAP_NONE + True + 3 + 0 + 0 + 6 + 0 + 0 + You should not see this. + + + + 0 + True + True +