/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2002 Hiroyuki Yamamoto & The Sylpheed Claws Team
+ * Copyright (C) 2002 Hiroyuki Yamamoto & The Claws Mail Team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
#ifdef HAVE_CONFIG_H
GtkWidget *widget;
GtkWidget *widget2;
GtkWidget *evtbox;
- GtkTooltips *tooltips;
+ CLAWS_TIP_DECL();
debug_print("Creating notice view...\n");
noticeview = g_new0(NoticeView, 1);
gtk_box_pack_start(GTK_BOX(hbox), widget, FALSE, FALSE, 4);
widget2 = gtk_button_new_with_label("");
-/ g_signal_connect(G_OBJECT(widget2), "clicked",
+ g_signal_connect(G_OBJECT(widget2), "clicked",
G_CALLBACK(noticeview_2ndbutton_pressed),
(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);
}