GtkWidget *widget;
GtkWidget *widget2;
GtkWidget *evtbox;
- GtkTooltips *tooltips;
+ CLAWS_TIP_DECL();
debug_print("Creating notice view...\n");
noticeview = g_new0(NoticeView, 1);
(gpointer) noticeview);
gtk_box_pack_start(GTK_BOX(hbox), widget2, FALSE, FALSE, 0);
- tooltips = gtk_tooltips_new();
-
noticeview->vbox = vbox;
noticeview->hsep = hsep;
noticeview->hbox = hbox;
noticeview->button2= widget2;
noticeview->evtbox = evtbox;
noticeview->visible= TRUE;
- noticeview->tooltips = tooltips;
-
+#if !(GTK_CHECK_VERSION(2,12,0))
+ noticeview->tooltips = tips;
+#endif
return noticeview;
}
if (text != NULL) {
gtk_label_set_text
- (GTK_LABEL(GTK_BIN(noticeview->button)->child), text);
+ (GTK_LABEL(gtk_bin_get_child(GTK_BIN((noticeview->button)))), text);
gtk_widget_show(noticeview->button);
} else
gtk_widget_hide(noticeview->button);
}
void noticeview_set_button_press_callback(NoticeView *noticeview,
- GtkSignalFunc callback,
+ void (*callback)(void),
gpointer *user_data)
{
noticeview->press = (void (*) (NoticeView *, gpointer)) callback;
if (text != NULL) {
gtk_label_set_text
- (GTK_LABEL(GTK_BIN(noticeview->button2)->child), text);
+ (GTK_LABEL(gtk_bin_get_child(GTK_BIN((noticeview->button2)))), text);
gtk_widget_show(noticeview->button2);
} else
gtk_widget_hide(noticeview->button2);
}
void noticeview_set_2ndbutton_press_callback(NoticeView *noticeview,
- GtkSignalFunc callback,
+ void (*callback)(void),
gpointer *user_data)
{
noticeview->press2 = (void (*) (NoticeView *, gpointer)) callback;
void noticeview_set_tooltip (NoticeView *noticeview, const gchar *text)
{
- gtk_tooltips_set_tip(GTK_TOOLTIPS(noticeview->tooltips),
- noticeview->evtbox,
- text,
- NULL);
+#if !(GTK_CHECK_VERSION(2,12,0))
+ GtkTooltips *tips = noticeview->tooltips;
+#endif
+ CLAWS_SET_TIP(noticeview->evtbox,
+ text);
}