summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2005-04-01 03:23:45 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2005-04-01 03:23:45 +0000
commitda22c8c6d548c40d1dc3640a2d8c8f55928c07b2 (patch)
tree0b6426b6a77ced7c85bdb1450a59768c25badfe6
parent5591121540e7da9dcf044caf8b0770eb240aacef (diff)
downloadglade-da22c8c6d548c40d1dc3640a2d8c8f55928c07b2.tar.gz
Added MAINTAINERS file.
* Added MAINTAINERS file. * AUTHORS: Added me to authors list * src/glade-popup.c: Fixed selection bug (placeholders werent loosing selection when selection changes through the popup). * src/glade-project-window.c: Added "Expand all"/"Collapse all" in the widget tree veiw (bug 164740) * src/glade-widget.c: Remove redundant paranoia code.
-rw-r--r--AUTHORS1
-rw-r--r--ChangeLog15
-rw-r--r--MAINTAINERS4
-rw-r--r--src/glade-popup.c1
-rw-r--r--src/glade-project-window.c34
-rw-r--r--src/glade-widget.c11
6 files changed, 56 insertions, 10 deletions
diff --git a/AUTHORS b/AUTHORS
index 2be40d7d..4403dde1 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -4,3 +4,4 @@ Thanks to :
Michal Palczewski <mpalczew@u.washington.edu> - Widget tree window
Archit Baweja <bighead@users.sourceforge.net> - New widgets, _get_type
Shane Butler <shane_b@operamail.com> - Glade Widget signals editor
+Tristan Van Berkom <tvb@gnome.org> - Non widget support.
diff --git a/ChangeLog b/ChangeLog
index ffec498f..43faf0bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+2005-03-31 Tristan Van Berkom <tvb@gnome.org>
+
+ * Added MAINTAINERS file.
+
+ * AUTHORS: Added me to authors list
+
+ * src/glade-popup.c: Fixed selection bug (placeholders
+ werent loosing selection when selection changes through
+ the popup).
+
+ * src/glade-project-window.c: Added "Expand all"/"Collapse all" in
+ the widget tree veiw (bug 164740)
+
+ * src/glade-widget.c: Remove redundant paranoia code.
+
2005-03-14 Naba Kumar <naba@gnome.org>
* pixmaps/Makefile.am,
diff --git a/MAINTAINERS b/MAINTAINERS
new file mode 100644
index 00000000..5a33e2c4
--- /dev/null
+++ b/MAINTAINERS
@@ -0,0 +1,4 @@
+
+Tristan Van Berkom is the current glade-3 maintainer.
+
+Email: tristan.van.berkom@gmail.com
diff --git a/src/glade-popup.c b/src/glade-popup.c
index 626efe46..8d5b8bb8 100644
--- a/src/glade-popup.c
+++ b/src/glade-popup.c
@@ -33,6 +33,7 @@
static void
glade_popup_select_cb (GtkMenuItem *item, GladeWidget *widget)
{
+ glade_util_clear_selection ();
glade_project_selection_set
(widget->project, glade_widget_get_object (widget), TRUE);
}
diff --git a/src/glade-project-window.c b/src/glade-project-window.c
index 95ff2ad1..ad06f5e4 100644
--- a/src/glade-project-window.c
+++ b/src/glade-project-window.c
@@ -604,10 +604,19 @@ gpw_hide_widget_tree_on_delete (GtkWidget *widget_tree, gpointer not_used,
return TRUE;
}
+static void
+gpw_expand_treeview (GtkButton *button, GtkTreeView *tree)
+{
+ gtk_tree_view_expand_all (tree);
+ gtk_widget_queue_draw (GTK_WIDGET (tree));
+}
+
+
+
static GtkWidget*
gpw_create_widget_tree (GladeProjectWindow *gpw)
{
- GtkWidget *widget_tree;
+ GtkWidget *widget_tree, *hbox, *vbox, *expand, *collapse;
GladeProjectView *view;
GtkWidget *widget_tree_item;
@@ -615,6 +624,7 @@ gpw_create_widget_tree (GladeProjectWindow *gpw)
gtk_window_set_default_size (GTK_WINDOW (widget_tree),
GLADE_WIDGET_TREE_WIDTH,
GLADE_WIDGET_TREE_HEIGHT);
+
gtk_window_set_title (GTK_WINDOW (widget_tree), _("Widget Tree"));
view = glade_project_view_new (GLADE_PROJECT_VIEW_TREE);
@@ -623,11 +633,31 @@ gpw_create_widget_tree (GladeProjectWindow *gpw)
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (view),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (widget_tree), GTK_WIDGET (view));
+
+ /* Add control buttons to the treeview. */
+ hbox = gtk_hbox_new (TRUE, 0);
+ vbox = gtk_vbox_new (FALSE, 0);
+ expand = gtk_button_new_with_label (_("Expand all"));
+ collapse = gtk_button_new_with_label (_("Collapse all"));
+ gtk_box_pack_start (GTK_BOX (hbox), expand, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (hbox), collapse, FALSE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (view), TRUE, TRUE, 0);
+
+ gtk_container_add (GTK_CONTAINER (widget_tree), vbox);
g_signal_connect (G_OBJECT (widget_tree), "delete_event",
G_CALLBACK (gpw_hide_widget_tree_on_delete), gpw->priv->item_factory);
+ g_signal_connect (G_OBJECT (expand), "clicked",
+ G_CALLBACK (gpw_expand_treeview),
+ view->tree_view);
+
+ g_signal_connect_swapped (G_OBJECT (collapse), "clicked",
+ G_CALLBACK (gtk_tree_view_collapse_all),
+ view->tree_view);
+
+
widget_tree_item = gtk_item_factory_get_item (gpw->priv->item_factory,
"<main>/View/Widget Tree");
gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (widget_tree_item), TRUE);
diff --git a/src/glade-widget.c b/src/glade-widget.c
index 1efaf251..52417567 100644
--- a/src/glade-widget.c
+++ b/src/glade-widget.c
@@ -1267,15 +1267,10 @@ glade_widget_button_press (GtkWidget *widget,
}
else
{
- if (glade_project_is_selected
- (glade_widget->project, glade_widget->object) == FALSE ||
- g_list_length (glade_widget->project->selection) != 1)
- {
- glade_util_clear_selection ();
- glade_project_selection_set (glade_widget->project,
+ glade_util_clear_selection ();
+ glade_project_selection_set (glade_widget->project,
glade_widget->object, TRUE);
- handled = TRUE;
- }
+ handled = TRUE;
}
}
else if (event->button == 3)