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 | |
parent | 17923704a6396397ceebe608cd0f0369dccef944 (diff) | |
download | gsoc2013-epiphany-800d438285ec852a357c2703a931a5c139b09cf2.tar.gz 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')
-rw-r--r-- | lib/ephy-gui.c | 43 | ||||
-rw-r--r-- | lib/ephy-gui.h | 13 |
2 files changed, 53 insertions, 3 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); +} diff --git a/lib/ephy-gui.h b/lib/ephy-gui.h index 10b681fbe..d989b06e6 100644 --- a/lib/ephy-gui.h +++ b/lib/ephy-gui.h @@ -21,12 +21,13 @@ #ifndef EPHY_GUI_H #define EPHY_GUI_H +#include <gdk/gdkkeysyms.h> +#include <gdk-pixbuf/gdk-pixbuf.h> #include <gtk/gtkmenu.h> -#include <gtk/gtktreeview.h> +#include <gtk/gtkmessagedialog.h> #include <gtk/gtktreeviewcolumn.h> +#include <gtk/gtktreeview.h> #include <gtk/gtkwindow.h> -#include <gdk-pixbuf/gdk-pixbuf.h> -#include <gdk/gdkkeysyms.h> G_BEGIN_DECLS @@ -78,6 +79,12 @@ void ephy_gui_window_update_user_time (GtkWidget *window, GtkWidget *ephy_gui_message_dialog_get_content_box (GtkWidget *dialog); +void ephy_gui_message_dialog_set_wrap_mode (GtkMessageDialog *dialog, + PangoWrapMode wrap_mode); + +void ephy_gui_connect_checkbutton_to_gconf (GtkWidget *widget, + const char *pref); + G_END_DECLS #endif |