comparison pidgin/gtkmenutray.c @ 22691:9a810bee2ffd

Leak fix
author Stu Tomlinson <stu@nosnilmot.com>
date Wed, 23 Apr 2008 15:00:03 +0000
parents 44b4e8bd759b
children 76ae43c5e745
comparison
equal deleted inserted replaced
22690:f2045aae33b8 22691:9a810bee2ffd
132 gtk_menu_item_set_right_justified(GTK_MENU_ITEM(menu_tray), TRUE); 132 gtk_menu_item_set_right_justified(GTK_MENU_ITEM(menu_tray), TRUE);
133 133
134 if(!GTK_IS_WIDGET(menu_tray->tray)) 134 if(!GTK_IS_WIDGET(menu_tray->tray))
135 menu_tray->tray = gtk_hbox_new(FALSE, 0); 135 menu_tray->tray = gtk_hbox_new(FALSE, 0);
136 136
137 menu_tray->tooltips = gtk_tooltips_new();
138
139 #if GTK_CHECK_VERSION(2,2,0) 137 #if GTK_CHECK_VERSION(2,2,0)
140 settings = 138 settings =
141 gtk_settings_get_for_screen(gtk_widget_get_screen(widget)); 139 gtk_settings_get_for_screen(gtk_widget_get_screen(widget));
142 140
143 if(gtk_icon_size_lookup_for_settings(settings, GTK_ICON_SIZE_MENU, 141 if(gtk_icon_size_lookup_for_settings(settings, GTK_ICON_SIZE_MENU,
233 231
234 void 232 void
235 pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip) 233 pidgin_menu_tray_set_tooltip(PidginMenuTray *menu_tray, GtkWidget *widget, const char *tooltip)
236 { 234 {
237 if (!menu_tray->tooltips) 235 if (!menu_tray->tooltips)
238 return; 236 menu_tray->tooltips = gtk_tooltips_new();
239 237
240 /* Should we check whether widget is a child of menu_tray? */ 238 /* Should we check whether widget is a child of menu_tray? */
241 239
242 /* 240 /*
243 * If the widget does not have it's own window, then it 241 * If the widget does not have it's own window, then it