diff options
author | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2017-06-10 19:36:29 -0300 |
---|---|---|
committer | Juan Pablo Ugarte <juanpablougarte@gmail.com> | 2017-12-30 13:42:16 -0300 |
commit | 1d85dd0a353e906b0df3428d66530ea81b1dc1fa (patch) | |
tree | 99059230a75878484e78dda072af0c58e5c22e0d /src/glade-window.c | |
parent | 1c870ed70cc91c4e9627f299af3beec83da77fa1 (diff) | |
download | glade-1d85dd0a353e906b0df3428d66530ea81b1dc1fa.tar.gz |
GladeWindow: remove palette
Palette functionality will be replaced with some search functionality.
In the mean time double click on the workspace/placeholder will be
the only way to add widgets to a project.
Diffstat (limited to 'src/glade-window.c')
-rw-r--r-- | src/glade-window.c | 27 |
1 files changed, 3 insertions, 24 deletions
diff --git a/src/glade-window.c b/src/glade-window.c index 9788875e..13ccef2b 100644 --- a/src/glade-window.c +++ b/src/glade-window.c @@ -87,8 +87,7 @@ struct _GladeWindowPrivate GtkWindow *about_dialog; GladePreferences *preferences; - - GtkNotebook *palettes_notebook; /* Cached per project palettes */ + GtkNotebook *inspectors_notebook; /* Cached per project inspectors */ GladeEditor *editor; /* The editor */ @@ -1744,9 +1743,8 @@ on_notebook_switch_page (GtkNotebook *notebook, set_sensitivity_according_to_project (window, project); - /* switch to the project's inspector/palette */ + /* switch to the project's inspector */ gtk_notebook_set_current_page (priv->inspectors_notebook, page_num); - gtk_notebook_set_current_page (priv->palettes_notebook, page_num); /* activate the corresponding item in the project menu */ action_name = g_strdup_printf ("Tab_%d", page_num); @@ -1779,19 +1777,13 @@ project_parse_finished_cb (GladeProject *project, GtkWidget *inspector) } static void -set_widget_sensitive_on_load (GladeProject *project, GtkWidget *widget) -{ - gtk_widget_set_sensitive (widget, TRUE); -} - -static void on_notebook_tab_added (GtkNotebook *notebook, GladeDesignView *view, guint page_num, GladeWindow *window) { GladeProject *project; - GtkWidget *inspector, *palette; + GtkWidget *inspector; ++window->priv->num_tabs; @@ -1821,24 +1813,13 @@ on_notebook_tab_added (GtkNotebook *notebook, gtk_widget_show (inspector); gtk_notebook_append_page (GTK_NOTEBOOK (window->priv->inspectors_notebook), inspector, NULL); - - /* create palette */ - palette = glade_palette_new (); - gtk_widget_show (palette); - glade_palette_set_show_selector_button (GLADE_PALETTE (palette), FALSE); - glade_palette_set_project (GLADE_PALETTE (palette), project); - - gtk_notebook_append_page (window->priv->palettes_notebook, palette, NULL); if (GPOINTER_TO_INT (g_object_get_data (G_OBJECT (view), "view-added-while-loading"))) { gtk_widget_set_sensitive (inspector, FALSE); - gtk_widget_set_sensitive (palette, FALSE); g_signal_connect (project, "parse-finished", G_CALLBACK (project_parse_finished_cb), inspector); - g_signal_connect (project, "parse-finished", - G_CALLBACK (set_widget_sensitive_on_load), palette); } else glade_inspector_set_project (GLADE_INSPECTOR (inspector), project); @@ -1880,7 +1861,6 @@ on_notebook_tab_removed (GtkNotebook *notebook, g_signal_handlers_disconnect_by_func (project, on_pointer_mode_changed, window); gtk_notebook_remove_page (priv->inspectors_notebook, page_num); - gtk_notebook_remove_page (priv->palettes_notebook, page_num); clean_actions (window); @@ -3048,7 +3028,6 @@ glade_window_class_init (GladeWindowClass *klass) gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, right_paned); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, notebook); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, notebook_frame); - gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, palettes_notebook); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, inspectors_notebook); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, editor); gtk_widget_class_bind_template_child_private (widget_class, GladeWindow, statusbar); |