#include "prefs_common.h"
#include "manage_window.h"
#include "base64.h"
+#include "manual.h"
gboolean gtkut_get_font_size(GtkWidget *widget,
gint *width, gint *height)
color->blue = (int) (((gdouble) (rgbvalue & 0x0000ff) / 255.0) * 65535.0);
}
+void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn)
+{
+ g_return_if_fail(bbox != NULL);
+
+ *help_btn = gtk_button_new_from_stock(GTK_STOCK_HELP);
+
+ GTK_WIDGET_SET_FLAGS(*help_btn, GTK_CAN_DEFAULT);
+ gtk_box_pack_end(GTK_BOX (bbox), *help_btn, TRUE, TRUE, 0);
+ gtk_button_box_set_child_secondary(GTK_BUTTON_BOX (bbox),
+ *help_btn, TRUE);
+ gtk_widget_set_sensitive(*help_btn,
+ manual_available(MANUAL_MANUAL_LOCAL));
+ gtk_widget_show(*help_btn);
+}
+
+void gtkut_stock_button_set_create_with_help(GtkWidget **bbox,
+ GtkWidget **help_button,
+ GtkWidget **button1, const gchar *label1,
+ GtkWidget **button2, const gchar *label2,
+ GtkWidget **button3, const gchar *label3)
+{
+ g_return_if_fail(bbox != NULL);
+ g_return_if_fail(button1 != NULL);
+
+ gtkut_stock_button_set_create(bbox, button1, label1,
+ button2, label2, button3, label3);
+
+ gtkut_stock_button_add_help(*bbox, help_button);
+}
+
void gtkut_stock_button_set_create(GtkWidget **bbox,
GtkWidget **button1, const gchar *label1,
GtkWidget **button2, const gchar *label2,
void gtkut_widget_set_app_icon(GtkWidget *widget)
{
-#include "pixmaps/sylpheed.xpm"
- static GdkPixmap *sylpheedxpm;
- static GdkBitmap *sylpheedxpmmask;
+#include "pixmaps/sylpheed-claws.xpm"
+ static GdkPixmap *sylpheedclawsxpm;
+ static GdkBitmap *sylpheedclawsxpmmask;
g_return_if_fail(widget != NULL);
g_return_if_fail(widget->window != NULL);
- if (!sylpheedxpm) {
- PIXMAP_CREATE(widget, sylpheedxpm, sylpheedxpmmask, sylpheed_xpm);
+ if (!sylpheedclawsxpm) {
+ PIXMAP_CREATE(widget, sylpheedclawsxpm, sylpheedclawsxpmmask,
+ sylpheed_claws_xpm);
}
- gdk_window_set_icon(widget->window, NULL, sylpheedxpm, sylpheedxpmmask);
+ gdk_window_set_icon(widget->window, NULL, sylpheedclawsxpm, sylpheedclawsxpmmask);
}
void gtkut_widget_set_composer_icon(GtkWidget *widget)
label = gtk_label_new(str);
gtk_container_add(GTK_CONTAINER(window), label);
+ gtk_label_set_line_wrap(label, TRUE);
gtk_widget_show(label);
gtk_widget_show_now(window);
+
+ GTK_EVENTS_FLUSH();
return window;
}
GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
GtkWidget *image;
+ if (o_face == NULL || strlen(o_face) == 0)
+ return NULL;
+
strncpy2(face, o_face, sizeof(face));
unfold_line(face); /* strip all whitespace and linebreaks */
return btn;
}
-GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox)
+GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox, gboolean focus_on_click)
{
GtkWidget *combobox;
GtkListStore *menu;
if( eventbox != NULL )
gtk_container_add(GTK_CONTAINER(eventbox), combobox);
-
- gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(combobox), FALSE);
-
+#if GTK_CHECK_VERSION(2,6,0)
+ gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(combobox), focus_on_click);
+#endif
return combobox;
}