diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-08-16 04:41:14 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2012-08-16 04:41:14 +0000 |
commit | 7972b5e647b674e89e7e2367aa4aa469880f35df (patch) | |
tree | 788425970413370a08f63872f1a85b3012776242 /src/mainwindow.c | |
parent | ddc8a56649bd28bb8c02bd90beb1c023d8801788 (diff) |
removed redundant gtk_tooltips_new() and destroy GtkTooltips object on close.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3151 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/mainwindow.c')
-rw-r--r-- | src/mainwindow.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mainwindow.c b/src/mainwindow.c index faf0853e..98a21d79 100644 --- a/src/mainwindow.c +++ b/src/mainwindow.c @@ -988,6 +988,8 @@ MainWindow *main_window_create(SeparateType type) gtk_box_pack_start(GTK_BOX(vbox), menubar, FALSE, TRUE, 0); ifactory = gtk_item_factory_from_widget(menubar); + /* toolbar */ + mainwin->toolbar_tip = gtk_tooltips_new(); toolbar = main_window_toolbar_create(mainwin); gtk_widget_set_size_request(toolbar, 300, -1); gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, FALSE, 0); @@ -2691,7 +2693,6 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, for (cur = item_list; cur != NULL; cur = cur->next) { const PrefsDisplayItem *ditem = cur->data; PrefsToolbarItem *item; - GtkTooltips *tips; gint width; if (ditem->id == T_SEPARATOR) { @@ -2715,8 +2716,8 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, toolitem = gtk_tool_button_new(icon_wid, gettext(ditem->label)); if (ditem->description) { - tips = gtk_tooltips_new(); - gtk_tool_item_set_tooltip(toolitem, tips, + gtk_tool_item_set_tooltip(toolitem, + mainwin->toolbar_tip, gettext(ditem->description), ditem->name); } @@ -2749,9 +2750,8 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, gtk_container_add(GTK_CONTAINER(comboitem), GTK_WIDGET_PTR(combo)); if (ditem->description) { - tips = gtk_tooltips_new(); gtk_tool_item_set_tooltip - (comboitem, tips, + (comboitem, mainwin->toolbar_tip, gettext(ditem->description), ditem->name); } @@ -2774,9 +2774,8 @@ static GtkWidget *main_window_toolbar_create_from_list(MainWindow *mainwin, gtk_container_add(GTK_CONTAINER(comboitem), GTK_WIDGET_PTR(combo)); if (ditem->description) { - tips = gtk_tooltips_new(); gtk_tool_item_set_tooltip - (comboitem, tips, + (comboitem, mainwin->toolbar_tip, gettext(ditem->description), ditem->name); } |