chiark / gitweb /
Use gtk_widget_set_tooltip_text() instead of obsolete (and somewhat
authorRichard Kettlewell <rjk@greenend.org.uk>
Sun, 22 Nov 2009 12:41:52 +0000 (12:41 +0000)
committerRichard Kettlewell <rjk@greenend.org.uk>
Sun, 22 Nov 2009 12:41:52 +0000 (12:41 +0000)
heavyweight) GtkTooltips.

disobedience/choose-search.c
disobedience/control.c
disobedience/disobedience.c
disobedience/disobedience.h
disobedience/misc.c

index 1208f174f6996c4fcf2b5c6ee6dc0bdb41153786..acfddfa8d536c6b735d59585472d86748f51a1fb 100644 (file)
@@ -515,15 +515,15 @@ GtkWidget *choose_search_widget(void) {
   gtk_widget_set_style(choose_search_entry, tool_style);
   g_signal_connect(choose_search_entry, "changed",
                    G_CALLBACK(choose_search_entry_changed), 0);
-  gtk_tooltips_set_tip(tips, choose_search_entry,
-                       "Enter search terms here; search is automatic", "");
+  gtk_widget_set_tooltip_text(choose_search_entry,
+                              "Enter search terms here; search is automatic");
 
   /* Cancel button to clear the search */
   choose_clear = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
   gtk_widget_set_style(choose_clear, tool_style);
   g_signal_connect(G_OBJECT(choose_clear), "clicked",
                    G_CALLBACK(choose_clear_clicked), 0);
-  gtk_tooltips_set_tip(tips, choose_clear, "Clear search terms", "");
+  gtk_widget_set_tooltip_text(choose_clear, "Clear search terms");
 
   /* Up and down buttons to find previous/next results; initially they are not
    * usable as there are no search results. */
index 852885f7198827f79680ebf739c040545ba0a1ad..931746a88aac41cb2b23729416fe03cc713baf02 100644 (file)
@@ -289,8 +289,8 @@ GtkWidget *control_widget(void) {
   gtk_scale_set_digits(GTK_SCALE(balance_widget), 10);
   gtk_widget_set_size_request(volume_widget, 192, -1);
   gtk_widget_set_size_request(balance_widget, 192, -1);
-  gtk_tooltips_set_tip(tips, volume_widget, "Volume", "");
-  gtk_tooltips_set_tip(tips, balance_widget, "Balance", "");
+  gtk_widget_set_tooltip_text(volume_widget, "Volume");
+  gtk_widget_set_tooltip_text(balance_widget, "Balance");
   gtk_box_pack_start(GTK_BOX(hbox), volume_widget, FALSE, TRUE, 0);
   gtk_box_pack_start(GTK_BOX(hbox), balance_widget, FALSE, TRUE, 0);
   /* space updates rather than hammering the server */
@@ -374,8 +374,8 @@ static void icon_changed(const char attribute((unused)) *event,
    * state is immediately displayed.  sensitive and GTK_WIDGET_SENSITIVE show
    * it to be in the correct state, so I think this is may be a GTK+ bug. */
   if(icon->tip_on)
-    gtk_tooltips_set_tip(tips, icon->button,
-                           on ? icon->tip_on : icon->tip_off, "");
+    gtk_widget_set_tooltip_text(icon->button,
+                                on ? icon->tip_on : icon->tip_off);
   gtk_widget_set_sensitive(icon->button, sensitive);
   /* Icons with an associated menu item */
   if(icon->item) {
index edffbb5d9e5051d8ef4ec3457a2f9df798a519b4..9b050f4e1b1c5b796da72749263a1ad6410301f0 100644 (file)
@@ -85,9 +85,6 @@ static int rights_lookup_in_flight;
 /** @brief Current rights bitmap */
 rights_type last_rights;
 
-/** @brief Global tooltip group */
-GtkTooltips *tips;
-
 /** @brief True if RTP play is available
  *
  * This is a bit of a bodge...
@@ -476,8 +473,6 @@ int main(int argc, char **argv) {
   /* periodic operations (e.g. expiring the cache, checking local volume) */
   g_timeout_add(600000/*milliseconds*/, periodic_slow, 0);
   g_timeout_add(1000/*milliseconds*/, periodic_fast, 0);
-  /* global tooltips */
-  tips = gtk_tooltips_new();
   make_toplevel_window();
   /* reset styles now everything has its name */
   gtk_rc_reset_styles(gtk_settings_get_for_screen(gdk_screen_get_default()));
index f4678c79d90fc8a0ba0dc875c9f011fe63f011e9..cafa48dcd75e9e90bdb6925f3d74adc786d44c66 100644 (file)
@@ -101,7 +101,6 @@ extern int playing;                     /* true if playing some track */
 extern int volume_l, volume_r;          /* current volume */
 extern double goesupto;                 /* volume upper bound */
 extern int choosealpha;                 /* break up choose by letter */
-extern GtkTooltips *tips;
 extern int rtp_supported;
 extern int rtp_is_running;
 extern GtkItemFactory *mainmenufactory;
index c26cb5435f8b67374a91aa7bd1dd7a00a88dd38b..96e175030c1d5ebca495615c9e80f4e1b1035e41 100644 (file)
@@ -172,7 +172,7 @@ GtkWidget *iconbutton(const char *path, const char *tip) {
   gtk_widget_set_style(content, tool_style);
   gtk_container_add(GTK_CONTAINER(button), content);
   if(tip)
-    gtk_tooltips_set_tip(tips, button, tip, "");
+    gtk_widget_set_tooltip_text(button, tip);
   return button;
 }
 
@@ -188,7 +188,7 @@ GtkWidget *create_buttons_box(struct button *buttons,
     g_signal_connect(G_OBJECT(buttons[n].widget), "clicked",
                      G_CALLBACK(buttons[n].clicked), 0);
     gtk_box_pack_start(GTK_BOX(box), buttons[n].widget, FALSE, FALSE, 1);
-    gtk_tooltips_set_tip(tips, buttons[n].widget, buttons[n].tip, "");
+    gtk_widget_set_tooltip_text(buttons[n].widget, buttons[n].tip);
   }
   return box;
 }