aboutsummaryrefslogtreecommitdiffstats
path: root/lib/egg/egg-toolbar-editor.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-05-06 00:08:04 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-05-06 00:08:04 +0800
commit7457f676155191be13664f62ccbe2e1fcb184de4 (patch)
tree9016424e330af2cbda9c28872d178848d3da60e3 /lib/egg/egg-toolbar-editor.c
parent781a2569005c985af2ac82f329fc35d9e0e5d268 (diff)
downloadgsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.gz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.bz2
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.lz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.xz
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.tar.zst
gsoc2013-epiphany-7457f676155191be13664f62ccbe2e1fcb184de4.zip
Update (removing toolbars with context menu works again).
2003-05-05 Marco Pesenti Gritti <marco@it.gnome.org> * lib/egg/egg-editable-toolbar.c: * lib/egg/egg-toolbar-editor.c: * lib/egg/egg-toolbar-editor.h: * lib/egg/egg-toolbars-model.c: * lib/egg/egg-toolbars-model.h: Update (removing toolbars with context menu works again). * src/window-commands.c: (toolbar_editor_help_cb), (window_cmd_edit_toolbar): Build the tbe dialog, update for new egg api. Fix position of new toolbars to be before bookmarks toolbar.
Diffstat (limited to 'lib/egg/egg-toolbar-editor.c')
-rwxr-xr-xlib/egg/egg-toolbar-editor.c66
1 files changed, 5 insertions, 61 deletions
diff --git a/lib/egg/egg-toolbar-editor.c b/lib/egg/egg-toolbar-editor.c
index fd032cdd6..a373b520c 100755
--- a/lib/egg/egg-toolbar-editor.c
+++ b/lib/egg/egg-toolbar-editor.c
@@ -40,11 +40,6 @@ static void update_editor_sheet (EggToolbarEditor *editor);
enum
{
- RESPONSE_ADD_TOOLBAR
-};
-
-enum
-{
PROP_0,
PROP_MENU_MERGE,
PROP_TOOLBARS_MODEL
@@ -83,7 +78,7 @@ egg_toolbar_editor_get_type (void)
(GInstanceInitFunc) egg_toolbar_editor_init
};
- egg_toolbar_editor_type = g_type_register_static (GTK_TYPE_DIALOG,
+ egg_toolbar_editor_type = g_type_register_static (GTK_TYPE_VBOX,
"EggToolbarEditor",
&our_info, 0);
}
@@ -211,8 +206,7 @@ egg_toolbar_editor_finalize (GObject *object)
}
GtkWidget *
-egg_toolbar_editor_new (GtkWindow *parent,
- EggMenuMerge *merge,
+egg_toolbar_editor_new (EggMenuMerge *merge,
EggToolbarsModel *model)
{
EggToolbarEditor *t;
@@ -221,10 +215,6 @@ egg_toolbar_editor_new (GtkWindow *parent,
"MenuMerge", merge,
"ToolbarsModel", model,
NULL));
- if (parent != NULL)
- {
- gtk_window_set_transient_for (GTK_WINDOW (t), parent);
- }
g_return_val_if_fail (t->priv != NULL, NULL);
@@ -302,37 +292,6 @@ drag_data_get_cb (GtkWidget *widget,
selection_data->target, 8, target, strlen (target));
}
-static void
-editor_close (EggToolbarEditor *editor)
-{
- g_return_if_fail (IS_EGG_TOOLBAR_EDITOR (editor));
- gtk_widget_destroy (GTK_WIDGET (editor));
-}
-
-static void
-editor_add_toolbar (EggToolbarEditor *editor)
-{
- g_return_if_fail (IS_EGG_TOOLBAR_EDITOR (editor));
-
- egg_toolbars_model_add_toolbar (editor->priv->model, "UserCreated");
-}
-
-static void
-dialog_response_cb (GtkDialog *dialog,
- gint response_id,
- EggToolbarEditor *editor)
-{
- switch (response_id)
- {
- case RESPONSE_ADD_TOOLBAR:
- editor_add_toolbar (editor);
- break;
- case GTK_RESPONSE_CLOSE:
- editor_close (editor);
- break;
- }
-}
-
static gchar *
elide_underscores (const gchar *original)
{
@@ -475,29 +434,22 @@ static void
setup_editor (EggToolbarEditor *editor)
{
GtkWidget *scrolled_window;
- GtkWidget *vbox;
GtkWidget *label_hbox;
GtkWidget *image;
GtkWidget *label;
g_return_if_fail (IS_EGG_TOOLBAR_EDITOR (editor));
- gtk_dialog_set_has_separator (GTK_DIALOG (editor), FALSE);
- gtk_window_set_title (GTK_WINDOW (editor), "Toolbar editor");
-
- vbox = gtk_vbox_new (FALSE, 12);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
- gtk_widget_show (vbox);
- gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editor)->vbox), vbox);
+ gtk_container_set_border_width (GTK_CONTAINER (editor), 12);
scrolled_window = gtk_scrolled_window_new (NULL, NULL);
editor->priv->scrolled_window = scrolled_window;
gtk_widget_show (scrolled_window);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_box_pack_start (GTK_BOX (vbox), scrolled_window, TRUE, TRUE, 0);
+ gtk_box_pack_start (GTK_BOX (editor), scrolled_window, TRUE, TRUE, 0);
label_hbox = gtk_hbox_new (FALSE, 6);
gtk_widget_show (label_hbox);
- gtk_box_pack_start (GTK_BOX (vbox), label_hbox, FALSE, FALSE, 0);
+ gtk_box_pack_start (GTK_BOX (editor), label_hbox, FALSE, FALSE, 0);
image =
gtk_image_new_from_stock (GTK_STOCK_DIALOG_INFO, GTK_ICON_SIZE_DIALOG);
gtk_widget_show (image);
@@ -507,14 +459,6 @@ setup_editor (EggToolbarEditor *editor)
gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
gtk_widget_show (label);
gtk_box_pack_start (GTK_BOX (label_hbox), label, FALSE, TRUE, 0);
-
- gtk_dialog_add_button (GTK_DIALOG (editor),
- _("_Add a New Toolbar"), RESPONSE_ADD_TOOLBAR);
- gtk_dialog_add_button (GTK_DIALOG (editor),
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE);
-
- g_signal_connect (editor, "response",
- G_CALLBACK (dialog_response_cb), editor);
}
static void