/*
- * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2013 Hiroyuki Yamamoto and the Claws Mail team
+ * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 1999-2017 Hiroyuki Yamamoto and 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
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
- *
*/
#ifndef __GTKUTILS_H__
#define GTKUT_CTREE_REFRESH(clist) \
GTK_CMCLIST_GET_CLASS(clist)->refresh(clist)
+#define GTKUT_COLOR_BUTTON() \
+ gtk_button_new_with_label("\x20\xE2\x80\x83\x20")
+
gboolean gtkut_get_font_size (GtkWidget *widget,
gint *width,
gint *height);
void gtkut_widget_set_app_icon (GtkWidget *widget);
void gtkut_widget_set_composer_icon (GtkWidget *widget);
-void gtkut_widget_set_mapped (GtkWidget *widget, gboolean mapped);
-void gtkut_widget_set_realized (GtkWidget *widget, gboolean realized);
-void gtkut_widget_set_can_default (GtkWidget *widget, gboolean can_default);
-void gtkut_widget_set_receives_default (GtkWidget *widget, gboolean receives_default);
-void gtkut_widget_set_can_focus (GtkWidget *widget, gboolean can_focus);
-void gtkut_widget_set_has_window (GtkWidget *widget, gboolean has_window);
-
-
GtkWidget *gtkut_account_menu_new (GList *ac_list,
GCallback callback,
gpointer data);
gpointer data,
gboolean is_sock);
-#define CLAWS_SET_TIP(widget,tip) { \
- if (tip != NULL) \
- gtk_widget_set_tooltip_text(GTK_WIDGET(widget), tip); \
- else \
- gtk_widget_set_has_tooltip(GTK_WIDGET(widget), FALSE); \
+#define CLAWS_SET_TIP(widget,tip) { \
+ if (widget != NULL) { \
+ if (tip != NULL) \
+ gtk_widget_set_tooltip_text(GTK_WIDGET(widget), tip); \
+ else \
+ gtk_widget_set_has_tooltip(GTK_WIDGET(widget), FALSE); \
+ } \
}
#if (defined USE_GNUTLS && GLIB_CHECK_VERSION(2,22,0))
const gchar *ssl_service;
const gchar *tls_service;
gchar *address;
+ gint resolver_error;
GtkEntry *hostname_entry;
GtkToggleButton *set_port;
gboolean auto_configure_service_sync(const gchar *service, const gchar *domain, gchar **srvhost, guint16 *srvport);
#endif
+/* Returns pointer stored in selected row of a tree view's model
+ * in a given column. The column has to be of type G_TYPE_POINTER. */
+gpointer gtkut_tree_view_get_selected_pointer(GtkTreeView *view,
+ gint column);
#if GTK_CHECK_VERSION (3, 2, 0)
#define GTK_TYPE_VBOX GTK_TYPE_BOX
#define gtk_vpaned_new() g_object_new (GTK_TYPE_PANED, \
"orientation", GTK_ORIENTATION_VERTICAL, NULL)
#endif
-#if !GTK_CHECK_VERSION(2,22,0)
-#define gdk_drag_context_get_selected_action(x) ((x)->action)
-#define gdk_drag_context_get_actions(x) ((x)->actions)
-#define gtk_text_view_get_vadjustment(x) ((x)->vadjustment)
-#define gdk_drag_context_get_suggested_action(x) ((x)->suggested_action)
-#define gtk_button_get_event_window(x) ((x)->event_window)
-#endif
-#if !GTK_CHECK_VERSION(2,20,0)
-#define gtk_widget_get_requisition(x,r) (*(r) = (x)->requisition)
-#define gtk_statusbar_get_message_area(x) ((x)->label)
-#define gtk_widget_get_realized(x) (GTK_WIDGET_REALIZED(x))
-#define gtk_widget_get_mapped(x) (GTK_WIDGET_MAPPED(x))
-#endif
-#if !GTK_CHECK_VERSION(2,18,0)
-#define gtk_widget_get_allocation(x,a) (*(a) = (x)->allocation)
-#define gtk_widget_set_allocation(x,a) ((x)->allocation = *(a))
-#define gtk_widget_has_focus(x) (GTK_WIDGET_HAS_FOCUS(x))
-#define gtk_widget_get_can_focus(x) (GTK_WIDGET_CAN_FOCUS(x))
-#define gtk_widget_has_grab(x) (GTK_WIDGET_HAS_GRAB(x))
-#define gtk_widget_get_visible(x) (GTK_WIDGET_VISIBLE(x))
-#define gtk_widget_get_realized(x) (GTK_WIDGET_REALIZED(x))
-#define gtk_widget_is_sensitive(x) (GTK_WIDGET_IS_SENSITIVE(x))
-#define gtk_widget_get_sensitive(x) (GTK_WIDGET_SENSITIVE(x))
-#define gtk_widget_is_drawable(x) (GTK_WIDGET_DRAWABLE(x))
-#define gtk_widget_get_state(x) (GTK_WIDGET_STATE(x))
-#define gtk_widget_get_mapped(x) (GTK_WIDGET_MAPPED(x))
-#define gtk_widget_get_has_window(x) (!(GTK_WIDGET_NO_WINDOW(x)))
-#define gtk_widget_get_app_paintable(x) (GTK_WIDGET_APP_PAINTABLE(x))
-#define gtk_widget_set_window(x,w) { \
- if ((x)->window != w) { \
- (x)->window = w; \
- g_object_notify (G_OBJECT(x), "window");\
- } \
-}
-#endif
+
#endif /* __GTKUTILS_H__ */