static void profile_bar_new(void) { profile_bar_event = gtk_event_box_new(); profile_bar = gtk_statusbar_new(); gtk_container_add(GTK_CONTAINER(profile_bar_event), profile_bar); g_signal_connect(profile_bar_event, "button_press_event", G_CALLBACK(profile_show_popup_cb), NULL); g_signal_connect(profile_bar_event, "button_press_event", G_CALLBACK(popup_menu_handler), g_object_get_data(G_OBJECT(popup_menu_object), PM_STATUSBAR_PROFILES_KEY)); profile_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(profile_bar), "profile"); gtk_widget_set_tooltip_text(profile_bar_event, "Click to change configuration profile"); profile_bar_update(); gtk_widget_show(profile_bar); gtk_widget_show(profile_bar_event); }
static void profile_bar_new(void) { GtkTooltips *tooltips; tooltips = gtk_tooltips_new(); profile_bar_event = gtk_event_box_new(); profile_bar = gtk_statusbar_new(); gtk_container_add(GTK_CONTAINER(profile_bar_event), profile_bar); g_signal_connect(profile_bar_event, "button_press_event", G_CALLBACK(profile_show_popup_cb), NULL); profile_ctx = gtk_statusbar_get_context_id(GTK_STATUSBAR(profile_bar), "profile"); gtk_tooltips_set_tip (tooltips, profile_bar_event, "Click to change configuration profile", NULL); profile_bar_update(); gtk_widget_show(profile_bar); gtk_widget_show(profile_bar_event); }