diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-07-22 01:25:53 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-07-22 01:25:53 +0800 |
commit | 800d438285ec852a357c2703a931a5c139b09cf2 (patch) | |
tree | fbd1f74b77660ff8b22855ab136bd79e00b5904b /lib/ephy-gui.c | |
parent | 17923704a6396397ceebe608cd0f0369dccef944 (diff) | |
download | gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.gz gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.bz2 gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.lz gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.xz gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.zst gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.zip |
Add our options in a custom tab in the print dialogue.
2006-07-21 Christian Persch <chpe@cvs.gnome.org>
* data/epiphany.schemas.in:
* data/glade/print.glade:
* embed/mozilla/GeckoPrintService.cpp:
* embed/mozilla/GeckoPrintService.h:
* lib/ephy-gui.c: (ephy_gui_message_dialog_get_content_box),
(ephy_gui_message_dialog_set_wrap_mode), (checkbutton_toggled_cb),
(ephy_gui_connect_checkbutton_to_gconf):
* lib/ephy-gui.h:
Add our options in a custom tab in the print dialogue.
Diffstat (limited to 'lib/ephy-gui.c')
-rw-r--r-- | lib/ephy-gui.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/ephy-gui.c b/lib/ephy-gui.c index d69a9dca3..09d60d830 100644 --- a/lib/ephy-gui.c +++ b/lib/ephy-gui.c @@ -38,6 +38,7 @@ #include <gtk/gtkmain.h> #include <gtk/gtktreeselection.h> #include <gtk/gtktoolbar.h> +#include <gtk/gtktogglebutton.h> #include <unistd.h> @@ -494,3 +495,45 @@ ephy_gui_message_dialog_get_content_box (GtkWidget *dialog) return container; } + +/* Until bug #345349 is fixed */ +void +ephy_gui_message_dialog_set_wrap_mode (GtkMessageDialog *dialog, + PangoWrapMode wrap_mode) +{ + GtkContainer *container; + GList *children, *l; + + container = GTK_CONTAINER (dialog->label->parent); + g_return_if_fail (GTK_IS_CONTAINER (container)); + + children = gtk_container_get_children (container); + for (l = children; l != NULL; l = l->next) + { + GtkWidget *child = l->data; + + if (GTK_IS_LABEL (child)) + { + g_print ("Setting wrap mode on label %p\n", child); + gtk_label_set_line_wrap_mode (GTK_LABEL (child), + wrap_mode); + } + } +} + +static void +checkbutton_toggled_cb (GtkToggleButton *button, + const char *pref) +{ + eel_gconf_set_boolean (pref, gtk_toggle_button_get_active (button)); +} + +void +ephy_gui_connect_checkbutton_to_gconf (GtkWidget *widget, + const char *pref) +{ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), + eel_gconf_get_boolean (pref)); + g_signal_connect (widget, "toggled", + G_CALLBACK (checkbutton_toggled_cb), (gpointer) pref); +} |