summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTristan Van Berkom <tvb@src.gnome.org>2008-09-18 19:05:01 +0000
committerTristan Van Berkom <tvb@src.gnome.org>2008-09-18 19:05:01 +0000
commit745b2193310038721353436a031fd847b25c2734 (patch)
treef909ccebafd26f33339e924441b2cc8cd4a5b737 /src
parent5a3e0443c2bf3e4d7e743e48069f780a83ccf18b (diff)
downloadglade-745b2193310038721353436a031fd847b25c2734.tar.gz
- Show glade widgets in the workspace on selection changes in the project
* src/glade-window.c: - Show glade widgets in the workspace on selection changes in the project and not on item-activated. - Rename "Dock Editor" -> "Dock Properties" as per bug 487613. * gladeui/glade-design-layout.c: Fixed expose event to chain to parent class after drawing an orange box (non window widgets are usualy GTK_NO_WINDOW). * gladeui/glade-widget.c: Made glade_widget_show() show the toplevel of any GtkWidget object, also now shows toplevel non window glade widgets in the workspace, if the widget is referenced by a property that as a result parents the widget (i.e. bears a "parentless-widget" property reference), then the referencing widget is shown instead. * gladeui/glade-popup.c: Added devhelp icon to documentation menu item, added docs icon to normal menu. svn path=/trunk/; revision=1928
Diffstat (limited to 'src')
-rw-r--r--src/glade-window.c32
1 files changed, 7 insertions, 25 deletions
diff --git a/src/glade-window.c b/src/glade-window.c
index 93784fe5..7607742b 100644
--- a/src/glade-window.c
+++ b/src/glade-window.c
@@ -644,19 +644,20 @@ project_selection_changed_cb (GladeProject *project, GladeWindow *window)
*/
g_return_if_fail (GLADE_IS_WINDOW (window));
- /* Only update the editor if the selection has changed on
+ /* Only update the toolbar & workspace if the selection has changed on
* the currently active project.
*/
- if (glade_app_get_editor() &&
- project && (project == glade_app_get_project ()))
+ if (project == glade_app_get_project ())
{
list = glade_project_selection_get (project);
num = g_list_length (list);
if (num == 1 && !GLADE_IS_PLACEHOLDER (list->data))
{
-
glade_widget = glade_widget_get_from_gobject (G_OBJECT (list->data));
+
+ glade_widget_show (glade_widget);
+
clean_actions (window);
if (glade_widget->actions)
add_actions (window, glade_widget, glade_widget->actions);
@@ -1606,21 +1607,6 @@ next_project_cb (GtkAction *action, GladeWindow *window)
}
static void
-inspector_item_activated_cb (GladeInspector *inspector,
- GladeWindow *window)
-{
- GList *item = glade_inspector_get_selected_items (inspector);
- g_assert (GLADE_IS_WIDGET (item->data) && (item->next == NULL));
-
- /* bring window on top since inspector may be detached */
- gtk_window_present (GTK_WINDOW (window));
- /* switch to this widget in the workspace */
- glade_widget_show (GLADE_WIDGET (item->data));
-
- g_list_free (item);
-}
-
-static void
notebook_switch_page_cb (GtkNotebook *notebook,
GtkNotebookPage *page,
guint page_num,
@@ -1695,11 +1681,7 @@ notebook_tab_added_cb (GtkNotebook *notebook,
inspector = glade_inspector_new ();
gtk_widget_show (inspector);
glade_inspector_set_project (GLADE_INSPECTOR (inspector), project);
-
- g_signal_connect (inspector, "item-activated",
- G_CALLBACK (inspector_item_activated_cb),
- window);
-
+
gtk_notebook_append_page (GTK_NOTEBOOK (window->priv->inspectors_notebook), inspector, NULL);
@@ -2265,7 +2247,7 @@ static GtkToggleActionEntry view_entries[] = {
N_("Dock the inspector into the main window"),
G_CALLBACK (toggle_dock_cb), TRUE },
- { "DockEditor", NULL, N_("Dock _Editor"), NULL,
+ { "DockEditor", NULL, N_("Dock Prop_erties"), NULL,
N_("Dock the editor into the main window"),
G_CALLBACK (toggle_dock_cb), TRUE },