diff -Nru zapping-0.10~cvs6/debian/changelog zapping-0.10~cvs6/debian/changelog --- zapping-0.10~cvs6/debian/changelog 2018-01-02 21:58:51.000000000 +0000 +++ zapping-0.10~cvs6/debian/changelog 2018-09-25 08:33:06.000000000 +0000 @@ -1,3 +1,32 @@ +zapping (0.10~cvs6-14) unstable; urgency=medium + + * QA upload. + * debian/patches/23-GnomeUI-to-GTK3.patch: New; (attempt to) port to + GTK+ 3 (Closes: #886187). See the patch description for details. + * debian/patches/24-GConf-to-GSettings.patch: New; migrate from GConf to + GSettings (Closes: #886188). + * debian/patches/25-Disable-mpeg-plugin.patch: New; instead of shipping + an empty plugin, build the mpeg plugin conditionally if HAVE_LIBRTE is + defined. This library is not available in Debian. + * debian/patches/series: Update. + * debian/control (Build-Depends): Replace libgtk2.0-dev with + libgtk-3-dev. Remove libglade2-dev, libgnomeui-dev and libgconf2-dev. + (Recommends): Add gconf2 for the sake of data migration. + (Vcs-Git, Vcs-Browser): Update following the move to salsa.d.o. + (Standards-Version): Bump to 4.2.1; no changes required. + * debian/rules: Define hurd-specific CPPFLAGS; yet another attempt to + fix FTBFS on GNU/Hurd. + (override_dh_auto_configure): Override AC_PATH_PROG test for + consolehelper so that --enable-pam actually works. Drop + --disable-schemas-install and --with-gconf-schema-file-dir. + (override_dh_auto_install): Move zapping_setup_fb to /usr/bin. + (override_dh_fixperms): Remove, no longer necessary. + * debian/lintian-overrides: Delete as it is unused now. + * debian/links: Delete, no longer needed. + * debian/copyright: Use https for Format URL. Bump copyright years. + + -- Yavor Doganov Tue, 25 Sep 2018 11:33:06 +0300 + zapping (0.10~cvs6-13) unstable; urgency=medium * QA upload. diff -Nru zapping-0.10~cvs6/debian/control zapping-0.10~cvs6/debian/control --- zapping-0.10~cvs6/debian/control 2017-12-29 22:46:08.000000000 +0000 +++ zapping-0.10~cvs6/debian/control 2018-09-25 08:32:57.000000000 +0000 @@ -2,16 +2,13 @@ Section: gnome Priority: optional Maintainer: Debian QA Group -Standards-Version: 4.1.3 +Standards-Version: 4.2.1 Build-Depends: debhelper (>= 11), dh-buildinfo, autoconf-archive, docbook-xsl, intltool, - libgconf2-dev, - libglade2-dev, - libgnomeui-dev, - libgtk2.0-dev, + libgtk-3-dev, libjpeg-dev, liblircclient-dev, libpng-dev, @@ -31,12 +28,13 @@ scrollkeeper, xsltproc Homepage: http://zapping.sourceforge.net/ -Vcs-Git: https://anonscm.debian.org/users/robert/zapping.git -Vcs-Browser: https://anonscm.debian.org/cgit/users/robert/zapping.git +Vcs-Git: https://salsa.debian.org/debian/zapping.git +Vcs-Browser: https://salsa.debian.org/debian/zapping Package: zapping Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} +Recommends: gconf2 Description: television viewer for the GNOME environment It is based on plugins. This will make it easy to add functionality to the program, without making it hard to maintain, such as saving video as diff -Nru zapping-0.10~cvs6/debian/copyright zapping-0.10~cvs6/debian/copyright --- zapping-0.10~cvs6/debian/copyright 2017-12-29 21:53:15.000000000 +0000 +++ zapping-0.10~cvs6/debian/copyright 2018-09-25 08:28:47.000000000 +0000 @@ -1,4 +1,4 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: Zapping Upstream-Contact: Iñaki García Etxebarria Michael H. Schimek @@ -106,7 +106,7 @@ 2015, Santiago Vila 2017, Bernhard Übelacker 2017, Helge Kreutzmann - 2017, Yavor Doganov + 2017-2018, Yavor Doganov License: GPL-2+ License: BSD-4-clause diff -Nru zapping-0.10~cvs6/debian/links zapping-0.10~cvs6/debian/links --- zapping-0.10~cvs6/debian/links 2013-05-25 19:09:33.000000000 +0000 +++ zapping-0.10~cvs6/debian/links 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/sbin/zapping_setup_fb usr/bin/zapping_setup_fb diff -Nru zapping-0.10~cvs6/debian/lintian-overrides zapping-0.10~cvs6/debian/lintian-overrides --- zapping-0.10~cvs6/debian/lintian-overrides 2013-05-25 19:09:33.000000000 +0000 +++ zapping-0.10~cvs6/debian/lintian-overrides 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -zapping: setuid-binary usr/sbin/zapping_setup_fb 4755 root/root diff -Nru zapping-0.10~cvs6/debian/patches/23-GnomeUI-to-GTK3.patch zapping-0.10~cvs6/debian/patches/23-GnomeUI-to-GTK3.patch --- zapping-0.10~cvs6/debian/patches/23-GnomeUI-to-GTK3.patch 1970-01-01 00:00:00.000000000 +0000 +++ zapping-0.10~cvs6/debian/patches/23-GnomeUI-to-GTK3.patch 2018-09-25 07:00:24.000000000 +0000 @@ -0,0 +1,16704 @@ +Description: Port to GTK+ 3. + This patch is a shot by a blind in the dark. I don't have a TV card + so it is completely untested. I expect some subtle bugs which I'll + do my best to address if the necessary information is available. + . + There are still some warnings about deprecated functions to fix. + Migration from GtkTable to GtkGrid should be trivial but it's better + to have a chance for a visual inspection as it's easy to make a mess + with the arguments. The gtk_misc_* stuff also requires some + verification. There's also GtkUIManager/GtkAction stuff that needs + to be migrated to GtkBuilder/GAction. Connections to signals may + require updating; I paid specific attention but probably missed + something. Some low-level stuff (GDK/X mostly) is rather fishy and + I'm not certain at all if it is correct. + . + Session support is gone, as well as global tooltips (the ability to + enable/disable them globally for the application). AFAIU, this is no + longer supported and there is no replacement. + . + The .glade files were converted with a locally built Glade 3.8.6. + The deprecated (missing) widgets were replaced and the files were + saved in GtkBuilder format. Then the files were opened with + glade/3.22.1-1 (stock Debian package), visually inspected with + glade-previewer and saved again, targeting GTK+ 3.20 (the latest + supported version by this Glade release). The properties dialog (id + zapping_properties) was put in a separate GtkWindow as the parent + GtkNotebook was marked as internal-child and none of the top-level + widgets support this. The 4 buttons from the GnomePropertyBox were + not created artificially as the dialog is built programmatically. + The about dialog (id about) was remade as GtkAboutDialog; all + properties were copied manually. There are still deprecated widgets + that have to be replaced and some deprecated properties set. +Bug-Debian: https://bugs.debian.org/886187 +Author: Yavor Doganov +Forwarded: no +Last-Update: 2018-08-08 +--- + +--- zapping.orig/configure.in ++++ zapping/configure.in +@@ -628,9 +628,8 @@ + AM_GCONF_SOURCE_2 + + PKG_CHECK_MODULES(PACKAGE, [ +- gtk+-2.0 >= 2.4 +- libgnomeui-2.0 +- libglade-2.0 ++ gtk+-3.0 >= 3.22 ++ gmodule-2.0 + gconf-2.0]) + AC_SUBST(PACKAGE_CFLAGS) + AC_SUBST(PACKAGE_LIBS) +--- zapping.orig/src/zapping.h ++++ zapping/src/zapping.h +@@ -24,7 +24,7 @@ + #ifndef ZAPPING_H + #define ZAPPING_H + +-#include ++#include + #include "plugins/subtitle/view.h" + #include "tveng.h" + #include "zstack.h" +@@ -61,7 +61,7 @@ + + struct _Zapping + { +- GnomeApp app; ++ GtkWindow app; + + /*< private >*/ + +@@ -79,7 +79,7 @@ + GtkMenuItem * channels_menu; + GtkToolbar * toolbar; + gboolean toolbar_added; +- GnomeAppBar * appbar; ++ GtkStatusbar * appbar; + gboolean appbar_added; + + ZStack * contents; +@@ -92,7 +92,7 @@ + + struct _ZappingClass + { +- GnomeAppClass parent_class; ++ GtkWindowClass parent_class; + }; + + extern GType +--- zapping.orig/plugins/teletext/view.h ++++ zapping/plugins/teletext/view.h +@@ -24,7 +24,7 @@ + #ifndef TELETEXT_VIEW_H + #define TELETEXT_VIEW_H + +-#include ++#include + #include "libvbi/page.h" /* vbi3_page, vbi3_pgno, vbi3_subno */ + #include "libvbi/link.h" /* vbi3_link */ + #include "libvbi/vbi_decoder.h" +@@ -75,7 +75,7 @@ + GtkDrawingArea darea; + + TeletextToolbar * toolbar; +- GnomeAppBar * appbar; ++ GtkStatusbar * appbar; + + GtkActionGroup * action_group; + +@@ -176,7 +176,7 @@ + gint column2; + gint row2; + +- GdkGC * xor_gc; /* gfx context for xor mask */ ++ cairo_t * xor_gc; /* gfx context for xor mask */ + + /* selected text "sent" to */ + gboolean in_clipboard; /* X11 "CLIPBOARD" */ +--- zapping.orig/src/zmisc.h ++++ zapping/src/zmisc.h +@@ -191,7 +191,8 @@ + #define CLEAR(var) memset (&(var), 0, sizeof (var)) + #define MOVE(d, s) memmove (d, s, sizeof (d)) + +-#include ++#include ++#include + #include + #include + +@@ -212,7 +213,7 @@ + /* (e.g. clicks a button) */ \ + g_signal_connect_swapped (G_OBJECT (dialog), "response", \ + G_CALLBACK (gtk_widget_destroy), \ +- GTK_OBJECT (dialog)); \ ++ GTK_WIDGET (dialog)); \ + \ + gtk_widget_show (dialog); \ + } while (FALSE) +@@ -230,7 +231,7 @@ + \ + g_signal_connect_swapped (G_OBJECT (dialog), "response", \ + G_CALLBACK (gtk_widget_destroy), \ +- GTK_OBJECT (dialog)); \ ++ GTK_WIDGET (dialog)); \ + \ + gtk_widget_show (dialog); \ + } while (FALSE) +@@ -311,37 +312,9 @@ + GtkWidget * z_gtk_pixmap_menu_item_new(const gchar * label, + const gchar * icon); + +-GtkTooltips * +-z_tooltips_add (GtkTooltips * tips); +-extern void +-z_tooltips_active (gboolean enable); +-#define z_tooltips_enable() z_tooltips_active (TRUE) +-#define z_tooltips_disable() z_tooltips_active (FALSE) +-extern void +-z_tooltip_set (GtkWidget * widget, +- const gchar * tip_text); +-GtkWidget * +-z_tooltip_set_wrap (GtkWidget * widget, +- const gchar * tip_text); +-extern void +-z_set_sensitive_with_tooltip (GtkWidget * widget, +- gboolean sensitive, +- const gchar * on_tip, +- const gchar * off_tip); +- +-/** +- * Widget: a GTK_PIXMAP_MENU_ITEM that you want to change. +- * Any of the attributes can be NULL, means don't change. +- */ +-void +-z_change_menuitem (GtkWidget *widget, +- const gchar *new_pixmap, +- const gchar *new_label, +- const gchar *new_tooltip); +- + extern void + z_set_window_bg (GtkWidget * widget, +- GdkColor * color); ++ GdkRGBA * color); + extern void + z_set_window_bg_black (GtkWidget * widget); + +@@ -400,12 +373,6 @@ + z_status_set_widget(GtkWidget *widget); + + /** +- * Changes the pixmap of a pixbutton (buttons in the toolbar, for example) +- */ +-void set_stock_pixmap (GtkWidget *button, +- const gchar *new_pix); +- +-/** + * Just like gdk_pixbuf_copy_area but does clipping. + */ + void +@@ -424,7 +391,7 @@ + void + z_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, + GdkWindow *window, +- GdkGC *gc, ++ cairo_t *cr, + gint x, + gint y, + gint width, +@@ -452,7 +419,7 @@ + */ + void + z_option_menu_set_active (GtkWidget *option_menu, +- guint nth); ++ gint nth); + + /** + * Error checking scale_simple. +--- zapping.orig/src/plugin_common.h ++++ zapping/src/plugin_common.h +@@ -25,7 +25,9 @@ + # include "config.h" /* VERSION */ + #endif + +-#include ++#include ++#include ++#include + + #ifdef HAVE_LIBZVBI + # ifdef ZAPPING8 +--- zapping.orig/src/zconf.h ++++ zapping/src/zconf.h +@@ -19,7 +19,7 @@ + #ifndef __ZCONF_H__ + #define __ZCONF_H__ + +-#include /* This file depends on Gnome and glib */ ++#include /* This file depends on GTK and glib */ + + #include + +--- zapping.orig/plugins/screenshot/screenshot.c ++++ zapping/plugins/screenshot/screenshot.c +@@ -483,7 +483,7 @@ + screenshot_option_##_name = \ + gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w)); + +-static void plugin_add_gui (GnomeApp *); ++static void plugin_add_gui (void); + + static void + screenshot_apply (GtkWidget *page) +@@ -507,7 +507,7 @@ + + GET_BOOL (toolbutton); + +- plugin_add_gui (&zapping->app); ++ plugin_add_gui (); + } + + static void +@@ -523,11 +523,11 @@ + }; + + standard_properties_add(dialog, groups, G_N_ELEMENTS (groups), +- "screenshot.glade2"); ++ "screenshot.ui"); + } + + static +-void plugin_add_gui (GnomeApp * app _unused_) ++void plugin_add_gui (void) + { + GtkToolItem *tool_item; + gpointer p; +@@ -541,10 +541,11 @@ + { + tool_item = gtk_tool_button_new (NULL, _("Screenshot")); + +- gtk_tool_button_set_stock_id (GTK_TOOL_BUTTON (tool_item), +- "zapping-screenshot"); ++ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (tool_item), ++ "zapping-screenshot"); + +- z_tooltip_set (GTK_WIDGET (tool_item), _("Take a screenshot")); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), ++ _("Take a screenshot")); + + z_signal_connect_python (G_OBJECT (tool_item), "clicked", + "zapping.screenshot()"); +@@ -562,7 +563,7 @@ + } + + static void +-plugin_remove_gui (GnomeApp * app _unused_) ++plugin_remove_gui (void) + { + GtkWidget *button; + +@@ -742,7 +743,7 @@ + tv_cur_video_input (zapping_info)->label); + } + +- gnome_execute_async_with_env (NULL, argc, argv, envc, env); ++ g_spawn_async (NULL, argv, env, G_SPAWN_DEFAULT, NULL, NULL, NULL, NULL); + + while (envc-- > 0) + g_free (env[envc]); +@@ -882,9 +883,9 @@ + progressbar = gtk_progress_bar_new (); + gtk_widget_show (progressbar); + +- vbox = gtk_vbox_new (FALSE, 0); +- gtk_box_pack_start_defaults (GTK_BOX (vbox), label); +- gtk_box_pack_start_defaults (GTK_BOX (vbox), progressbar); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++ gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0); ++ gtk_box_pack_start (GTK_BOX (vbox), progressbar, TRUE, TRUE, 0); + gtk_widget_show (vbox); + + window = gtk_window_new (GTK_WINDOW_TOPLEVEL); +@@ -893,7 +894,7 @@ + gtk_window_set_modal (GTK_WINDOW (window), FALSE); + g_object_set_data (G_OBJECT (window), "progressbar", progressbar); + g_signal_connect (G_OBJECT (window), "delete-event", +- (GtkSignalFunc) on_progress_delete_event, data); ++ (GCallback) on_progress_delete_event, data); + gtk_widget_show (window); + + return window; +@@ -1126,20 +1127,75 @@ + data->data = old_image; + } + ++static void ++on_button_clicked (GtkButton *button, screenshot_data *data) ++{ ++ GtkWidget *dialog; ++ GtkFileChooser *chooser; ++ gint response; ++ ++ dialog = gtk_file_chooser_dialog_new (_("Destination file"), ++ GTK_WINDOW (data->dialog), ++ GTK_FILE_CHOOSER_ACTION_SAVE, ++ _("_Cancel"), GTK_RESPONSE_CANCEL, ++ _("_OK"), GTK_RESPONSE_ACCEPT, ++ NULL); ++ chooser = GTK_FILE_CHOOSER (dialog); ++ ++ if (data->entry) ++ gtk_file_chooser_set_filename (chooser, gtk_entry_get_text (data->entry)); ++ ++ response = gtk_dialog_run (GTK_DIALOG (dialog)); ++ ++ if (response == GTK_RESPONSE_ACCEPT) ++ { ++ gchar *file; ++ ++ file = gtk_file_chooser_get_filename (chooser); ++ gtk_entry_set_text (data->entry, file); ++ g_free (file); ++ } ++ ++ gtk_widget_destroy (dialog); ++} ++ + static gboolean +-on_drawingarea_expose_event (GtkWidget *widget _unused_, +- GdkEventExpose *event _unused_, ++on_drawingarea_expose_event (GtkWidget *widget, ++ cairo_t *cr, + screenshot_data *data) + { + gchar buf[80]; + + if (data->drawingarea && data->pixbuf) +- gdk_pixbuf_render_to_drawable (data->pixbuf, +- data->drawingarea->window, +- data->drawingarea->style->white_gc, +- 0, 0, 0, 0, +- PREVIEW_WIDTH, PREVIEW_HEIGHT, +- GDK_RGB_DITHER_NORMAL, 0, 0); ++ { ++ if (cr) ++ { ++ /* Handler was invoked automatically by GTK's "draw" ++ signal. */ ++ gdk_cairo_set_source_pixbuf (cr, data->pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, PREVIEW_WIDTH, PREVIEW_HEIGHT); ++ cairo_fill (cr); ++ } ++ else ++ { ++ cairo_region_t *region; ++ GdkDrawingContext *ctxt; ++ GdkWindow *window; ++ ++ /* Handler was invoked explicitly by the program with NULL ++ as second argument, so obtain the context from the ++ dialog's window. */ ++ window = gtk_widget_get_window (data->drawingarea); ++ region = gdk_window_get_visible_region (window); ++ ctxt = gdk_window_begin_draw_frame (window, region); ++ cr = gdk_drawing_context_get_cairo_context (ctxt); ++ gdk_cairo_set_source_pixbuf (cr, data->pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, PREVIEW_WIDTH, PREVIEW_HEIGHT); ++ cairo_fill (cr); ++ gdk_window_end_draw_frame (window, ctxt); ++ cairo_region_destroy (region); ++ } ++ } + + if (data->size_label) + { +@@ -1190,7 +1246,7 @@ + on_quality_changed (GtkWidget *widget, + screenshot_data *data) + { +- gint new_quality = GTK_ADJUSTMENT (widget)->value; ++ gint new_quality = gtk_adjustment_get_value (GTK_ADJUSTMENT (widget)); + + if (screenshot_option_quality == new_quality) + return FALSE; +@@ -1207,10 +1263,15 @@ + on_format_changed (GtkWidget *menu, + screenshot_data *data) + { +- GtkWidget *menu_item = gtk_menu_get_active (GTK_MENU (menu)); ++ GtkTreeModel *model; ++ GtkTreeIter iter; ++ gint id; + gchar *keyword; + +- keyword = g_object_get_data (G_OBJECT (menu_item), "keyword"); ++ id = gtk_combo_box_get_id_column (GTK_COMBO_BOX (menu)); ++ model = gtk_combo_box_get_model (GTK_COMBO_BOX (menu)); ++ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (menu), &iter); ++ gtk_tree_model_get (model, &iter, id, &keyword, -1); + + data->backend = find_backend (keyword); + +@@ -1218,11 +1279,14 @@ + + g_free (screenshot_option_format); + screenshot_option_format = g_strdup (data->backend->keyword); ++ g_free (keyword); + +- z_set_sensitive_with_tooltip (data->quality_slider, +- data->backend->quality, +- NULL, +- _("This format has no quality option")); ++ if (!data->backend->quality) ++ { ++ gtk_widget_set_sensitive (data->quality_slider, FALSE); ++ gtk_widget_set_tooltip_text (data->quality_slider, ++ _("This format has no quality option")); ++ } + + z_electric_replace_extension (GTK_WIDGET (data->entry), + data->backend->extension); +@@ -1255,39 +1319,30 @@ + build_dialog (screenshot_data *data) + { + GtkWidget *widget; +- GtkWidget *menu, *menu_item; + GtkAdjustment *adj; + guint default_item = 0; + guint i; + +- data->dialog = build_widget ("dialog1", "screenshot.glade2"); ++ data->dialog = build_widget ("dialog1", "screenshot.ui"); + /* Format menu */ + + widget = lookup_widget (data->dialog, "optionmenu1"); + +- if ((menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (widget)))) +- gtk_widget_destroy (menu); +- +- menu = gtk_menu_new (); +- + g_assert (backends[0] != NULL); + + for (i = 0; backends[i]; i++) + { +- menu_item = gtk_menu_item_new_with_label (_(backends[i]->label)); +- z_object_set_const_data (G_OBJECT (menu_item), "keyword", +- backends[i]->keyword); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); ++ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (widget), ++ backends[i]->keyword, _(backends[i]->label)); + + if (strcmp (screenshot_option_format, backends[i]->keyword) == 0) + default_item = i; + } + +- gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); +- gtk_option_menu_set_history (GTK_OPTION_MENU (widget), default_item); +- g_signal_connect (G_OBJECT (GTK_OPTION_MENU (widget)->menu), +- "deactivate", G_CALLBACK (on_format_changed), data); ++ gtk_widget_show (widget); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), default_item); ++ g_signal_connect (G_OBJECT (GTK_COMBO_BOX_TEXT (widget)), ++ "changed", G_CALLBACK (on_format_changed), data); + + data->backend = backends[default_item]; + +@@ -1317,6 +1372,15 @@ + G_CALLBACK (z_on_electric_filename), + (gpointer) NULL); + gtk_editable_select_region (GTK_EDITABLE (data->entry), 0, -1); ++ ++ /* In the .glade file, "entry" is the internal GtkEntry of a ++ GnomeFileEntry. The latter is replaced in the .ui file with a ++ horizontal GtkBox containing a GtkEntry and a GtkButton which ++ spawns a GtkFileChooserDialog. This is necessary because ++ GtkFileChooserButton cannot be used for save action. */ ++ widget = lookup_widget (data->dialog, "button"); ++ gtk_widget_show (widget); ++ g_signal_connect (widget, "clicked", G_CALLBACK (on_button_clicked), data); + } + + /* Preview */ +@@ -1333,10 +1397,8 @@ + data->drawingarea = lookup_widget (data->dialog, + "drawingarea1"); + data->size_label = lookup_widget (data->dialog, "label7"); +- gdk_window_set_back_pixmap (data->drawingarea->window, +- NULL, FALSE); + preview (data); +- g_signal_connect (G_OBJECT (data->drawingarea), "expose-event", ++ g_signal_connect (G_OBJECT (data->drawingarea), "draw", + G_CALLBACK (on_drawingarea_expose_event), + data); + } +@@ -1363,10 +1425,12 @@ + g_signal_connect (G_OBJECT (adj), "value-changed", + G_CALLBACK (on_quality_changed), data); + +- z_set_sensitive_with_tooltip (data->quality_slider, +- data->backend->quality, +- NULL, +- _("This format has no quality option")); ++ if (!data->backend->quality) ++ { ++ gtk_widget_set_sensitive (data->quality_slider, FALSE); ++ gtk_widget_set_tooltip_text (data->quality_slider, ++ _("This format has no quality option")); ++ } + + gtk_window_set_transient_for (GTK_WINDOW (data->dialog), + GTK_WINDOW (zapping)); +@@ -1380,29 +1444,31 @@ + widget = lookup_widget (data->dialog, "radiobutton4"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), + (screenshot_option_deint == 0)); +- g_signal_connect (G_OBJECT (widget), "pressed", ++ g_signal_connect (G_OBJECT (widget), "toggled", + G_CALLBACK (on_deint_changed), data); + + widget = lookup_widget (data->dialog, "radiobutton2"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), + (screenshot_option_deint == 1)); + g_object_set_data (G_OBJECT (widget), "deint", (gpointer) 1); +- g_signal_connect (G_OBJECT (widget), "pressed", ++ g_signal_connect (G_OBJECT (widget), "toggled", + G_CALLBACK (on_deint_changed), data); + + widget = lookup_widget (data->dialog, "radiobutton3"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), + (screenshot_option_deint == 2)); + g_object_set_data (G_OBJECT (widget), "deint", (gpointer) 2); +- g_signal_connect (G_OBJECT (widget), "pressed", ++ g_signal_connect (G_OBJECT (widget), "toggled", + G_CALLBACK (on_deint_changed), data); + } + else + { + widget = lookup_widget (data->dialog, "hbox2"); + +- z_set_sensitive_with_tooltip (widget, FALSE, NULL, +- _("Only useful with full size, unscaled picture (480 or 576 lines)")); ++ gtk_widget_set_sensitive (widget, FALSE); ++ gtk_widget_set_tooltip_text (widget, ++ _("Only useful with full size, " ++ "unscaled picture (480 or 576 lines)")); + } + + /* Subtitles */ +--- zapping.orig/plugins/subtitle/view.c ++++ zapping/plugins/subtitle/view.c +@@ -24,7 +24,8 @@ + # include "config.h" + #endif + +-#include ++#include ++#include + #include + #include "libvbi/vbi_decoder.h" + #include "libvbi/exp-gfx.h" +@@ -515,18 +516,18 @@ + return image->pixbuf; + } + +-static GdkRegion * ++static cairo_region_t * + nontransparent_region (const vbi3_page * pg, + const struct subt_image *image) + { +- GdkRegion *region; +- GdkRectangle rect; ++ cairo_region_t *region; ++ cairo_rectangle_int_t rect; + const vbi3_char *cp; + guint columns; + guint row; + uint64_t prev_mask; + +- region = gdk_region_new (); ++ region = cairo_region_create (); + + cp = pg->text; + columns = pg->columns; +@@ -584,7 +585,7 @@ + rect.width = lrint (i * image->cell_width - .5) - rect.x; + rect.height = y2a - rect.y; + +- gdk_region_union_with_rect (region, &rect); ++ cairo_region_union_rectangle (region, &rect); + + xr = -.5; /* close gap between blocks */ + } +@@ -602,7 +603,7 @@ + rect.width = lrint (i * image->cell_width - .5) - rect.x; + rect.height = y2a - rect.y; + +- gdk_region_union_with_rect (region, &rect); ++ cairo_region_union_rectangle (region, &rect); + + start = i; + xr = -.5; +@@ -633,7 +634,7 @@ + gdouble roll_position; + GdkRectangle extents; + GdkRectangle clip_rect; +- GdkRegion *region; ++ cairo_region_t *region; + gint indent; + + pg = view->pg; +@@ -656,7 +657,7 @@ + return; + } + +- text = view->darea.widget.allocation; ++ gtk_widget_get_allocation (&view->darea.widget, &text); + + if (reposition) + { +@@ -696,7 +697,7 @@ + if (reshape) + { + if (view->region) +- gdk_region_destroy (view->region); ++ cairo_region_destroy (view->region); + + if (0 /* transparent background */) + { +@@ -738,7 +739,7 @@ + /* Make sure the subtitles are visible + but do not reach across view->visibility_bounds. */ + +- gdk_region_get_clipbox (view->region, &extents); ++ cairo_region_get_extents (view->region, &extents); + + clip_rect.x = 0; + clip_rect.y = 0; +@@ -820,15 +821,16 @@ + + if (clip_rect.x | clip_rect.y) + { +- region = gdk_region_rectangle (&clip_rect); +- gdk_region_intersect (region, view->region); ++ region = cairo_region_create_rectangle (&clip_rect); ++ cairo_region_intersect (region, view->region); + } + + /* Keep these calls together to reduce flicker. */ + + if (reposition | reshape) + { +- gdk_window_shape_combine_region (view->darea.widget.window, ++ gdk_window_shape_combine_region (gtk_widget_get_window ++ (&view->darea.widget), + region, + /* offset_x */ 0, + /* offset_y */ 0); +@@ -843,24 +845,31 @@ + /* Scaled image changed, make it visible. If only the window + moved the expose handler will redraw. */ + +- gdk_draw_pixbuf (view->darea.widget.window, +- view->darea.widget.style->white_gc, +- view->display_scaled.pixbuf, +- /* src_x */ view->display_scaled.expose.x, +- /* src_y */ view->display_scaled.expose.y, +- /* dst_x */ view->display_scaled.expose.x, +- /* dst_y */ view->display_scaled.expose.y, +- view->display_scaled.expose.width, +- view->display_scaled.expose.height, +- GDK_RGB_DITHER_NONE, +- /* x_dither */ 0, +- /* y_dither */ 0); ++ cairo_t *cr; ++ cairo_region_t *rgn; ++ GdkDrawingContext *ctxt; ++ GdkWindow *window; ++ ++ window = gtk_widget_get_window (&view->darea.widget); ++ rgn = gdk_window_get_visible_region (window); ++ ctxt = gdk_window_begin_draw_frame (window, rgn); ++ cr = gdk_drawing_context_get_cairo_context (ctxt); ++ gdk_cairo_set_source_pixbuf (cr, view->display_scaled.pixbuf, ++ view->display_scaled.expose.x, ++ view->display_scaled.expose.y); ++ cairo_rectangle (cr, view->display_scaled.expose.x, ++ view->display_scaled.expose.y, ++ view->display_scaled.expose.width, ++ view->display_scaled.expose.height); ++ cairo_fill (cr); ++ gdk_window_end_draw_frame (window, ctxt); ++ cairo_region_destroy (rgn); + + view->redraw_display_scaled = FALSE; + } + + if (clip_rect.x | clip_rect.y) +- gdk_region_destroy (region); ++ cairo_region_destroy (region); + } + + static void +@@ -1506,14 +1515,20 @@ + get_color (vbi3_rgba * rgba, + const gchar * key) + { +- GdkColor color; ++ gchar *color; ++ GdkRGBA rgb; + +- if (!z_gconf_get_color (&color, key)) ++ if (!z_gconf_get_string (&color, key)) + return FALSE; + +- *rgba = (((color.red & 0xFF00) >> 8) | +- (color.green & 0xFF00) | +- ((color.blue & 0xFF00) << 8)); ++ if (!gdk_rgba_parse (&rgb, color)) ++ return FALSE; ++ ++ *rgba = (((int) (rgb.red * 255) << 16) | ++ ((int) (rgb.green * 255) << 8) | ++ ((int) (rgb.blue * 255))); ++ ++ g_free (color); + + return TRUE; + } +@@ -1661,7 +1676,7 @@ + { "SubtitleResetPosition", NULL, N_("_Reset position"), NULL, NULL, + G_CALLBACK (reset_position_action) }, + { "SubtitleEncodingSubmenu", NULL, N_("_Encoding"), NULL, NULL, NULL }, +- { "SubtitlePreferences", GTK_STOCK_PREFERENCES, NULL, NULL, ++ { "SubtitlePreferences", "preferences-system", NULL, NULL, + NULL, G_CALLBACK (preferences_action) }, + }; + +@@ -1686,7 +1701,7 @@ + { + SubtitleView *view = SUBTITLE_VIEW (em->user_data); + +- if (menu_item->active) ++ if (gtk_check_menu_item_get_active (menu_item)) + view->set_charset (view, em->code); + } + +@@ -1830,15 +1845,14 @@ + if (!(pg = view->pg)) + return FALSE; + +- if (!(window = view->darea.widget.window)) ++ if (!(window = gtk_widget_get_window (&view->darea.widget))) + return FALSE; + + gdk_window_get_geometry (window, + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + if (width <= 0 || height <= 0) + return FALSE; +@@ -1857,6 +1871,8 @@ + gint x; + gint y; + GdkModifierType mask; ++ GdkWindow *window; ++ GdkSeat *seat; + vbi3_link link; + gboolean success; + +@@ -1867,8 +1883,12 @@ + gint x; + gint y; + GdkModifierType mask; ++ GdkWindow *root; + +- gdk_window_get_pointer (gdk_get_default_root_window (), &x, &y, &mask); ++ root = gdk_get_default_root_window (); ++ seat = gdk_display_get_default_seat (gdk_window_get_display (root)); ++ gdk_window_get_device_position (root, gdk_seat_get_pointer (seat), ++ &x, &y, &mask); + + if (x == view->last_mouse_x + && y == view->last_mouse_y) +@@ -1896,7 +1916,10 @@ + return TRUE; /* handled */ + } + +- gdk_window_get_pointer (widget->window, &x, &y, &mask); ++ window = gtk_widget_get_window (widget); ++ seat = gdk_display_get_default_seat (gdk_window_get_display (window)); ++ gdk_window_get_device_position (window, gdk_seat_get_pointer (seat), ++ &x, &y, &mask); + + success = link_from_pointer_position (view, &link, x, y); + +@@ -1909,11 +1932,11 @@ + case VBI3_LINK_HTTP: + case VBI3_LINK_FTP: + case VBI3_LINK_EMAIL: +- gdk_window_set_cursor (widget->window, cursor_link); ++ gdk_window_set_cursor (window, cursor_link); + break; + + default: +- gdk_window_set_cursor (widget->window, cursor_normal); ++ gdk_window_set_cursor (window, cursor_normal); + break; + } + +@@ -1921,7 +1944,7 @@ + } + else + { +- gdk_window_set_cursor (widget->window, cursor_normal); ++ gdk_window_set_cursor (window, cursor_normal); + } + + return TRUE; /* handled */ +@@ -1990,22 +2013,30 @@ + gint mouse_x; + gint mouse_y; + GdkModifierType mask; ++ GdkWindow *root; ++ GdkSeat *seat; ++ GtkAllocation allocation; + gint org_x; + gint org_y; + gdouble d; + + view->scaling = TRUE; + +- gdk_window_get_pointer (gdk_get_default_root_window (), +- &mouse_x, &mouse_y, &mask); ++ root = gdk_get_default_root_window (); ++ seat = gdk_display_get_default_seat (gdk_window_get_display (root)); ++ gdk_window_get_device_position (root, gdk_seat_get_pointer (seat), ++ &mouse_x, &mouse_y, &mask); + + view->last_mouse_x = mouse_x; + view->last_mouse_y = mouse_y; + +- gdk_window_get_origin (view->darea.widget.window, &org_x, &org_y); ++ gdk_window_get_origin (gtk_widget_get_window (&view->darea.widget), ++ &org_x, &org_y); ++ ++ gtk_widget_get_allocation (&view->darea.widget, &allocation); + +- view->scale_center_x = org_x + view->darea.widget.allocation.width / 2; +- view->scale_center_y = org_y + view->darea.widget.allocation.height / 2; ++ view->scale_center_x = org_x + allocation.width / 2; ++ view->scale_center_y = org_y + allocation.height / 2; + + d = sqrt (fabs (mouse_x - view->scale_center_x) + * fabs (mouse_y - view->scale_center_y)); +@@ -2024,10 +2055,15 @@ + gint x; + gint y; + GdkModifierType mask; ++ GdkWindow *root; ++ GdkSeat *seat; + + view->moving = TRUE; + +- gdk_window_get_pointer (gdk_get_default_root_window (), &x, &y, &mask); ++ root = gdk_get_default_root_window (); ++ seat = gdk_display_get_default_seat (gdk_window_get_display (root)); ++ gdk_window_get_device_position (root, gdk_seat_get_pointer (seat), ++ &x, &y, &mask); + + view->last_mouse_x = x; + view->last_mouse_y = y; +@@ -2128,23 +2164,20 @@ + + static gboolean + expose_event (GtkWidget * widget, +- GdkEventExpose * event) ++ cairo_t * cr) + { + SubtitleView *view = SUBTITLE_VIEW (widget); + + if (view->display_scaled.pixbuf + && view->display_scaled.valid) + { +- gdk_draw_pixbuf (view->darea.widget.window, +- view->darea.widget.style->white_gc, +- view->display_scaled.pixbuf, +- /* src */ event->area.x, event->area.y, +- /* dst */ event->area.x, event->area.y, +- event->area.width, +- event->area.height, +- GDK_RGB_DITHER_NONE, +- /* x_dither */ 0, +- /* y_dither */ 0); ++ GdkRectangle rect; ++ ++ gdk_cairo_get_clip_rectangle (cr, &rect); ++ gdk_cairo_set_source_pixbuf (cr, view->display_scaled.pixbuf, ++ rect.x, rect.y); ++ cairo_rectangle (cr, rect.x, rect.y, rect.width, rect.height); ++ cairo_fill (cr); + } + + return TRUE; +@@ -2165,7 +2198,7 @@ + + if (view->region) + { +- gdk_region_destroy (view->region); ++ cairo_region_destroy (view->region); + view->region = NULL; + } + +@@ -2245,6 +2278,26 @@ + requisition->height = 16; + } + ++static void ++get_preferred_width (GtkWidget *widget, gint *min, gint *nat) ++{ ++ GtkRequisition requisition; ++ ++ size_request (widget, &requisition); ++ ++ *min = *nat = requisition.width; ++} ++ ++static void ++get_preferred_height (GtkWidget *widget, gint *min, gint *nat) ++{ ++ GtkRequisition requisition; ++ ++ size_request (widget, &requisition); ++ ++ *min = *nat = requisition.height; ++} ++ + /* We cannot initialize this until the widget (and its + parent GtkWindow) has a window. */ + static void +@@ -2254,7 +2307,6 @@ + GTK_WIDGET_CLASS (parent_class)->realize (widget); + + /* No background, prevents flicker. */ +- gdk_window_set_back_pixmap (widget->window, NULL, FALSE); + } + + static void +@@ -2320,6 +2372,7 @@ + { + GObjectClass *object_class; + GtkWidgetClass *widget_class; ++ GdkDisplay *disp; + + class_data = class_data; + +@@ -2330,9 +2383,10 @@ + object_class->finalize = instance_finalize; + + widget_class->realize = realize; +- widget_class->size_request = size_request; ++ widget_class->get_preferred_width = get_preferred_width; ++ widget_class->get_preferred_height = get_preferred_height; + widget_class->size_allocate = size_allocate; +- widget_class->expose_event = expose_event; ++ widget_class->draw = expose_event; + widget_class->button_press_event = button_press_event; + widget_class->button_release_event = button_release_event; + widget_class->motion_notify_event = motion_notify_event; +@@ -2347,8 +2401,9 @@ + /* return_type */ G_TYPE_NONE, + /* n_params */ 0); + +- cursor_normal = gdk_cursor_new (GDK_FLEUR); /* LEFT_PTR */ +- cursor_link = gdk_cursor_new (GDK_HAND2); ++ disp = gdk_display_get_default (); ++ cursor_normal = gdk_cursor_new_for_display (disp, GDK_FLEUR); /* LEFT_PTR */ ++ cursor_link = gdk_cursor_new_for_display (disp, GDK_HAND2); + + /* Error ignored */ + z_gconf_notify_add (GCONF_DIR "/default_charset", +--- zapping.orig/plugins/subtitle/preferences.c ++++ zapping/plugins/subtitle/preferences.c +@@ -136,7 +136,7 @@ + gtk_widget_show (widget); + + if (tooltip) +- z_tooltip_set (widget, tooltip); ++ gtk_widget_set_tooltip_text (widget, tooltip); + + gtk_table_attach (table, widget, + INDENT_COL + 1, INDENT_COL + 2, +@@ -160,7 +160,7 @@ + gtk_widget_show (widget); + + if (tooltip) +- z_tooltip_set (widget, tooltip); ++ gtk_widget_set_tooltip_text (widget, tooltip); + + gtk_table_attach (table, widget, + INDENT_COL + 1, INDENT_COL + 2, +@@ -174,39 +174,40 @@ + get_color (vbi3_rgba * rgba, + const gchar * key) + { +- GdkColor color; ++ gchar *color; ++ GdkRGBA rgb; + +- if (!z_gconf_get_color (&color, key)) ++ if (!z_gconf_get_string (&color, key)) + return FALSE; + +- *rgba = (((color.red & 0xFF00) >> 8) | +- (color.green & 0xFF00) | +- ((color.blue & 0xFF00) << 8)); ++ if (!gdk_rgba_parse (&rgb, color)) ++ return FALSE; ++ ++ *rgba = (((int) (rgb.red * 255) << 16) | ++ ((int) (rgb.green * 255) << 8) | ++ ((int) (rgb.blue * 255))); ++ ++ g_free (color); + + return TRUE; + } + + static void +-on_color_set (GnomeColorPicker * colorpicker, +- guint arg1, +- guint arg2, +- guint arg3, +- guint arg4, ++on_color_set (GtkColorButton * colorpicker, + gpointer user_data) + { +- char buffer[40]; ++ char *buffer; + const gchar *gconf_key; +- +- colorpicker = colorpicker; +- arg4 = arg4; ++ GdkRGBA rgba; + + gconf_key = user_data; + +- snprintf (buffer, sizeof (buffer), "#%02X%02X%02X", +- arg1 >> 8, arg2 >> 8, arg3 >> 8); ++ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (colorpicker), &rgba); ++ buffer = gdk_rgba_to_string (&rgba); + + /* Error ignored. */ + z_gconf_set_string (gconf_key, buffer); ++ g_free (buffer); + } + + static void +@@ -218,28 +219,29 @@ + const gchar * tooltip) + { + GtkWidget *widget; +- GnomeColorPicker *color_picker; ++ GtkColorButton *color_picker; ++ GdkRGBA color; + + /* Error ignored. */ + get_color (&def_value, gconf_key); ++ color.red = VBI3_R (def_value) / 255.; ++ color.green = VBI3_G (def_value) / 255.0; ++ color.blue = VBI3_B (def_value) / 255.0; ++ color.alpha = 1.0; + +- widget = gnome_color_picker_new (); ++ widget = gtk_color_button_new (); + gtk_widget_show (widget); + +- color_picker = GNOME_COLOR_PICKER (widget); +- gnome_color_picker_set_use_alpha (color_picker, FALSE); +- gnome_color_picker_set_i8 (color_picker, +- (def_value & 0xff), +- (def_value & 0xff00) >> 8, +- (def_value & 0xff0000) >> 16, +- 0); +- gnome_color_picker_set_title (color_picker, title); ++ color_picker = GTK_COLOR_BUTTON (widget); ++ gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (color_picker), FALSE); ++ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (color_picker), &color); ++ gtk_color_button_set_title (color_picker, title); + + z_signal_connect_const (G_OBJECT (color_picker), "color-set", + G_CALLBACK (on_color_set), gconf_key); + + if (tooltip) +- z_tooltip_set (widget, tooltip); ++ gtk_widget_set_tooltip_text (widget, tooltip); + + gtk_table_attach (table, widget, + INDENT_COL + 1, INDENT_COL + 2, +@@ -295,13 +297,13 @@ + switch (GPOINTER_TO_INT (user_data)) + { + case 0: +- value = GTK_ADJUSTMENT (adj)->value; ++ value = gtk_adjustment_get_value (GTK_ADJUSTMENT (adj)); + /* Error ignored. */ + z_gconf_set_int (GCONF_DIR "/brightness", SATURATE (value, 0, 255)); + break; + + case 1: +- value = GTK_ADJUSTMENT (adj)->value; ++ value = gtk_adjustment_get_value (GTK_ADJUSTMENT (adj)); + /* Error ignored. */ + z_gconf_set_int (GCONF_DIR "/contrast", + SATURATE (value, -128, +127)); +@@ -330,7 +332,7 @@ + SubtitlePrefs *prefs = (SubtitlePrefs *) instance; + GError *error = NULL; + GtkWidget *widget; +- GtkObject *adj; ++ GtkAdjustment *adj; + guint row; + gint value; + +--- zapping.orig/plugins/teletext/bookmark.c ++++ zapping/plugins/teletext/bookmark.c +@@ -224,7 +224,7 @@ + if (GTK_IS_WINDOW (parent)) + break; + +- parent = parent->parent; ++ parent = gtk_widget_get_parent (parent); + } + + gtk_window_set_transient_for (window, GTK_WINDOW (parent)); +@@ -287,7 +287,7 @@ + buffer = g_strdup_printf (_("Added page %x to bookmarks"), + view->pg->pgno); + +- gnome_appbar_set_status (GNOME_APPBAR (view->appbar), buffer); ++ gtk_statusbar_push (view->appbar, 0, buffer); + + g_free (buffer); + } +@@ -342,41 +342,39 @@ + data->load_page (data, &anonymous_network, b->pn.pgno, b->pn.subno); + } + +-static GnomeUIInfo +-bookmarks_uiinfo [] = { +- { +- GNOME_APP_UI_ITEM, N_("_Add Bookmark"), NULL, +- G_CALLBACK (on_add_bookmark_activate), NULL, NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_ADD, +- GDK_D, (GdkModifierType) GDK_CONTROL_MASK, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("_Edit Bookmarks..."), NULL, +- G_CALLBACK (on_edit_bookmarks_activate), NULL, NULL, +- GNOME_APP_PIXMAP_NONE, NULL, +- GDK_B, (GdkModifierType) GDK_CONTROL_MASK, NULL +- }, +- GNOMEUIINFO_END +-}; +- + /* XXX use vbi3_network */ + GtkWidget * + bookmarks_menu_new (TeletextView * view) + { + GtkMenuShell *menu; + GtkWidget *widget; ++ GtkWidget *top; ++ GtkAccelGroup *accel_group; + GList *glist; + + menu = GTK_MENU_SHELL (gtk_menu_new ()); + +- bookmarks_uiinfo[0].user_data = view; +- bookmarks_uiinfo[1].user_data = view; ++ accel_group = gtk_accel_group_new (); ++ gtk_menu_set_accel_group (GTK_MENU (menu), accel_group); ++ top = gtk_widget_get_toplevel (GTK_WIDGET (menu)); ++ if (gtk_widget_is_toplevel (top)) ++ gtk_window_add_accel_group (GTK_WINDOW (top), accel_group); ++ ++ widget = gtk_menu_item_new_with_mnemonic (_("_Add Bookmark")); ++ g_signal_connect (widget, "activate", ++ G_CALLBACK (on_add_bookmark_activate), view); ++ gtk_widget_add_accelerator (widget, "activate", accel_group, ++ GDK_KEY_D, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); ++ gtk_widget_show (widget); ++ gtk_menu_shell_append (menu, widget); + +- gnome_app_fill_menu (menu, +- bookmarks_uiinfo, +- /* accel */ NULL, +- /* mnemo */ TRUE, +- /* position */ 0); ++ widget = gtk_menu_item_new_with_mnemonic (_("_Edit Bookmarks...")); ++ g_signal_connect (widget, "activate", ++ G_CALLBACK (on_edit_bookmarks_activate), view); ++ gtk_widget_add_accelerator (widget, "activate", accel_group, ++ GDK_KEY_B, GDK_CONTROL_MASK, GTK_ACCEL_VISIBLE); ++ gtk_widget_show (widget); ++ gtk_menu_shell_append (menu, widget); + + if (!bookmarks.bookmarks) + return GTK_WIDGET (menu); +@@ -413,12 +411,12 @@ + if (b->description && *b->description) + { + menu_item = z_gtk_pixmap_menu_item_new (b->description, +- GTK_STOCK_JUMP_TO); +- z_tooltip_set (menu_item, buffer); ++ "go-jump"); ++ gtk_widget_set_tooltip_text (menu_item, buffer); + } + else + { +- menu_item = z_gtk_pixmap_menu_item_new (buffer, GTK_STOCK_JUMP_TO); ++ menu_item = z_gtk_pixmap_menu_item_new (buffer, "go-jump"); + } + + gtk_widget_show (menu_item); +@@ -520,8 +518,10 @@ + on_cancel_clicked (GtkWidget * widget, + gpointer user_data _unused_) + { +- while (widget->parent) +- widget = widget->parent; ++ GtkWidget *parent; ++ ++ while ((parent = gtk_widget_get_parent (widget))) ++ widget = parent; + + gtk_widget_destroy (widget); + } +@@ -594,10 +594,11 @@ + window = GTK_WINDOW (sp); + gtk_window_set_title (window, _("Bookmarks")); + +- widget = gtk_vbox_new (FALSE, 3); ++ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_container_set_border_width (GTK_CONTAINER (widget), 6); + vbox = GTK_BOX (widget); +- gtk_box_pack_start (GTK_BOX (sp->dialog.vbox), widget, TRUE, TRUE, 0); ++ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (&sp->dialog)), ++ widget, TRUE, TRUE, 0); + + scrolled_window = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolled_window), +@@ -651,7 +652,7 @@ + g_signal_connect (renderer, "edited", + G_CALLBACK (on_descr_cell_edited), sp); + +- widget = gtk_button_new_from_stock (GTK_STOCK_REMOVE); ++ widget = gtk_button_new_with_label (_("_Remove")); + sp->remove = widget; + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 0); + gtk_widget_set_sensitive (widget, FALSE); +@@ -659,16 +660,16 @@ + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_remove_clicked), sp); + +- widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ++ widget = gtk_button_new_with_label (_("_Cancel")); + gtk_dialog_add_action_widget (&sp->dialog, widget, 1); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_cancel_clicked), sp); + +- widget = gtk_button_new_from_stock (GTK_STOCK_OK); ++ widget = gtk_button_new_with_label (_("_OK")); + gtk_dialog_add_action_widget (&sp->dialog, widget, 2); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_ok_clicked), sp); +--- zapping.orig/src/x11stuff.c ++++ zapping/src/x11stuff.c +@@ -60,21 +60,13 @@ + _XA ## name = XInternAtom (display, #name, /* only_if_exists */ False) + + /* +- * Returns a pointer to the data contained in the given GdkImage +- */ +-gpointer +-x11_get_data(GdkImage * image) +-{ +- return (image -> mem); +-} +- +-/* + * Returns the byte order of the X server + */ + GdkByteOrder + x11_get_byte_order(void) + { +- if (ImageByteOrder(GDK_DISPLAY()) == LSBFirst) ++ if (ImageByteOrder (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ())) ++ == LSBFirst) + return GDK_LSB_FIRST; + + return GDK_MSB_FIRST; +@@ -86,34 +78,33 @@ + gint + x11_get_bpp(void) + { +- GdkImage * tmp_image; ++ cairo_surface_t * tmp_image; + static gint depth = -1; + + if (depth > 0) + return depth; + +- tmp_image = +- gdk_image_new(GDK_IMAGE_FASTEST, gdk_visual_get_system(), 16, 16); ++ tmp_image = cairo_image_surface_create (CAIRO_FORMAT_A1, 16, 16); + + if (!tmp_image) + return -1; + +- depth = tmp_image->depth; ++ depth = gdk_visual_get_depth (gdk_screen_get_system_visual ++ (gdk_screen_get_default ())); + + if (depth == 24 && +- tmp_image->bpp == 4) ++ cairo_image_surface_get_stride (tmp_image) == 4) + depth = 32; + +- g_object_unref (G_OBJECT (tmp_image)); ++ cairo_surface_destroy (tmp_image); + + return depth; + } + +-/* to be replaced by 2.2 gdk_display_get_name() */ + const gchar * + x11_display_name (void) + { +- return (const gchar *) DisplayString (GDK_DISPLAY()); ++ return gdk_display_get_name (gdk_display_get_default ()); + } + + +@@ -152,7 +143,7 @@ + x11_force_expose(gint x, gint y, guint w, guint h) + { + XErrorHandler old_error_handler; +- Display *dpy = GDK_DISPLAY(); ++ Display *dpy = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + XSetWindowAttributes xswa; + Window win; + unsigned long mask; +@@ -239,8 +230,8 @@ + + old_error_handler = XSetErrorHandler (x11_error_handler); + +- XGetWindowAttributes (GDK_DISPLAY (), +- GDK_WINDOW_XWINDOW (window), ++ XGetWindowAttributes (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ GDK_WINDOW_XID (window), + &wts); + + XSetErrorHandler (old_error_handler); +@@ -322,16 +313,13 @@ + { + GdkWindow *toplevel; + +- if (window->frame) +- toplevel = window->frame; +- else +- toplevel = GTK_WIDGET (window)->window; ++ toplevel = gtk_widget_get_window (GTK_WIDGET (window)); + + g_assert (toplevel != NULL); +- g_assert (GTK_WIDGET_MAPPED (window)); ++ g_assert (gtk_widget_get_mapped (GTK_WIDGET (window))); + + send_event (GDK_WINDOW_XDISPLAY (toplevel), +- GDK_WINDOW_XWINDOW (toplevel), ++ GDK_WINDOW_XID (toplevel), + message_type, + l0, l1); + } +@@ -396,14 +384,6 @@ + gboolean on) + = dummy_window_something; + +-static GdkFilterReturn +-wm_event_handler (GdkXEvent * xevent _unused_, +- GdkEvent * event _unused_, +- gpointer data _unused_) +-{ +- return GDK_FILTER_REMOVE; /* ignore */ +-} +- + /* www.freedesktop.org/standards */ + + enum { +@@ -490,6 +470,25 @@ + 0); + } + ++static GdkFilterReturn ++wm_event_handler (GdkXEvent * xevent, ++ GdkEvent * event _unused_, ++ gpointer data _unused_) ++{ ++ XClientMessageEvent *evt; ++ ++ if (((XEvent *)xevent)->type != ClientMessage) ++ return GDK_FILTER_CONTINUE; ++ ++ evt = (XClientMessageEvent *)xevent; ++ ++ if (evt->message_type == _XA_NET_WM_STATE ++ || evt->message_type == _XA_WIN_LAYER) ++ return GDK_FILTER_REMOVE; /* ignore */ ++ ++ return GDK_FILTER_CONTINUE; ++} ++ + /** + * wm_hints_detect: + * Check if we can tell the WM to keep a window on top of other windows. +@@ -554,9 +553,7 @@ + + XSetErrorHandler (old_error_handler); + +- gdk_add_client_message_filter +- (gdk_x11_xatom_to_atom (_XA_NET_WM_STATE), +- wm_event_handler, 0); ++ gdk_window_add_filter (NULL, wm_event_handler, NULL); + + return TRUE; + } +@@ -599,9 +596,7 @@ + + XSetErrorHandler (old_error_handler); + +- gdk_add_client_message_filter +- (gdk_x11_xatom_to_atom (_XA_WIN_LAYER), +- wm_event_handler, 0); ++ gdk_window_add_filter (NULL, wm_event_handler, NULL); + + return TRUE; + } +@@ -755,7 +750,7 @@ + x11_vidmode_info *list; + int i; + +- display = GDK_DISPLAY (); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + list = NULL; + mode_info = NULL; +@@ -1528,7 +1523,7 @@ + static gboolean + screensaver_timeout (gpointer unused _unused_) + { +- Display *display = GDK_DISPLAY (); ++ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + Window window = 0; + gboolean have_xss; + +@@ -1598,7 +1593,7 @@ + void + x11_screensaver_set (unsigned int level) + { +- Display *display = GDK_DISPLAY (); ++ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + if (X11STUFF_SCREENSAVER_DEBUG) + printv ("x11_screensaver_set (level=%d) enabled=%d dpms=%d\n", +@@ -1691,7 +1686,7 @@ + void + x11_screensaver_init (void) + { +- Display *display = GDK_DISPLAY (); ++ Display *display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + #ifdef HAVE_DPMS_EXTENSION + int event_base, error_base; + int major_version, minor_version; +@@ -2067,7 +2062,7 @@ + + r = FALSE; + +- display = GDK_DISPLAY (); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + old_error_handler = XSetErrorHandler (x11_error_handler); + +--- zapping.orig/src/x11stuff.h ++++ zapping/src/x11stuff.h +@@ -31,12 +31,6 @@ + #include "libtv/screen.h" + + /* +- * Returns a pointer to the data contained in the given GdkImage +- */ +-gpointer +-x11_get_data(GdkImage * image); +- +-/* + * Returns the byte order of the X server + */ + GdkByteOrder +--- zapping.orig/plugins/subtitle/view.h ++++ zapping/plugins/subtitle/view.h +@@ -152,7 +152,7 @@ + struct subt_image display_scaled; + + /* Non-transparent parts of darea. */ +- GdkRegion * region; ++ cairo_region_t * region; + + /* Closed Caption rolling. */ + +--- zapping.orig/src/zimage.h ++++ zapping/src/zimage.h +@@ -39,7 +39,7 @@ + const char *name; + /* Set blit destination. Grabbing, if necessary, should only happen + when creating new images */ +- void (*set_destination)(GdkWindow *window, GdkGC *gc, ++ void (*set_destination)(GdkWindow *window, cairo_t *cr, + tveng_device_info *info); + /* Unsets a previously set blit destination */ + void (*unset_destination)(tveng_device_info *info); +@@ -82,7 +82,7 @@ + void zimage_blit (zimage *image); + + /* Sets the given widget as the blit destination */ +-void video_init (GtkWidget *widget, GdkGC *gc); ++void video_init (GtkWidget *widget, cairo_t *cr); + + /* Unsets any previously set destination window */ + void video_uninit (void); +--- zapping.orig/plugins/alirc/alirc.c ++++ zapping/plugins/alirc/alirc.c +@@ -53,6 +53,7 @@ + + /* global lirc config struct */ + static struct lirc_config *config = NULL; ++static GIOChannel *channel = NULL; + /* lirc io_tag */ + static guint lirc_iotag; + /* our link to the device struct */ +@@ -86,7 +87,7 @@ + * Side effects: OSD, digits combine within timeout, + * numbers are interpreted as RF channel or channel name. + */ +- event.keyval = GDK_KP_0 + n; ++ event.keyval = GDK_KEY_KP_0 + n; + + channel_key_press (&event); + } +@@ -174,7 +175,9 @@ + if (!active) + return; + /* stop it, we were active so */ +- gtk_input_remove(lirc_iotag); ++ g_source_remove (lirc_iotag); ++ g_io_channel_shutdown (channel, FALSE, NULL); ++ g_io_channel_unref (channel); + lirc_freeconfig(config); + printv("alirc: Freed config struct\n"); + lirc_deinit(); +@@ -183,8 +186,10 @@ + active = FALSE; + } + +-static void +-lirc_receive(gpointer *data _unused_, int fd _unused_) { ++static gboolean ++lirc_receive (GIOChannel *channel _unused_, GIOCondition cond _unused_, ++ gpointer data _unused_) ++{ + /* activity on the lirc socket, so let's check */ + char *string; + char *command; +@@ -192,6 +197,8 @@ + printv("alirc: Eeek somethings wrong with lirc\n"); + printv("alirc: Stopping plugin\n"); + plugin_stop(); ++ ++ return FALSE; + } + printv("->Received from lirc: %s",string); + +@@ -201,6 +208,7 @@ + lirc_code2char(config,string,&command); + } + ++ return TRUE; + } + + /* +@@ -261,10 +269,11 @@ + } + printv("alirc: Successfully initialize\n"); + +- lirc_iotag = gtk_input_add_full (fd, +- GDK_INPUT_READ, +- (GdkInputFunction) +- lirc_receive, NULL, NULL, NULL); ++ channel = g_io_channel_unix_new (fd); ++ lirc_iotag = g_io_add_watch_full (channel, ++ G_PRIORITY_HIGH, ++ G_IO_IN, ++ lirc_receive, NULL, NULL); + /* If everything has been ok, set the active flags and return TRUE + */ + active = TRUE; +--- zapping.orig/plugins/teletext/export.c ++++ zapping/plugins/teletext/export.c +@@ -78,22 +78,69 @@ + } + + static void +-on_menu_activate (GtkWidget * menu_item, ++on_button_clicked (GtkButton *button, ExportDialog *sp) ++{ ++ GtkWidget *dialog; ++ GtkFileChooser *chooser; ++ gint response; ++ ++ dialog = gtk_file_chooser_dialog_new (_("Select file"), ++ GTK_WINDOW (&sp->dialog), ++ GTK_FILE_CHOOSER_ACTION_SAVE, ++ _("_Cancel"), GTK_RESPONSE_CANCEL, ++ _("_OK"), GTK_RESPONSE_ACCEPT, ++ NULL); ++ chooser = GTK_FILE_CHOOSER (dialog); ++ ++ if (sp->entry) ++ gtk_file_chooser_set_filename (chooser, ++ gtk_entry_get_text (GTK_ENTRY (sp->entry))); ++ ++ response = gtk_dialog_run (GTK_DIALOG (dialog)); ++ ++ if (response == GTK_RESPONSE_ACCEPT) ++ { ++ gchar *file; ++ ++ file = gtk_file_chooser_get_filename (chooser); ++ gtk_entry_set_text (GTK_ENTRY (sp->entry), file); ++ g_free (file); ++ } ++ ++ gtk_widget_destroy (dialog); ++} ++ ++static void ++on_menu_activate (GtkComboBox * combobox, + ExportDialog * sp) + { + gchar *keyword; ++ gchar **combined; + GtkContainer *container; + GList *glist; + GtkWidget *table; ++ GtkTreeModel *model; ++ GtkTreeIter iter; ++ gint id; ++ ++ id = gtk_combo_box_get_id_column (GTK_COMBO_BOX (combobox)); ++ model = gtk_combo_box_get_model (combobox); ++ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (combobox), &iter); ++ gtk_tree_model_get (model, &iter, id, &keyword, -1); ++ combined = g_strsplit (keyword, "|", 2); ++ ++ g_assert (combined[0] != NULL); ++ zconf_set_string (combined[0], "/zapping/options/export_format"); + +- keyword = (gchar *) g_object_get_data (G_OBJECT (menu_item), "key"); +- g_assert (keyword != NULL); +- zconf_set_string (keyword, "/zapping/options/export_format"); ++ if (combined[1]) ++ gtk_widget_set_tooltip_text (GTK_WIDGET (combobox), combined[1]); + + if (sp->context) + vbi3_export_delete (sp->context); +- sp->context = vbi3_export_new (keyword, NULL); ++ sp->context = vbi3_export_new (combined[0], NULL); + g_assert (sp->context != NULL); ++ g_free (keyword); ++ g_strfreev (combined); + + /* Don't care if these fail */ + vbi3_export_option_set (sp->context, "network", sp->network); +@@ -122,7 +169,7 @@ + GtkWidget *box; + GtkWidget *frame; + +- box = gtk_hbox_new (/* homogeneous */ FALSE, /* spacing */ 0); ++ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, /* spacing */ 0); + gtk_container_add (GTK_CONTAINER (box), table); + gtk_container_set_border_width (GTK_CONTAINER (box), 6); + frame = gtk_frame_new (_("Options")); +@@ -136,8 +183,10 @@ + on_cancel_clicked (GtkWidget * widget, + gpointer user_data _unused_) + { +- while (widget->parent) +- widget = widget->parent; ++ GtkWidget *parent; ++ ++ while ((parent = gtk_widget_get_parent (widget))) ++ widget = parent; + + gtk_widget_destroy (widget); + } +@@ -238,19 +287,27 @@ + window = GTK_WINDOW (sp); + gtk_window_set_title (window, _("Save as")); + +- widget = gtk_vbox_new (FALSE, 3); ++ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_container_set_border_width (GTK_CONTAINER (widget), 6); + vbox = GTK_BOX (widget); +- gtk_box_pack_start (GTK_BOX (sp->dialog.vbox), widget, TRUE, TRUE, 0); ++ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (&sp->dialog)), ++ widget, TRUE, TRUE, 0); + +- file_entry = gnome_file_entry_new ("ttxview_export_id", NULL); +- gtk_widget_set_size_request (file_entry, 400, -1); +- sp->entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (file_entry)); ++ /* Replace GnomeFileEntry with GtkEntry + GtkButton that runs a ++ GtkFileChooserDialog. */ ++ file_entry = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++ gtk_box_pack_start (vbox, file_entry, FALSE, FALSE, 0); ++ sp->entry = gtk_entry_new (); ++ gtk_widget_set_size_request (sp->entry, 400, -1); + gtk_entry_set_activates_default (GTK_ENTRY (sp->entry), TRUE); ++ gtk_box_pack_start (GTK_BOX (file_entry), sp->entry, TRUE, TRUE, 0); ++ widget = gtk_button_new_with_mnemonic (_("_Browse...")); ++ g_signal_connect (widget, "clicked", G_CALLBACK (on_button_clicked), sp); ++ gtk_box_pack_start (GTK_BOX (file_entry), widget, TRUE, TRUE, 0); + gtk_box_pack_start (vbox, file_entry, FALSE, FALSE, 0); + + { +- widget = gtk_hbox_new (FALSE, 0); ++ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + hbox = GTK_BOX (widget); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 0); + +@@ -258,23 +315,19 @@ + gtk_misc_set_padding (GTK_MISC (widget), 3, 0); + gtk_box_pack_start (hbox, widget, FALSE, FALSE, 0); + +- sp->format_menu = gtk_option_menu_new (); ++ sp->format_menu = gtk_combo_box_text_new (); + gtk_box_pack_start (hbox, sp->format_menu, TRUE, TRUE, 0); + } + +- sp->option_box = gtk_hbox_new (FALSE, 0); ++ sp->option_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_box_pack_start (vbox, sp->option_box, TRUE, TRUE, 0); + + { +- GtkWidget *menu; + gchar *format; + const vbi3_export_info *xm; + guint count; + guint i; + +- menu = gtk_menu_new (); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (sp->format_menu), menu); +- + zconf_get_string (&format, "/zapping/options/export_format"); + + count = 0; +@@ -283,44 +336,51 @@ + { + if (xm->label && !xm->open_format) /* user module, not subtitles */ + { +- GtkWidget *menu_item; +- +- menu_item = gtk_menu_item_new_with_label (xm->label); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); ++ gchar *combined = NULL; ++ gchar *tooltip = NULL; + + if (xm->tooltip) +- z_tooltip_set (menu_item, xm->tooltip); ++ tooltip = g_strdup (xm->tooltip); + +- z_object_set_const_data (G_OBJECT (menu_item), "key", xm->keyword); ++ /* Combine both the keyword and the tooltip (if it exists) ++ into a single string. The original code used ++ g_object_set_const_data on GtkOptionMenu menu items but ++ this won't work since GtkComboBox entries are not ++ objects. */ ++ combined = g_strjoin ("|", xm->keyword, tooltip, NULL); ++ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (sp->format_menu), ++ combined, xm->label); + +- if (0 == count || (format && 0 == strcmp (xm->keyword, format))) +- { +- on_menu_activate (menu_item, sp); +- gtk_option_menu_set_history (GTK_OPTION_MENU (sp->format_menu), +- count); +- } ++ g_free (combined); ++ g_free (tooltip); + +- g_signal_connect (G_OBJECT (menu_item), "activate", +- G_CALLBACK (on_menu_activate), sp); ++ if (0 == count || (format && 0 == strcmp (xm->keyword, format))) ++ { ++ on_menu_activate (GTK_COMBO_BOX (sp->format_menu), sp); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (sp->format_menu), ++ count); ++ } + + ++count; + } + } + ++ g_signal_connect (G_OBJECT (sp->format_menu), "changed", ++ G_CALLBACK (on_menu_activate), sp); + g_free (format); + format = NULL; + } + +- widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ++ widget = gtk_button_new_with_label (_("_Cancel")); + gtk_dialog_add_action_widget (&sp->dialog, widget, 1); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_cancel_clicked), sp); + +- widget = gtk_button_new_from_stock (GTK_STOCK_OK); ++ widget = gtk_button_new_with_label (_("_OK")); + gtk_dialog_add_action_widget (&sp->dialog, widget, 2); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_ok_clicked), sp); +--- zapping.orig/plugins/teletext/window.h ++++ zapping/plugins/teletext/window.h +@@ -24,7 +24,7 @@ + #ifndef TELETEXT_WINDOW_H + #define TELETEXT_WINDOW_H + +-#include ++#include + #include "view.h" + + G_BEGIN_DECLS +@@ -46,7 +46,7 @@ + + struct _TeletextWindow + { +- GnomeApp app; ++ GtkWindow app; + + GtkActionGroup * action_group; + +@@ -73,7 +73,7 @@ + + struct _TeletextWindowClass + { +- GnomeAppClass parent_class; ++ GtkWindowClass parent_class; + }; + + extern GType +--- zapping.orig/plugins/teletext/main.c ++++ zapping/plugins/teletext/main.c +@@ -133,12 +133,11 @@ + height = 200; + + if (view) +- gdk_window_get_geometry (GTK_WIDGET (view)->window, ++ gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (view)), + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + widget = teletext_window_new (); + window = TELETEXT_WINDOW (widget); +@@ -149,7 +148,7 @@ + + z_update_gui (); + +- gdk_window_resize (widget->window, width, height); ++ gdk_window_resize (gtk_widget_get_window (widget), width, height); + + gtk_widget_show (widget); + +--- zapping.orig/plugins/teletext/preferences.c ++++ zapping/plugins/teletext/preferences.c +@@ -156,7 +156,7 @@ + gtk_widget_show (widget); + + if (tooltip) +- z_tooltip_set (widget, tooltip); ++ gtk_widget_set_tooltip_text (widget, tooltip); + + gtk_table_attach (table, widget, + INDENT_COL + 1, INDENT_COL + 2, +@@ -236,7 +236,7 @@ + } + + static void +-on_control_changed (GtkWidget * adj, ++on_control_changed (GtkAdjustment * adj, + gpointer user_data) + { + gint value; +@@ -244,13 +244,13 @@ + switch (GPOINTER_TO_INT (user_data)) + { + case 0: +- value = GTK_ADJUSTMENT (adj)->value; ++ value = gtk_adjustment_get_value (adj); + /* Error ignored. */ + z_gconf_set_int (GCONF_DIR "/view/brightness", SATURATE (value, 0, 255)); + break; + + case 1: +- value = GTK_ADJUSTMENT (adj)->value; ++ value = gtk_adjustment_get_value (adj); + /* Error ignored. */ + z_gconf_set_int (GCONF_DIR "/view/contrast", + SATURATE (value, -128, +127)); +@@ -280,7 +280,7 @@ + GError *error = NULL; + GtkWidget *hbox; + GtkWidget *widget; +- GtkObject *adj; ++ GtkAdjustment *adj; + guint row; + gint value; + +@@ -314,7 +314,7 @@ + + attach_label (&prefs->table, row, _("_Size:")); + +- hbox = gtk_hbox_new (/* homogeneous */ FALSE, /* spacing */ 0); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, /* spacing */ 0); + gtk_widget_show (hbox); + gtk_box_set_spacing (GTK_BOX (hbox), 6); + gtk_table_attach (&prefs->table, hbox, +--- zapping.orig/plugins/teletext/search.c ++++ zapping/plugins/teletext/search.c +@@ -83,7 +83,8 @@ + va_list args; + + #if 1 +- gdk_window_set_cursor (GTK_WIDGET (sp)->window, cursor_normal); ++ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (sp)), ++ cursor_normal); + gtk_widget_set_sensitive (GTK_WIDGET (sp), TRUE); + #else + gtk_widget_set_sensitive (sp->entry, TRUE); +@@ -116,7 +117,8 @@ + gboolean call_again; + + #if 1 +- gdk_window_set_cursor (GTK_WIDGET (sp)->window, cursor_busy); ++ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (sp)), ++ cursor_busy); + gtk_widget_set_sensitive (GTK_WIDGET (sp), FALSE); + #else + gtk_widget_set_sensitive (sp->entry, FALSE); +@@ -341,18 +343,20 @@ + window = GTK_WINDOW (t); + gtk_window_set_title (window, _("Search page memory")); + +- widget = gtk_vbox_new (FALSE, 0); ++ widget = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + vbox = GTK_BOX (widget); + gtk_container_set_border_width (GTK_CONTAINER (widget), 6); +- gtk_box_pack_start (GTK_BOX (t->dialog.vbox), widget, TRUE, TRUE, 0); ++ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (&t->dialog)), ++ widget, TRUE, TRUE, 0); + +- widget = gtk_label_new (_("Search text:")); +- t->label = GTK_LABEL (widget); ++ /* There's no direct replacement for GnomeEntry, so sacrifice the ++ history. */ ++ t->entry = gtk_entry_new (); ++ gtk_entry_set_activates_default (GTK_ENTRY (t->entry), TRUE); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + +- widget = gnome_entry_new ("ure_search_history"); +- t->entry = gnome_entry_gtk_entry (GNOME_ENTRY (widget)); +- gtk_entry_set_activates_default (GTK_ENTRY (t->entry), TRUE); ++ widget = gtk_label_new (_("Search text:")); ++ t->label = GTK_LABEL (widget); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + + widget = z_gconf_check_button_new (_("_Regular expression"), +@@ -372,28 +376,28 @@ + gtk_widget_set_sensitive (widget, FALSE); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + +- widget = gtk_button_new_from_stock (GTK_STOCK_HELP); ++ widget = gtk_button_new_from_icon_name ("help-browser", GTK_ICON_SIZE_BUTTON); + gtk_dialog_add_action_widget (&t->dialog, widget, GTK_RESPONSE_HELP); + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_help_clicked), t); + +- widget = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ++ widget = gtk_button_new_with_mnemonic (_("_Cancel")); + gtk_dialog_add_action_widget (&t->dialog, widget, GTK_RESPONSE_CANCEL); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_cancel_clicked), t); + +- widget = gtk_button_new_from_stock (GTK_STOCK_GO_BACK); ++ widget = gtk_button_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON); + t->back = widget; + gtk_dialog_add_action_widget (&t->dialog, widget, SEARCH_RESPONSE_BACK); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_prev_clicked), t); + +- widget = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); ++ widget = gtk_button_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON); + t->forward = widget; + gtk_dialog_add_action_widget (&t->dialog, widget, SEARCH_RESPONSE_FORWARD); +- GTK_WIDGET_SET_FLAGS (widget, GTK_CAN_DEFAULT); ++ gtk_widget_set_can_default (widget, TRUE); + g_signal_connect (G_OBJECT (widget), "clicked", + G_CALLBACK (on_next_clicked), t); + +@@ -422,14 +426,16 @@ + gpointer class_data _unused_) + { + GObjectClass *object_class; ++ GdkDisplay *display; + + object_class = G_OBJECT_CLASS (g_class); + parent_class = g_type_class_peek_parent (object_class); + + object_class->finalize = instance_finalize; + +- cursor_normal = gdk_cursor_new (GDK_LEFT_PTR); +- cursor_busy = gdk_cursor_new (GDK_WATCH); ++ display = gdk_display_get_default (); ++ cursor_normal = gdk_cursor_new_for_display (display, GDK_LEFT_PTR); ++ cursor_busy = gdk_cursor_new_for_display (display, GDK_WATCH); + } + + GType +--- zapping.orig/plugins/teletext/toolbar.c ++++ zapping/plugins/teletext/toolbar.c +@@ -85,13 +85,19 @@ + + gtk_container_add (GTK_CONTAINER (button), icon); + gtk_button_set_relief (GTK_BUTTON (button), relief_style); +- z_tooltip_set (button, tooltip); ++ gtk_widget_set_tooltip_text (button, tooltip); + + z_signal_connect_python (G_OBJECT (button), "clicked", py_cmd); + + return button; + } + ++static void ++cb_widget_destroy (GtkWidget *widget, gpointer data) ++{ ++ gtk_widget_destroy (widget); ++} ++ + /* XXX How can we do this with GtkActions? */ + + static void +@@ -100,19 +106,13 @@ + TeletextToolbar * t) + { + GtkReliefStyle button_relief; +- GList *glist; + GtkWidget *up; + GtkWidget *down; + GtkWidget *left; + GtkWidget *right; + +- while ((glist = t->box1->children)) +- gtk_container_remove (GTK_CONTAINER (t->box1), +- ((GtkBoxChild *) glist->data)->widget); +- +- while ((glist = t->box2->children)) +- gtk_container_remove (GTK_CONTAINER (t->box2), +- ((GtkBoxChild *) glist->data)->widget); ++ gtk_container_foreach (GTK_CONTAINER (t->box1), cb_widget_destroy, NULL); ++ gtk_container_foreach (GTK_CONTAINER (t->box2), cb_widget_destroy, NULL); + + button_relief = GTK_RELIEF_NORMAL; + gtk_widget_style_get (GTK_WIDGET (toolbar), "button_relief", +@@ -184,8 +184,10 @@ + gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); + + /* XXX should use NewTeletextView action. */ +- tool_item = gtk_tool_button_new_from_stock (GTK_STOCK_NEW); +- z_tooltip_set (GTK_WIDGET (tool_item), _("Open new Teletext window")); ++ tool_item = gtk_tool_button_new (NULL, "_New"); ++ gtk_tool_button_set_icon_name (GTK_TOOL_BUTTON (tool_item), "document-new"); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), ++ _("Open new Teletext window")); + z_signal_connect_python (tool_item, "clicked", + "zapping.ttx_open_new()"); + gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); +@@ -194,7 +196,7 @@ + (gtk_action_group_get_action (action_group, "Search")); + gtk_toolbar_insert (&toolbar->toolbar, GTK_TOOL_ITEM (widget), APPEND); + +- widget = gtk_hbox_new (FALSE, 0); ++ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + tool_item = gtk_tool_item_new (); + gtk_container_add (GTK_CONTAINER (tool_item), widget); + gtk_widget_show_all (GTK_WIDGET (tool_item)); +@@ -207,7 +209,8 @@ + widget = gtk_toggle_button_new (); + tool_item = gtk_tool_item_new (); + gtk_container_add (GTK_CONTAINER (tool_item), widget); +- z_tooltip_set (GTK_WIDGET (tool_item), _("Hold the current subpage")); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), ++ _("Hold the current subpage")); + gtk_widget_show_all (GTK_WIDGET (tool_item)); + toolbar->hold = GTK_TOGGLE_BUTTON (widget); + gtk_button_set_relief (GTK_BUTTON (widget), button_relief); +@@ -226,7 +229,7 @@ + gtk_container_add (GTK_CONTAINER (frame), widget); + } + +- widget = gtk_hbox_new (FALSE, 0); ++ widget = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + tool_item = gtk_tool_item_new (); + gtk_container_add (GTK_CONTAINER (tool_item), widget); + gtk_widget_show_all (GTK_WIDGET (tool_item)); +@@ -238,7 +241,8 @@ + toolbar->reveal = GTK_TOGGLE_TOOL_BUTTON (tool_item); + gtk_tool_button_set_icon_widget (GTK_TOOL_BUTTON (tool_item), widget); + gtk_tool_button_set_label (GTK_TOOL_BUTTON (tool_item), _("Reveal")); +- z_tooltip_set (GTK_WIDGET (tool_item), _("Reveal concealed text")); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (tool_item), ++ _("Reveal concealed text")); + gtk_widget_show_all (GTK_WIDGET (tool_item)); + gtk_toggle_tool_button_set_active (toolbar->reveal, FALSE); + gtk_toolbar_insert (&toolbar->toolbar, tool_item, APPEND); +@@ -249,7 +253,8 @@ + G_CALLBACK (on_orientation_changed), toolbar); + + on_orientation_changed (&toolbar->toolbar, +- gtk_toolbar_get_orientation (&toolbar->toolbar), ++ gtk_orientable_get_orientation ++ (GTK_ORIENTABLE (&toolbar->toolbar)), + toolbar); + + return GTK_WIDGET (toolbar); +--- zapping.orig/plugins/teletext/view.c ++++ zapping/plugins/teletext/view.c +@@ -91,9 +91,9 @@ + + static const GtkTargetEntry + clipboard_targets [] = { +- { "STRING", 0, TARGET_LAT1_STRING }, +- { "UTF8_STRING", 0, TARGET_UTF8_STRING }, +- { "PIXMAP", 0, TARGET_PIXMAP }, ++ { (gchar *) "STRING", 0, TARGET_LAT1_STRING }, ++ { (gchar *) "UTF8_STRING", 0, TARGET_UTF8_STRING }, ++ { (gchar *) "PIXMAP", 0, TARGET_PIXMAP }, + }; + + +@@ -107,8 +107,7 @@ + + static void + draw_scaled_page_image (TeletextView * view, +- GdkDrawable * drawable, +- GdkGC * gc, ++ cairo_t * cr, + gint src_x, + gint src_y, + gint dest_x, +@@ -125,14 +124,11 @@ + sw = gdk_pixbuf_get_width (view->scaled_on); + sh = gdk_pixbuf_get_height (view->scaled_on); + +- gdk_draw_pixbuf (/* dst */ drawable, gc, +- /* src */ view->scaled_on, +- src_x, src_y, +- dest_x, dest_y, +- MIN (width, sw), +- MIN (height, sh), +- GDK_RGB_DITHER_NORMAL, +- /* dither offset */ src_x, src_y); ++ cairo_save (cr); ++ gdk_cairo_set_source_pixbuf (cr, view->scaled_on, src_x, src_y); ++ cairo_rectangle (cr, dest_x, dest_y, MIN (width, sw), MIN (height, sh)); ++ cairo_fill (cr); ++ cairo_restore (cr); + } + + /* This whole patch stuff is overkill. It would probably suffice to create +@@ -249,15 +245,12 @@ + apply_patches (TeletextView * view, + gboolean draw) + { +- GdkWindow *window; + struct ttx_patch *p; + struct ttx_patch *end; + + if (!view->pg) + return; + +- window = GTK_WIDGET (view)->window; +- + end = view->patches + view->n_patches; + + for (p = view->patches; p < end; ++p) +@@ -290,9 +283,6 @@ + { + z_pixbuf_copy_area (/* src */ scaled, p->sx, p->sy, p->sw, p->sh, + /* dst */ view->scaled_on, p->dx, p->dy); +- +- if (draw) +- gdk_window_clear_area_e (window, p->dx, p->dy, p->sw, p->sh); + } + } + } +@@ -834,11 +824,16 @@ + gint x; + gint y; + GdkModifierType mask; ++ GdkWindow *window; ++ GdkSeat *seat; + vbi3_link link; + gchar *buffer; + gboolean success; + +- gdk_window_get_pointer (GTK_WIDGET (view)->window, &x, &y, &mask); ++ window = gtk_widget_get_window (GTK_WIDGET (view)); ++ seat = gdk_display_get_default_seat (gdk_window_get_display (window)); ++ gdk_window_get_device_position (window, gdk_seat_get_pointer (seat), ++ &x, &y, &mask); + + link.type = VBI3_LINK_NONE; + +@@ -866,14 +861,14 @@ + view->cursor_over_link = TRUE; + + if (view->appbar) +- gnome_appbar_push (GNOME_APPBAR (view->appbar), buffer); ++ gtk_statusbar_push (view->appbar, 0, buffer); + +- gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_link); ++ gdk_window_set_cursor (window, cursor_link); + } + else + { + if (view->appbar) +- gnome_appbar_set_status (GNOME_APPBAR (view->appbar), buffer); ++ gtk_statusbar_push (view->appbar, 0, buffer); + } + + g_free (buffer); +@@ -886,9 +881,9 @@ + view->cursor_over_link = FALSE; + + if (view->appbar) +- gnome_appbar_pop (GNOME_APPBAR (view->appbar)); ++ gtk_statusbar_pop (view->appbar, 0); + +- gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_normal); ++ gdk_window_set_cursor (window, cursor_normal); + } + + break; +@@ -920,22 +915,18 @@ + + apply_patches (view, /* draw */ FALSE); + +- if (!(window = GTK_WIDGET (view)->window)) ++ if (!(window = gtk_widget_get_window (GTK_WIDGET (view)))) + return FALSE; + + gdk_window_get_geometry (window, + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + /* XXX if we have rolling header and this is an old page from + cache we'll show an old header. */ + +- /* Trigger expose event for later redrawing. */ +- gdk_window_clear_area_e (window, 0, 0, width, height); +- + if ((pg = view->pg)) + { + if (view->toolbar) +@@ -1470,7 +1461,7 @@ + buffer = g_strdup_printf ("Invalid page %X.%X", pgno, subno); + } + +- gnome_appbar_set_status (view->appbar, buffer); ++ gtk_statusbar_push (view->appbar, 0, buffer); + + g_free (buffer); + } +@@ -1519,7 +1510,7 @@ + teletext_toolbar_set_url (view->toolbar, pg->pgno, pg->subno); + + if (view->appbar) +- gnome_appbar_set_status (view->appbar, ""); ++ gtk_statusbar_remove_all (view->appbar, 0); + + gtk_widget_grab_focus (GTK_WIDGET (view)); + +@@ -1554,7 +1545,7 @@ + while (!(view = (TeletextView *) + g_object_get_data (G_OBJECT (widget), "TeletextView"))) + { +- if (!(widget = widget->parent)) ++ if (!(widget = gtk_widget_get_parent (widget))) + return NULL; + } + +@@ -1577,7 +1568,7 @@ + break; + } + +- parent = parent->parent; ++ parent = gtk_widget_get_parent (parent); + } + } + +@@ -1603,15 +1594,14 @@ + if (!(pg = view->pg)) + return FALSE; + +- if (!(window = GTK_WIDGET (view)->window)) ++ if (!(window = gtk_widget_get_window (GTK_WIDGET (view)))) + return FALSE; + + gdk_window_get_geometry (window, + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + if (width <= 0 || height <= 0) + return FALSE; +@@ -1928,11 +1918,10 @@ + guint time _unused_) + { + TeletextView *view = TELETEXT_VIEW (widget); ++ GdkAtom seltype = gtk_selection_data_get_data_type (selection_data); + +- if ((selection_data->selection == GDK_SELECTION_PRIMARY +- && view->select.in_selection) +- || (selection_data->selection == GA_CLIPBOARD +- && view->select.in_clipboard)) ++ if ((seltype == GDK_SELECTION_PRIMARY && view->select.in_selection) ++ || (seltype == GA_CLIPBOARD && view->select.in_clipboard)) + { + switch (info) + { +@@ -1985,8 +1974,10 @@ + const gint cell_height = 10; + gint width; + gint height; +- GdkPixmap *pixmap; ++ cairo_t *cr; ++ cairo_surface_t *surface; + GdkPixbuf *pixbuf; ++ GdkWindow *window; + gint id[2]; + vbi3_image_format format; + vbi3_bool success; +@@ -1998,16 +1989,17 @@ + width = view->select.column2 - view->select.column1 + 1; + height = view->select.row2 - view->select.row1 + 1; + +- pixmap = gdk_pixmap_new (GTK_WIDGET (view)->window, +- width * cell_width, +- height * cell_height, +- -1 /* same depth as window */); +- +- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, +- /* has_alpha */ TRUE, +- /* bits_per_sample */ 8, +- width * cell_width, +- height * cell_height); ++ window = gtk_widget_get_window (GTK_WIDGET (view)); ++ surface ++ = gdk_window_create_similar_image_surface (window, ++ CAIRO_CONTENT_COLOR_ALPHA, ++ width * cell_width, ++ height * cell_height, ++ 0); ++ ++ pixbuf = gdk_pixbuf_get_from_surface (surface, 0, 0, ++ width * cell_width, ++ height * cell_height); + + CLEAR (format); + +@@ -2035,22 +2027,20 @@ + + g_assert (success); + +- gdk_draw_pixbuf (pixmap, +- GTK_WIDGET (view)->style->white_gc, +- pixbuf, +- /* src */ 0, 0, +- /* dst */ 0, 0, +- gdk_pixbuf_get_width (pixbuf), +- gdk_pixbuf_get_height (pixbuf), +- GDK_RGB_DITHER_NORMAL, +- /* dither */ 0, 0); ++ cr = cairo_create (surface); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); ++ cairo_rectangle (cr, 0, 0, gdk_pixbuf_get_width (pixbuf), ++ gdk_pixbuf_get_height (pixbuf)); ++ cairo_fill (cr); ++ cairo_destroy (cr); + +- id[0] = GDK_WINDOW_XWINDOW (pixmap); ++ id[0] = GDK_WINDOW_XID (window); + + gtk_selection_data_set (selection_data, + GDK_SELECTION_TYPE_PIXMAP, 32, + (void * ) id, 4); + ++ cairo_surface_destroy (surface); + g_object_unref (pixbuf); + + break; +@@ -2076,10 +2066,9 @@ + gint width, height; /* window */ + gint columns, rows; /* page */ + +- gdk_window_get_geometry (GTK_WIDGET (view)->window, ++ gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (view)), + NULL, NULL, +- &width, &height, +- NULL); ++ &width, &height); + + *pcols = columns = view->pg->columns; + *prows = rows = view->pg->rows; +@@ -2115,7 +2104,7 @@ + /* Calculates a rectangle, scaling from text coordinates + to window coordinates. */ + static void +-scale_rect (GdkRectangle * rect, ++scale_rect (cairo_rectangle_int_t *rect, + gint x1, + gint y1, + gint x2, +@@ -2148,23 +2137,23 @@ + gint dx2, + gint dy2, + gboolean dtable, +- GdkRegion * exposed) ++ cairo_region_t * exposed) + { + gint width, height; /* window */ + gint columns, rows; /* page */ +- GdkRectangle rect; +- GdkRegion *src_region; +- GdkRegion *dst_region; ++ cairo_rectangle_int_t rect; ++ cairo_region_t *src_region; ++ cairo_region_t *dst_region; + +- gdk_window_get_geometry (GTK_WIDGET (view)->window, ++ gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (view)), + NULL, NULL, +- &width, &height, +- NULL); ++ &width, &height); + + columns = view->pg->columns; + rows = view->pg->rows; + +- gdk_gc_set_clip_origin (view->select.xor_gc, 0, 0); ++ cairo_translate (view->select.xor_gc, 0, 0); ++ cairo_clip (view->select.xor_gc); + + { + gboolean h1, h2, h3, h4; +@@ -2190,7 +2179,7 @@ + sx2, sy2 + h4, + width, height, + rows, columns); +- src_region = gdk_region_rectangle (&rect); ++ src_region = cairo_region_create_rectangle (&rect); + } + else + { +@@ -2199,14 +2188,14 @@ + columns - 1, sy1 + h2, + width, height, + rows, columns); +- src_region = gdk_region_rectangle (&rect); ++ src_region = cairo_region_create_rectangle (&rect); + + scale_rect (&rect, + 0, sy2 - h3, + sx2, sy2 + h4, + width, height, + rows, columns); +- gdk_region_union_with_rect (src_region, &rect); ++ cairo_region_union_rectangle (src_region, &rect); + + sy1 += h2 + 1; + sy2 -= h3 + 1; +@@ -2218,7 +2207,7 @@ + columns - 1, sy2, + width, height, + rows, columns); +- gdk_region_union_with_rect (src_region, &rect); ++ cairo_region_union_rectangle (src_region, &rect); + } + } + } +@@ -2252,7 +2241,7 @@ + dx2, dy2, + width, height, + rows, columns); +- dst_region = gdk_region_rectangle (&rect); ++ dst_region = cairo_region_create_rectangle (&rect); + } + else + { +@@ -2261,14 +2250,14 @@ + columns - 1, dy1 + h2, + width, height, + rows, columns); +- dst_region = gdk_region_rectangle (&rect); ++ dst_region = cairo_region_create_rectangle (&rect); + + scale_rect (&rect, + 0, dy2 - h3, + dx2, dy2 + h4, + width, height, + rows, columns); +- gdk_region_union_with_rect (dst_region, &rect); ++ cairo_region_union_rectangle (dst_region, &rect); + + view->select.column1 = dx1; + view->select.row1 = dy1 + h2; +@@ -2285,36 +2274,35 @@ + columns - 1, dy2, + width, height, + rows, columns); +- gdk_region_union_with_rect (dst_region, &rect); ++ cairo_region_union_rectangle (dst_region, &rect); + } + } + } + + if (exposed) +- gdk_region_subtract (src_region, exposed); ++ cairo_region_subtract (src_region, exposed); + +- gdk_region_xor (src_region, dst_region); ++ cairo_region_xor (src_region, dst_region); + +- gdk_region_destroy (dst_region); ++ cairo_region_destroy (dst_region); + +- gdk_gc_set_clip_region (view->select.xor_gc, src_region); ++ gdk_cairo_region (view->select.xor_gc, src_region); ++ cairo_clip (view->select.xor_gc); + +- gdk_region_destroy (src_region); ++ cairo_region_destroy (src_region); + +- gdk_draw_rectangle (GTK_WIDGET (view)->window, +- view->select.xor_gc, +- TRUE, +- 0, 0, +- width - 1, height - 1); ++ cairo_rectangle (view->select.xor_gc, 0, 0, width - 1, height - 1); ++ cairo_fill (view->select.xor_gc); + +- gdk_gc_set_clip_rectangle (view->select.xor_gc, NULL); ++ gdk_cairo_rectangle (view->select.xor_gc, NULL); ++ cairo_clip (view->select.xor_gc); + } + + static void + select_stop (TeletextView * view) + { + if (view->appbar) +- gnome_appbar_pop (view->appbar); ++ gtk_statusbar_pop (view->appbar, 0); + + if (view->select.last_x != -1) + { +@@ -2372,8 +2360,11 @@ + view->select.in_selection = TRUE; + + if (view->appbar) +- gnome_appbar_set_status (view->appbar, +- _("Selection copied to clipboard")); ++ { ++ gtk_statusbar_remove_all (view->appbar, 0); ++ gtk_statusbar_push (view->appbar, 0, ++ _("Selection copied to clipboard")); ++ } + } + + update_cursor_shape (view); +@@ -2417,10 +2408,9 @@ + { + gint width, height; + +- gdk_window_get_geometry (GTK_WIDGET (view)->window, ++ gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (view)), + NULL, NULL, +- &width, &height, +- NULL); ++ &width, &height); + + ocol = (view->select.last_x * columns) / width; + ocol = SATURATE (ocol, 0, columns - 1); +@@ -2455,7 +2445,10 @@ + if (view->pg->pgno < 0x100) + { + if (view->appbar) +- gnome_appbar_set_status (view->appbar, _("No page loaded")); ++ { ++ gtk_statusbar_remove_all (view->appbar, 0); ++ gtk_statusbar_push (view->appbar, 0, _("No page loaded")); ++ } + return; + } + +@@ -2463,14 +2456,15 @@ + { + view->cursor_over_link = FALSE; + if (view->appbar) +- gnome_appbar_pop (view->appbar); ++ gtk_statusbar_pop (view->appbar, 0); + } + + if (view->appbar) +- gnome_appbar_push (view->appbar, +- _("Selecting - press Shift key for table mode")); ++ gtk_statusbar_push (view->appbar, 0, ++ _("Selecting - press Shift key for table mode")); + +- gdk_window_set_cursor (GTK_WIDGET (view)->window, cursor_select); ++ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (view)), ++ cursor_select); + + view->select.start_x = x; + view->select.start_y = y; +@@ -2629,26 +2623,26 @@ + case VBI3_SUBTITLE_INDEX: + ONCE (have_subtitle_index); + menu_item = z_gtk_pixmap_menu_item_new (_("Subtitle index"), +- GTK_STOCK_INDEX); ++ "edit-select-all"); + break; + + case VBI3_NOW_AND_NEXT: + ONCE (have_now_and_next); + new_window = FALSE; + menu_item = z_gtk_pixmap_menu_item_new (_("Now and Next"), +- GTK_STOCK_JUSTIFY_FILL); ++ "format-justify-fill"); + break; + + case VBI3_CURRENT_PROGR: + ONCE (have_current_progr); + menu_item = z_gtk_pixmap_menu_item_new (_("Current program"), +- GTK_STOCK_JUSTIFY_FILL); ++ "format-justify-fill"); + break; + + case VBI3_PROGR_INDEX: + ONCE (have_progr_index); + menu_item = z_gtk_pixmap_menu_item_new (_("Program Index"), +- GTK_STOCK_INDEX); ++ "edit-select-all"); + break; + + case VBI3_PROGR_SCHEDULE: +@@ -2688,7 +2682,7 @@ + gchar buffer[32]; + + g_snprintf (buffer, sizeof (buffer), "%x", pgno); +- z_tooltip_set (menu_item, buffer); ++ gtk_widget_set_tooltip_text (menu_item, buffer); + } + + if (new_window) +@@ -2719,69 +2713,6 @@ + return hotlist_menu_insert (menu, NULL, separator, position); + } + +-static GnomeUIInfo +-popup_open_page_uiinfo [] = { +- { +- GNOME_APP_UI_ITEM, N_("_Open"), NULL, +- G_CALLBACK (on_python_command1), NULL, NULL, +- GNOME_APP_PIXMAP_NONE, NULL, +- 0, (GdkModifierType) 0, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("Open in _New Window"), NULL, +- G_CALLBACK (on_python_command1), NULL, NULL, +- GNOME_APP_PIXMAP_NONE, NULL, +- 0, (GdkModifierType) 0, NULL +- }, +- GNOMEUIINFO_END +-}; +- +-static GnomeUIInfo +-popup_open_url_uiinfo [] = { +- { +- GNOME_APP_UI_ITEM, N_("_Open Link"), NULL, +- G_CALLBACK (on_python_command1), NULL, NULL, +- GNOME_APP_PIXMAP_NONE, NULL, +- 0, (GdkModifierType) 0, NULL +- }, +- GNOMEUIINFO_END +-}; +- +-static GnomeUIInfo +-popup_page_uiinfo [] = { +- { +- GNOME_APP_UI_ITEM, N_("_New Window"), NULL, +- G_CALLBACK (on_python_command1), "zapping.ttx_open_new()", NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_NEW, +- 0, (GdkModifierType) 0, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("_Save as..."), NULL, +- G_CALLBACK (on_python_command1), "zapping.ttx_export()", NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_SAVE_AS, +- 0, (GdkModifierType) 0, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("S_earch..."), NULL, +- G_CALLBACK (on_python_command1), "zapping.ttx_search()", NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_FIND, +- 0, (GdkModifierType) 0, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("S_ubtitles"), NULL, +- NULL, NULL, NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_INDEX, +- 0, (GdkModifierType) 0, NULL +- }, +- { +- GNOME_APP_UI_ITEM, N_("_Bookmarks"), NULL, +- NULL, NULL, NULL, +- GNOME_APP_PIXMAP_STOCK, GTK_STOCK_INDEX, +- 0, (GdkModifierType) 0, NULL +- }, +- GNOMEUIINFO_END +-}; +- + static GtkWidget * + popup_menu_ (TeletextView * view, + const vbi3_link * lk, +@@ -2789,54 +2720,59 @@ + { + GtkWidget *menu; + GtkWidget *widget; +- gint pos; + + menu = gtk_menu_new (); + g_object_set_data (G_OBJECT (menu), "TeletextView", view); + +- pos = 0; ++ /* Construct the menu manually since GtkActionEntry lacks user_data ++ member which is needed for most menu items to pass an argument to ++ the callback function. */ + + if (lk) + { + switch (lk->type) + { + gint subpage; ++ gchar *open, *new, *link; + + case VBI3_LINK_PAGE: + case VBI3_LINK_SUBPAGE: + subpage = decimal_subno (lk->subno); + +- popup_open_page_uiinfo[0].user_data = +- g_strdup_printf ("zapping.ttx_open(%x, %d)", +- lk->pgno, subpage); ++ open = g_strdup_printf ("zapping.ttx_open(%x, %d)", ++ lk->pgno, subpage); + g_signal_connect_swapped (G_OBJECT (menu), "destroy", +- G_CALLBACK (g_free), +- popup_open_page_uiinfo[0].user_data); ++ G_CALLBACK (g_free), open); ++ widget = gtk_menu_item_new_with_mnemonic (_("_Open")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), open); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + +- popup_open_page_uiinfo[1].user_data = +- g_strdup_printf ("zapping.ttx_open_new(%x, %d)", +- lk->pgno, subpage); ++ new = g_strdup_printf ("zapping.ttx_open_new(%x, %d)", ++ lk->pgno, subpage); + g_signal_connect_swapped (G_OBJECT (menu), "destroy", +- G_CALLBACK (g_free), +- popup_open_page_uiinfo[1].user_data); ++ G_CALLBACK (g_free), new); ++ widget = gtk_menu_item_new_with_mnemonic (_("Open in _New Window")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), new); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + +- gnome_app_fill_menu (GTK_MENU_SHELL (menu), +- popup_open_page_uiinfo, +- /* accel */ NULL, +- /* mnemo */ TRUE, +- pos); + return menu; + + case VBI3_LINK_HTTP: + case VBI3_LINK_FTP: + case VBI3_LINK_EMAIL: +- popup_open_url_uiinfo[0].user_data = g_strdup (lk->url); ++ link = g_strdup (lk->url); + g_signal_connect_swapped (G_OBJECT (menu), "destroy", +- G_CALLBACK (g_free), +- popup_open_url_uiinfo[0].user_data); ++ G_CALLBACK (g_free), link); ++ widget = gtk_menu_item_new_with_mnemonic (_("_Open Link")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), link); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + +- gnome_app_fill_menu (GTK_MENU_SHELL (menu), popup_open_url_uiinfo, +- /* accel */ NULL, /* mnemo */ TRUE, pos); + return menu; + + default: +@@ -2844,24 +2780,45 @@ + } + } + +- gnome_app_fill_menu (GTK_MENU_SHELL (menu), popup_page_uiinfo, +- NULL, TRUE, pos); +- ++ widget = gtk_menu_item_new_with_mnemonic (_("_New Window")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), ++ (gpointer) "zapping.ttx_open_new()"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); ++ ++ widget = gtk_menu_item_new_with_mnemonic (_("_Save as...")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), ++ (gpointer) "zapping.ttx_export()"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + if (!vbi3_export_info_enum (0)) +- gtk_widget_set_sensitive (popup_page_uiinfo[1].widget, FALSE); ++ gtk_widget_set_sensitive (widget, FALSE); ++ ++ widget = gtk_menu_item_new_with_mnemonic (_("S_earch...")); ++ g_signal_connect_swapped (G_OBJECT (widget), "activate", ++ G_CALLBACK (on_python_command1), ++ (gpointer) "zapping.ttx_search()"); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + + if (large) + { + GtkWidget *subtitles_menu; + +- widget = popup_page_uiinfo[3].widget; /* subtitles */ ++ widget = gtk_menu_item_new_with_mnemonic (_("S_ubtitles")); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + + if ((subtitles_menu = zvbi_subtitle_menu_new (/* curr_pgno */ 0))) + gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), subtitles_menu); + else + gtk_widget_set_sensitive (widget, FALSE); + +- widget = popup_page_uiinfo[4].widget; /* bookmarks */ ++ widget = gtk_menu_item_new_with_mnemonic (_("_Bookmarks")); ++ gtk_menu_shell_append (GTK_MENU_SHELL (menu), widget); ++ gtk_widget_show (widget); + + gtk_menu_item_set_submenu (GTK_MENU_ITEM (widget), + bookmarks_menu_new (view)); +@@ -2869,16 +2826,6 @@ + ttxview_hotlist_menu_insert (GTK_MENU_SHELL (menu), + /* separator */ TRUE, APPEND); + } +- else +- { +- widget = popup_page_uiinfo[3].widget; /* subtitles */ +- gtk_widget_set_sensitive (widget, FALSE); +- gtk_widget_hide (widget); +- +- widget = popup_page_uiinfo[4].widget; /* bookmarks */ +- gtk_widget_set_sensitive (widget, FALSE); +- gtk_widget_hide (widget); +- } + + return menu; + } +@@ -2906,17 +2853,19 @@ + + static gboolean + expose_event (GtkWidget * widget, +- GdkEventExpose * event) ++ cairo_t * cr) + { + TeletextView *view = TELETEXT_VIEW (widget); ++ GdkRectangle rect; ++ ++ gdk_cairo_get_clip_rectangle (cr, &rect); + + draw_scaled_page_image (view, +- widget->window, +- widget->style->white_gc, +- /* src */ event->area.x, event->area.y, +- /* dst */ event->area.x, event->area.y, +- event->area.width, +- event->area.height); ++ cr, ++ /* src */ rect.x, rect.y, ++ /* dst */ rect.x, rect.y, ++ rect.width, ++ rect.height); + + if (view->selecting + && view->select.last_x != -1) +@@ -2924,7 +2873,7 @@ + gint columns, rows; /* page */ + gint scol, srow; /* start */ + gint ccol, crow; /* current */ +- GdkRegion *region; ++ cairo_region_t *region; + + select_positions (view, + view->select.last_x, +@@ -2933,7 +2882,7 @@ + &scol, &srow, + &ccol, &crow); + +- region = gdk_region_rectangle (&event->area); ++ region = cairo_region_create_rectangle (&rect); + + select_transform (view, + scol, srow, /* src1 */ +@@ -2944,7 +2893,7 @@ + view->select.table_mode, + region); + +- gdk_region_destroy (region); ++ cairo_region_destroy (region); + } + + return TRUE; +@@ -3093,12 +3042,12 @@ + + view->last_key_press_event_time = event->time; + +- digit = event->keyval - GDK_0; ++ digit = event->keyval - GDK_KEY_0; + + switch (event->keyval) + { +- case GDK_a ... GDK_f: +- case GDK_A ... GDK_F: ++ case GDK_KEY_a ... GDK_KEY_f: ++ case GDK_KEY_A ... GDK_KEY_F: + if (hex_pages) + { + digit = (event->keyval & 7) + 9; +@@ -3107,11 +3056,11 @@ + + break; + +- case GDK_KP_0 ... GDK_KP_9: +- digit = event->keyval - GDK_KP_0; ++ case GDK_KEY_KP_0 ... GDK_KEY_KP_9: ++ digit = event->keyval - GDK_KEY_KP_0; + goto page_number; + +- case GDK_0 ... GDK_9: ++ case GDK_KEY_0 ... GDK_KEY_9: + page_number: + if (event->state & (GDK_CONTROL_MASK | + GDK_SHIFT_MASK | +@@ -3155,7 +3104,7 @@ + + return TRUE; /* handled */ + +- case GDK_S: ++ case GDK_KEY_S: + /* Menu is "Save As", plain "Save" might be confusing. Now Save As + has accelerator Ctrl-Shift-S, omitting the Shift might be + confusing. But we accept Ctrl-S (of plain Save) here. */ +@@ -3186,13 +3135,24 @@ + unsigned int width, + unsigned int height) + { ++ cairo_t *cr; ++ cairo_surface_t *surface; ++ ++ surface = gdk_window_create_similar_surface (gtk_widget_get_window ++ (GTK_WIDGET (view)), ++ CAIRO_CONTENT_COLOR_ALPHA, ++ width, height); ++ cr = cairo_create (surface); ++ + resize_scaled_page_image (view, width, height); + draw_scaled_page_image (view, +- GTK_WIDGET (view)->window, +- GTK_WIDGET (view)->style->white_gc, ++ cr, + /* src */ 0, 0, + /* dst */ 0, 0, + width, height); ++ ++ cairo_destroy (cr); ++ cairo_surface_destroy (surface); + } + + static void +@@ -3225,9 +3185,9 @@ + delete_patches (view); + + +- g_object_unref (view->select.xor_gc); ++ cairo_destroy (view->select.xor_gc); + +- window = GTK_WIDGET (view)->window; ++ window = gtk_widget_get_window (GTK_WIDGET (view)); + + if (view->select.in_clipboard) + { +@@ -3254,15 +3214,15 @@ + static GtkActionEntry + actions [] = { + { "GoSubmenu", NULL, N_("_Go"), NULL, NULL, NULL }, +- { "HistoryBack", GTK_STOCK_GO_BACK, NULL, NULL, ++ { "HistoryBack", "go-previous", NULL, NULL, + N_("Previous page in history"), G_CALLBACK (history_back_action) }, +- { "HistoryForward", GTK_STOCK_GO_FORWARD, NULL, NULL, ++ { "HistoryForward", "go-next", NULL, NULL, + N_("Next page in history"), G_CALLBACK (history_forward_action) }, +- { "Home", GTK_STOCK_HOME, N_("Index"), NULL, ++ { "Home", "go-home", N_("Index"), NULL, + N_("Go to the index page"), G_CALLBACK (home_action) }, +- { "Search", GTK_STOCK_FIND, NULL, NULL, ++ { "Search", "edit-find", NULL, NULL, + N_("Search page memory"), G_CALLBACK (search_action) }, +- { "Export", GTK_STOCK_SAVE_AS, NULL, NULL, ++ { "Export", "document-save-as", NULL, NULL, + N_("Save this page to a file"), G_CALLBACK (export_action) }, + }; + +@@ -3272,14 +3232,19 @@ + realize (GtkWidget * widget) + { + TeletextView *view = TELETEXT_VIEW (widget); ++ cairo_surface_t *surface; ++ gint width, height; + + GTK_WIDGET_CLASS (parent_class)->realize (widget); + +- /* No background, prevents flicker. */ +- gdk_window_set_back_pixmap (widget->window, NULL, FALSE); ++ width = gtk_widget_get_allocated_width (widget); ++ height = gtk_widget_get_allocated_height (widget); ++ surface = gdk_window_create_similar_surface (gtk_widget_get_window (widget), ++ CAIRO_CONTENT_COLOR_ALPHA, ++ width, height); + +- view->select.xor_gc = gdk_gc_new (widget->window); +- gdk_gc_set_function (view->select.xor_gc, GDK_INVERT); ++ view->select.xor_gc = cairo_create (surface); ++ cairo_surface_destroy (surface); + } + + static int +@@ -3489,6 +3454,7 @@ + { + GObjectClass *object_class; + GtkWidgetClass *widget_class; ++ GdkDisplay *display; + + object_class = G_OBJECT_CLASS (g_class); + widget_class = GTK_WIDGET_CLASS (g_class); +@@ -3498,7 +3464,7 @@ + + widget_class->realize = realize; + widget_class->size_allocate = size_allocate; +- widget_class->expose_event = expose_event; ++ widget_class->draw = expose_event; + widget_class->button_press_event = button_press_event; + widget_class->button_release_event = button_release_event; + widget_class->motion_notify_event = motion_notify_event; +@@ -3525,9 +3491,10 @@ + /* return_type */ G_TYPE_NONE, + /* n_params */ 0); + +- cursor_normal = gdk_cursor_new (GDK_LEFT_PTR); +- cursor_link = gdk_cursor_new (GDK_HAND2); +- cursor_select = gdk_cursor_new (GDK_XTERM); ++ display = gdk_display_get_default (); ++ cursor_normal = gdk_cursor_new_for_display (display, GDK_LEFT_PTR); ++ cursor_link = gdk_cursor_new_for_display (display, GDK_HAND2); ++ cursor_select = gdk_cursor_new_for_display (display, GDK_XTERM); + + GA_CLIPBOARD = gdk_atom_intern ("CLIPBOARD", FALSE); + +--- zapping.orig/plugins/teletext/window.c ++++ zapping/plugins/teletext/window.c +@@ -109,11 +109,19 @@ + if (stock_id) + { + GtkWidget *image; ++ GtkWidget *box; ++ GtkWidget *label; + +- menu_item = gtk_image_menu_item_new_with_label (tt->title); +- image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_MENU); +- gtk_widget_show (image); +- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (menu_item), image); ++ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++ image = gtk_image_new_from_icon_name (stock_id, GTK_ICON_SIZE_MENU); ++ label = gtk_label_new (tt->title); ++ menu_item = gtk_menu_item_new (); ++ ++ gtk_container_add (GTK_CONTAINER (box), image); ++ gtk_label_set_xalign (GTK_LABEL (label), 0.1); ++ gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); ++ gtk_container_add (GTK_CONTAINER (menu_item), box); ++ gtk_widget_show_all (menu_item); + } + else + { +@@ -126,7 +134,7 @@ + gchar buffer [32]; + + g_snprintf (buffer, sizeof (buffer), "%x", tt->pgno); +- z_tooltip_set (menu_item, buffer); ++ gtk_widget_set_tooltip_text (menu_item, buffer); + } + + if (connect) +@@ -280,7 +288,7 @@ + on_channel_menu_received_toggled (GtkCheckMenuItem * menu_item, + TeletextWindow * window) + { +- if (menu_item->active) ++ if (gtk_check_menu_item_get_active (menu_item)) + window->view->switch_network (window->view, &anonymous_network); + } + +@@ -288,7 +296,7 @@ + on_channel_menu_toggled (GtkCheckMenuItem * menu_item, + channel_menu * cm) + { +- if (menu_item->active) ++ if (gtk_check_menu_item_get_active (menu_item)) + { + if (0) + { +@@ -450,7 +458,7 @@ + on_encoding_menu_auto_toggled (GtkCheckMenuItem * menu_item, + TeletextWindow * window) + { +- if (menu_item->active) ++ if (gtk_check_menu_item_get_active (menu_item)) + window->view->set_charset (window->view, (vbi3_charset_code) -1); + } + +@@ -458,7 +466,7 @@ + on_encoding_menu_toggled (GtkCheckMenuItem * menu_item, + encoding_menu * em) + { +- if (menu_item->active) ++ if (gtk_check_menu_item_get_active (menu_item)) + em->window->view->set_charset (em->window->view, em->code); + } + +@@ -487,7 +495,7 @@ + break; + } + +- if (!check->active) ++ if (!gtk_check_menu_item_get_active (check)) + gtk_check_menu_item_set_active (check, TRUE); + } + +@@ -688,8 +696,13 @@ + GError *error = NULL; + GtkAccelGroup *accel_group; + GtkWidget *widget; ++ GtkWidget *vbox; + gboolean success; + ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++ gtk_container_add (GTK_CONTAINER (window), vbox); ++ gtk_widget_show (vbox); ++ + window->ui_manager = gtk_ui_manager_new (); + gtk_ui_manager_insert_action_group + (window->ui_manager, window->action_group, APPEND); +@@ -720,7 +733,8 @@ + gtk_window_add_accel_group (GTK_WINDOW (window), accel_group); + + widget = gtk_ui_manager_get_widget (window->ui_manager, "/MainMenu"); +- gnome_app_set_menus (GNOME_APP (window), GTK_MENU_BAR (widget)); ++ gtk_widget_show (widget); ++ gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0); + + vbi3_network_init (&window->top_network); + update_top_menu (window); +@@ -750,7 +764,7 @@ + + static gboolean + on_button_press_event (GtkWidget * widget _unused_, +- GdkEventButton * event, ++ GdkEvent * event, + gpointer user_data) + { + TeletextWindow *window = TELETEXT_WINDOW (user_data); +@@ -758,19 +772,18 @@ + gboolean success; + GtkWidget *menu; + +- switch (event->button) ++ switch (((GdkEventButton *) event)->button) + { + case 3: /* right button, context menu */ + success = window->view->link_from_pointer_position +- (window->view, &link, (gint) event->x, (gint) event->y); ++ (window->view, &link, (gint) ((GdkEventButton *) event)->x, ++ (gint) ((GdkEventButton *) event)->y); + + menu = window->view->popup_menu (window->view, + success ? &link : NULL, + /* large */ TRUE); + if (menu) +- gtk_menu_popup (GTK_MENU (menu), +- NULL, NULL, NULL, NULL, +- event->button, event->time); ++ gtk_menu_popup_at_pointer (GTK_MENU (menu), event); + + if (success) + vbi3_link_destroy (&link); +@@ -802,9 +815,9 @@ + static GtkActionEntry + actions [] = { + { "FileSubmenu", NULL, N_("_File"), NULL, NULL, NULL }, +- { "NewWindow", GTK_STOCK_NEW, N_("_New Window"), NULL, ++ { "NewWindow", "document-new", N_("_New Window"), NULL, + NULL, G_CALLBACK (new_window_action) }, +- { "Close", GTK_STOCK_CLOSE, NULL, NULL, NULL, G_CALLBACK (close_action) }, ++ { "Close", "window-close", NULL, NULL, NULL, G_CALLBACK (close_action) }, + { "EditSubmenu", NULL, N_("_Edit"), NULL, NULL, NULL }, + { "ViewSubmenu", NULL, N_("_View"), NULL, NULL, NULL }, + { "EncodingSubmenu", NULL, N_("_Encoding"), NULL, NULL, NULL }, +@@ -816,6 +829,10 @@ + view_statusbar_action (GtkToggleAction * toggle_action, + TeletextWindow * window) + { ++ GtkWidget *hbox; ++ GtkWidget *top; ++ GList *l; ++ + if (gtk_toggle_action_get_active (toggle_action)) + { + /* Adding a hidden status bar is impossible, we have to add when the +@@ -823,8 +840,23 @@ + if (!window->statusbar_added) + { + window->statusbar_added = TRUE; +- gnome_app_set_statusbar (&window->app, +- GTK_WIDGET (window->view->appbar)); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++ gtk_box_pack_start (GTK_BOX (hbox), ++ GTK_WIDGET (window->view->appbar), ++ TRUE, TRUE, 0); ++ gtk_widget_show (hbox); ++ ++ /* This is rather risky and may add the statusbar at the ++ wrong place/box. */ ++ top = gtk_widget_get_toplevel (GTK_WIDGET (window->view->appbar)); ++ if (GTK_IS_WINDOW (top)) ++ for (l = gtk_container_get_children (GTK_CONTAINER (top)); ++ l; l = l->next) ++ if (GTK_IS_BOX (l->data)) ++ { ++ gtk_box_pack_start (l->data, hbox, FALSE, FALSE, 0); ++ break; ++ } + } + + gtk_widget_show (GTK_WIDGET (window->view->appbar)); +@@ -839,7 +871,8 @@ + view_toolbar_action (GtkToggleAction * toggle_action, + TeletextWindow * window) + { +- BonoboDockItem *dock_item; ++ GtkWidget *top; ++ GList *l; + + if (gtk_toggle_action_get_active (toggle_action)) + { +@@ -848,22 +881,23 @@ + if (!window->toolbar_added) + { + window->toolbar_added = TRUE; +- gnome_app_set_toolbar (&window->app, +- GTK_TOOLBAR (window->view->toolbar)); ++ top = gtk_widget_get_toplevel (GTK_WIDGET (window->view->toolbar)); ++ if (GTK_IS_WINDOW (top)) ++ for (l = gtk_container_get_children (GTK_CONTAINER (top)); ++ l; l = l->next) ++ if (GTK_IS_BOX (l->data)) ++ { ++ gtk_box_pack_start (l->data, ++ GTK_WIDGET (window->view->toolbar), ++ FALSE, FALSE, 0); ++ break; ++ } + } + +- dock_item = gnome_app_get_dock_item_by_name +- (&window->app, GNOME_APP_TOOLBAR_NAME); +- +- gtk_widget_show (GTK_WIDGET (dock_item)); ++ gtk_widget_show (GTK_WIDGET (window->view->toolbar)); + } + else if (window->toolbar_added) +- { +- dock_item = gnome_app_get_dock_item_by_name +- (&window->app, GNOME_APP_TOOLBAR_NAME); +- +- gtk_widget_hide (GTK_WIDGET (dock_item)); +- } ++ gtk_widget_hide (GTK_WIDGET (window->view->toolbar)); + } + + static GtkToggleActionEntry +@@ -935,7 +969,6 @@ + gpointer g_class _unused_) + { + TeletextWindow *window = (TeletextWindow *) instance; +- GnomeApp *app; + GtkWidget *widget; + GObject *object; + GtkToggleAction *toggle_action; +@@ -963,9 +996,6 @@ + z_show_empty_submenu (window->action_group, "ChannelsSubmenu"); + z_show_empty_submenu (window->action_group, "EncodingSubmenu"); + +- app = GNOME_APP (window); +- gnome_app_construct (app, "Zapping", "Zapzilla"); +- + widget = teletext_view_new (); + gtk_widget_show (widget); + window->view = TELETEXT_VIEW (widget); +@@ -979,8 +1009,6 @@ + + gtk_widget_set_size_request (widget, 260, 250); + +- gnome_app_set_contents (app, widget); +- + create_main_menu (window); + + { +@@ -998,11 +1026,7 @@ + } + + { +- widget = gnome_appbar_new (/* has_progress */ FALSE, +- /* has_status */ TRUE, +- GNOME_PREFERENCES_NEVER); +- +- window->view->appbar = GNOME_APPBAR (widget); ++ window->view->appbar = GTK_STATUSBAR (gtk_statusbar_new ()); + + toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action + (window->action_group, +@@ -1078,7 +1102,7 @@ + info.instance_size = sizeof (TeletextWindow); + info.instance_init = instance_init; + +- type = g_type_register_static (GNOME_TYPE_APP, ++ type = g_type_register_static (GTK_TYPE_WINDOW, + "TeletextWindow", + &info, (GTypeFlags) 0); + } +--- zapping.orig/src/oss.c ++++ zapping/src/oss.c +@@ -23,7 +23,7 @@ + /** OSS backend **/ + #ifdef HAVE_OSS + +-#include ++#include + #include + #include + +@@ -184,43 +184,37 @@ + _add_props (GtkBox *vbox) + { + GtkWidget *label = gtk_label_new(_("Audio device:")); +- GtkWidget *hbox = gtk_hbox_new(TRUE, 3); +- GtkWidget *fentry = gnome_file_entry_new("audio_device_history", +- _("Select the audio device")); +- GtkEntry *entry; ++ GtkWidget *hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); ++ GtkWidget *fentry; + ++ fentry = gtk_file_chooser_button_new (_("Select the audio device"), ++ GTK_FILE_CHOOSER_ACTION_OPEN); + gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_RIGHT); +- gtk_box_pack_start_defaults(GTK_BOX(hbox), label); ++ gtk_box_pack_start (GTK_BOX (hbox), label, TRUE, TRUE, 0); + +- entry = GTK_ENTRY(gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(fentry))); +- gtk_entry_set_text(entry, zcg_char(NULL, "pcm_device")); +- gtk_box_pack_start_defaults(GTK_BOX(hbox), fentry); ++ gtk_file_chooser_select_filename (GTK_FILE_CHOOSER (fentry), ++ zcg_char (NULL, "pcm_device")); ++ gtk_box_pack_start (GTK_BOX (hbox), fentry, TRUE, TRUE, 0); + g_object_set_data(G_OBJECT(vbox), "fentry", fentry); + + gtk_widget_show_all(hbox); +- gtk_box_pack_start_defaults(vbox, hbox); ++ gtk_box_pack_start (vbox, hbox, TRUE, TRUE, 0); + } + + static void + _apply_props (GtkBox *vbox) + { +- GnomeFileEntry *fentry = +- GNOME_FILE_ENTRY(g_object_get_data(G_OBJECT(vbox), "fentry")); +- gchar *result = gnome_file_entry_get_full_path(fentry, TRUE); +- +- if (!result) +- { +- const gchar *real_text = +- gtk_entry_get_text(GTK_ENTRY(gnome_file_entry_gtk_entry(fentry))); +- +- ShowBox(_("The given audio device \"%s\" doesn't exist"), +- GTK_MESSAGE_WARNING, real_text); +- } ++ GtkFileChooser *fentry = ++ GTK_FILE_CHOOSER (g_object_get_data (G_OBJECT (vbox), "fentry")); ++ gchar *result = gtk_file_chooser_get_filename (fentry); ++ ++ if (!g_file_test (result, G_FILE_TEST_EXISTS)) ++ ShowBox (_("The given audio device \"%s\" doesn't exist"), ++ GTK_MESSAGE_WARNING, result); + else +- { + zcs_char(result, "pcm_device"); +- g_free(result); +- } ++ ++ g_free (result); + } + + static void +--- zapping.orig/plugins/deinterlace/preferences.c ++++ zapping/plugins/deinterlace/preferences.c +@@ -87,7 +87,7 @@ + gtk_widget_show (widget); + + if (tooltip) +- z_tooltip_set (widget, tooltip); ++ gtk_widget_set_tooltip_text (widget, tooltip); + + gtk_table_attach (table, widget, + INDENT_COL + 1, N_COLUMNS, +@@ -160,13 +160,13 @@ + const gchar * key) + { + GtkWidget *widget; +- GtkComboBox *combo_box; ++ GtkComboBoxText *combo_box; + GObject *object; + +- widget = gtk_combo_box_new_text (); ++ widget = gtk_combo_box_text_new (); + gtk_widget_show (widget); + +- combo_box = GTK_COMBO_BOX (widget); ++ combo_box = GTK_COMBO_BOX_TEXT (widget); + + { + gchar *item_name; +@@ -195,12 +195,12 @@ + if (0 == g_ascii_strcasecmp (item_name, name)) + value = i; + +- gtk_combo_box_append_text (combo_box, name); ++ gtk_combo_box_text_append_text (combo_box, name); + } + + g_free (item_name); + +- gtk_combo_box_set_active (combo_box, value); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), value); + } + + object = G_OBJECT (combo_box); +@@ -686,13 +686,13 @@ + guint row) + { + GtkWidget *widget; +- GtkComboBox *combo_box; ++ GtkComboBoxText *combo_box; + GObject *object; + +- widget = gtk_combo_box_new_text (); ++ widget = gtk_combo_box_text_new (); + gtk_widget_show (widget); + +- combo_box = GTK_COMBO_BOX (widget); ++ combo_box = GTK_COMBO_BOX_TEXT (widget); + + { + gchar *item_name; +@@ -705,7 +705,7 @@ + /* Error ignored. */ + z_gconf_get_string (&item_name, GCONF_DIR "/method"); + +- gtk_combo_box_append_text (combo_box, _("Disabled")); ++ gtk_combo_box_text_append_text (combo_box, _("Disabled")); + + active_item = 0; /* disabled */ + item_counter = 1; +@@ -721,14 +721,14 @@ + if (0 == g_ascii_strcasecmp (item_name, method->szName)) + active_item = item_counter; + +- gtk_combo_box_append_text (combo_box, _(method->szName)); ++ gtk_combo_box_text_append_text (combo_box, _(method->szName)); + + ++item_counter; + } + + g_free (item_name); + +- gtk_combo_box_set_active (combo_box, active_item); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), active_item); + } + + object = G_OBJECT (combo_box); +--- zapping.orig/src/audio.c ++++ zapping/src/audio.c +@@ -27,7 +27,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include "audio.h" + #define ZCONF_DOMAIN "/zapping/options/audio/" +@@ -805,7 +805,6 @@ + tv_device_node * n, + gpointer user_data _unused_) + { +- GtkWidget *menu; + GtkWidget *optionmenu; + + if ((optionmenu = g_object_get_data (G_OBJECT (table), "mixer_lines"))) +@@ -827,25 +826,18 @@ + if (0 == strcmp (zcg_char (NULL, "mixer_device"), n->device)) + hash = zcg_int (NULL, "mixer_input"); + +- optionmenu = gtk_option_menu_new (); ++ optionmenu = gtk_combo_box_text_new (); + gtk_widget_show (optionmenu); + +- menu = gtk_menu_new (); +- gtk_widget_show (menu); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), menu); +- + index = 0; + + for (line = mixer->inputs; line; line = line->_next) + { +- GtkWidget *menu_item; +- +- menu_item = gtk_menu_item_new_with_label (line->label); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (optionmenu), ++ line->label); + + if (index == 0 || line->hash == hash) +- gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), index); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (optionmenu), index); + + index++; + } +@@ -974,7 +966,7 @@ + }; + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "zapping.glade2"); ++ "zapping.ui"); + } + + /* +@@ -1058,20 +1050,11 @@ + gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), mute); + + if (osd) +- { +- BonoboDockItem *dock_item; +- +- dock_item = gnome_app_get_dock_item_by_name +- (&zapping->app, GNOME_APP_TOOLBAR_NAME); +- + if (DISPLAY_MODE_BACKGROUND == zapping->display_mode +- || DISPLAY_MODE_FULLSCREEN == zapping->display_mode +- || dock_item == NULL +- || !GTK_WIDGET_VISIBLE (GTK_WIDGET (dock_item))) ++ || DISPLAY_MODE_FULLSCREEN == zapping->display_mode) + osd_render_markup_printf (NULL, mute ? + _("Audio off") : + _("Audio on")); +- } + } + + recursion = FALSE; +--- zapping.orig/src/plugins.h ++++ zapping/src/plugins.h +@@ -23,7 +23,7 @@ + #endif + + /* Mainly for glib.h */ +-#include ++#include + + /* for scanning directories */ + #include +@@ -94,9 +94,9 @@ + gchar ** description, + gchar ** type, gint * hash ); + /* Add the plugin to the GUI */ +- void (*plugin_add_gui) ( GnomeApp * app ); ++ void (*plugin_add_gui) ( GtkWindow * app ); + /* Remove the plugin from the GUI */ +- void (*plugin_remove_gui) ( GnomeApp * app ); ++ void (*plugin_remove_gui) ( GtkWindow * app ); + /* Get some misc info about the plugin */ + struct plugin_misc_info * (*plugin_get_misc_info) ( void ); + /* Add the plugin actions to the context menu */ +@@ -166,9 +166,9 @@ + + void plugin_capture_stop ( struct plugin_info * info); + +-void plugin_add_gui (GnomeApp * app, struct plugin_info * info); ++void plugin_add_gui (GtkWindow * app, struct plugin_info * info); + +-void plugin_remove_gui (GnomeApp * app, struct plugin_info * info); ++void plugin_remove_gui (GtkWindow * app, struct plugin_info * info); + + gint plugin_get_priority (struct plugin_info * info); + +--- zapping.orig/src/capture.c ++++ zapping/src/capture.c +@@ -861,6 +861,9 @@ + return TRUE; + } + ++/* Cairo context to be passed on to the video_init function. */ ++static cairo_t *cr = NULL; ++ + gboolean + capture_stop (void) + { +@@ -883,7 +886,7 @@ + /* XXX */ + g_signal_handlers_disconnect_by_func + (G_OBJECT (dest_window), +- GTK_SIGNAL_FUNC (on_capture_canvas_allocate), ++ G_CALLBACK (on_capture_canvas_allocate), + zapping->info); + + dest_window = NULL; +@@ -934,6 +937,8 @@ + + video_uninit (); + ++ cairo_destroy (cr); ++ + D(); + + return TRUE; +@@ -947,6 +952,8 @@ + gboolean use_queue; + unsigned int n_buffers; + unsigned int i; ++ cairo_surface_t *surface; ++ gint width, height; + + D(); + +@@ -1047,13 +1054,20 @@ + /* XXX */ + g_signal_connect (G_OBJECT (window), + "size-allocate", +- GTK_SIGNAL_FUNC (on_capture_canvas_allocate), ++ G_CALLBACK (on_capture_canvas_allocate), + zapping->info); + + for (p = g_list_first (plugin_list); p; p = p->next) + plugin_capture_start ((struct plugin_info *) p->data); + +- video_init (window, window->style->black_gc); ++ width = gtk_widget_get_allocated_width (window); ++ height = gtk_widget_get_allocated_height (window); ++ surface = gdk_window_create_similar_surface (gtk_widget_get_window (window), ++ CAIRO_CONTENT_COLOR_ALPHA, ++ width, height); ++ cr = cairo_create (surface); ++ cairo_surface_destroy (surface); ++ video_init (window, cr); + + /* Trigger initial on_capture_canvas_allocate call. */ + gtk_widget_queue_resize (window); +--- zapping.orig/src/channel_editor.c ++++ zapping/src/channel_editor.c +@@ -39,7 +39,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #define ZCONF_DOMAIN "/zapping/internal/properties/" + #include "zconf.h" +@@ -94,7 +94,7 @@ + + GtkBox * vbox; + +- GtkOptionMenu * country_menu; ++ GtkComboBoxText * country_menu; + GArray * country_table; + + GtkButton * channel_search; +@@ -117,12 +117,10 @@ + GtkTable * entry_table; + GtkEntry * entry_name; + ZSpinSlider * entry_fine_tuning; +- GtkOptionMenu * entry_standard; +- GtkOptionMenu * entry_input; ++ GtkComboBoxText * entry_standard; ++ GtkComboBoxText * entry_input; + GtkWidget * entry_accel; /* z_key_entry */ + +- GtkTooltips * tooltips; +- + tveng_tuned_channel * old_channel_list; + + station_search * search; +@@ -136,8 +134,8 @@ + SIGNAL_HANDLER_BLOCK(ce->object, \ + (gpointer) on_ ## object ## _ ## signal, statement) + +-static GtkMenu * +-create_standard_menu (channel_editor * ce); ++static void ++create_standard_menu (GtkComboBoxText *combo_box); + + static GtkListStore * + create_freq_list_model (const tv_rf_channel * table); +@@ -173,7 +171,7 @@ + #define VALID_ITER(iter, list_store) \ + ((iter) != NULL \ + && (iter)->user_data != NULL \ +- && ((GTK_LIST_STORE (list_store))->stamp == (iter)->stamp)) ++ && gtk_list_store_iter_is_valid (list_store, iter)) + + static inline guint + tree_model_index (GtkTreeModel * model, +@@ -432,24 +430,15 @@ + + dfreq = frequency * 1e-6; /* MHz */ + +- spin_adj->value = dfreq; +- spin_adj->lower = 5; +- spin_adj->upper = 1999; +- spin_adj->step_increment = 0.05; +- spin_adj->page_increment = 1; +- spin_adj->page_size = 0; +- +- hscale_adj->value = dfreq; +- hscale_adj->lower = dfreq - 4; +- hscale_adj->upper = dfreq + 4; +- hscale_adj->step_increment = 0.05; /* XXX use tv_video_line.u.tuner.step ? */ +- hscale_adj->page_increment = 1; +- hscale_adj->page_size = 0; +- +- gtk_adjustment_changed (spin_adj); +- gtk_adjustment_value_changed (spin_adj); +- gtk_adjustment_changed (hscale_adj); +- gtk_adjustment_value_changed (hscale_adj); ++ /* Enforce emitting of signals via gtk_adjustment_configure as ++ the rest of the code relies on them. */ ++ spin_adj = gtk_adjustment_new (0, 0, 0, 0, 0, 0); ++ gtk_adjustment_configure (spin_adj, dfreq, 5, 1999, 0.05, 1, 0); ++ ++ hscale_adj = gtk_adjustment_new (0, 0, 0, 0, 0, 0); ++ gtk_adjustment_configure (hscale_adj, dfreq, dfreq -4, dfreq + 4, ++ 0.05, /* XXX use tv_video_line.u.tuner.step? */ ++ 1, 0); + + z_spinslider_set_reset_value (ce->entry_fine_tuning, dfreq); + } +@@ -526,7 +515,7 @@ + } + + static void +-on_country_menu_changed (GtkOptionMenu * country_menu _unused_, ++on_country_menu_changed (GtkComboBoxText * country_menu _unused_, + channel_editor * ce) + { + tv_rf_channel ch; +@@ -552,12 +541,12 @@ + } + + static void +-on_station_search_destroy (GtkObject * unused _unused_, ++on_station_search_destroy (GObject * unused _unused_, + channel_editor * ce) + { + if (ce->search) + { +- gtk_timeout_remove (ce->search->timeout_handle); ++ g_source_remove (ce->search->timeout_handle); + + g_free (ce->search); + ce->search = NULL; +@@ -716,10 +705,10 @@ + g_signal_connect (G_OBJECT (cs->station_search), "destroy", + G_CALLBACK (on_station_search_destroy), ce); + +- dialog_vbox = cs->station_search->vbox; ++ dialog_vbox = gtk_dialog_get_content_area (cs->station_search); + gtk_widget_show (dialog_vbox); + +- vbox = gtk_vbox_new (FALSE, 3); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_widget_show (vbox); + gtk_box_pack_start (GTK_BOX (dialog_vbox), vbox, TRUE, TRUE, 0); + +@@ -736,11 +725,11 @@ + GTK_WIDGET (cs->progressbar), + FALSE, FALSE, 0); + +- dialog_action_area = cs->station_search->action_area; ++ dialog_action_area = gtk_dialog_get_action_area (cs->station_search); + gtk_widget_show (dialog_action_area); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area), GTK_BUTTONBOX_END); + +- cancel = gtk_button_new_from_stock (GTK_STOCK_STOP); ++ cancel = gtk_button_new_with_mnemonic (_("_Stop")); + gtk_widget_show (cancel); + gtk_dialog_add_action_widget (cs->station_search, cancel, 0); + g_signal_connect (G_OBJECT (cancel), "clicked", +@@ -764,8 +753,8 @@ + tv_set_video_input (zapping->info, l); + /* XXX consider multiple tuners */ + +- cs->timeout_handle = gtk_timeout_add (100 /* ms */, +- station_search_timeout, ce); ++ cs->timeout_handle = g_timeout_add (100 /* ms */, ++ station_search_timeout, ce); + } + + static void +@@ -1050,7 +1039,7 @@ + } + + static void +-on_entry_input_changed (GtkOptionMenu * entry_input, ++on_entry_input_changed (GtkComboBoxText * entry_input, + channel_editor * ce) + { + tveng_tuned_channel *tc, *tc_last; +@@ -1091,7 +1080,7 @@ + if (!channel_list_get_selection (ce, &first, &last, &tc, &tc_last)) + return; + +- tc->frequ = (guint)(spin_adj->value * 1000000); ++ tc->frequ = (guint)(gtk_adjustment_get_value (spin_adj) * 1000000); + + tv_set_tuner_frequency (zapping->info, tc->frequ); + +@@ -1110,7 +1099,7 @@ + } + + static void +-on_entry_standard_changed (GtkOptionMenu * entry_standard, ++on_entry_standard_changed (GtkComboBoxText * entry_standard, + channel_editor * ce) + { + tveng_tuned_channel *tc, *tc_last; +@@ -1212,9 +1201,8 @@ + guint index; + + /* Standards depend on current input */ +- gtk_widget_destroy (gtk_option_menu_get_menu (ce->entry_standard)); +- gtk_option_menu_set_menu (ce->entry_standard, +- GTK_WIDGET (create_standard_menu (ce))); ++ gtk_combo_box_text_remove_all (ce->entry_standard); ++ create_standard_menu (ce->entry_standard); + + s = NULL; + index = 0; +@@ -1264,7 +1252,7 @@ + } + + static void +-on_channel_editor_destroy (GtkObject * unused _unused_, ++on_channel_editor_destroy (GObject * unused _unused_, + channel_editor * ce) + { + if (ce->search) +@@ -1417,7 +1405,7 @@ + gtk_misc_set_padding (GTK_MISC (label), 3, 0); + + #define BUTTON(name, stock, sensitive) \ +- ce->name = gtk_button_new_from_stock (stock); \ ++ ce->name = gtk_button_new_from_icon_name (stock, GTK_ICON_SIZE_BUTTON); \ + gtk_widget_show (ce->name); \ + gtk_widget_set_sensitive (ce->name, sensitive); \ + gtk_box_pack_start (GTK_BOX (vbox), ce->name, FALSE, FALSE, 0); \ +@@ -1438,7 +1426,6 @@ + create_country_menu (channel_editor * ce) + { + GtkWidget *country_menu; +- GtkWidget *menu; + tv_rf_channel ch; + const gchar *table_name; + const gchar *country_code; +@@ -1446,14 +1433,11 @@ + gint hist, i; + struct country *c; + +- country_menu = gtk_option_menu_new (); ++ country_menu = gtk_combo_box_text_new (); + gtk_widget_show (country_menu); +- gtk_tooltips_set_tip (ce->tooltips, country_menu, +- _("Select the frequency table " +- "used in your country"), NULL); +- +- menu = gtk_menu_new (); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (country_menu), menu); ++ gtk_widget_set_tooltip_text (country_menu, ++ _("Select the frequency table " ++ "used in your country")); + + tv_rf_channel_first_table (&ch); + +@@ -1511,11 +1495,8 @@ + for (c = &g_array_index (ce->country_table, struct country, 0); + c->table_name; c++) + { +- GtkWidget *item; +- +- item = gtk_menu_item_new_with_label (c->gui_name); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); +- gtk_widget_show (item); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (country_menu), ++ c->gui_name); + + if (hist < 0) + if (!table_name || 0 == strcmp (c->table_name + 3, table_name)) +@@ -1530,7 +1511,7 @@ + zconf_set_string (g_array_index (ce->country_table, struct country, hist).table_name, + "/zapping/options/main/current_country"); + +- gtk_option_menu_set_history (GTK_OPTION_MENU (country_menu), (guint) hist); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (country_menu), hist); + + return country_menu; + } +@@ -1673,52 +1654,28 @@ + return scrolledwindow; + } + +-static GtkMenu * +-create_input_menu (channel_editor * ce _unused_) ++static void ++create_input_menu (GtkComboBoxText * combo_box) + { +- GtkMenu *menu; +- GtkWidget *menu_item; + const tv_video_line *l; + +- menu = GTK_MENU (gtk_menu_new ()); +- +- menu_item = gtk_menu_item_new_with_label (_("Do not change input")); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); ++ gtk_combo_box_text_append_text (combo_box, _("Do not change input")); + + for (l = tv_next_video_input (zapping->info, NULL); + l; l = tv_next_video_input (zapping->info, l)) +- { +- menu_item = gtk_menu_item_new_with_label (l->label); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); +- } +- +- return menu; ++ gtk_combo_box_text_append_text (combo_box, l->label); + } + +-static GtkMenu * +-create_standard_menu (channel_editor * ce _unused_) ++static void ++create_standard_menu (GtkComboBoxText * combo_box) + { +- GtkMenu *menu; +- GtkWidget *menu_item; + const tv_video_standard *s; + +- menu = GTK_MENU (gtk_menu_new ()); +- +- menu_item = gtk_menu_item_new_with_label (_("Do not change standard")); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); ++ gtk_combo_box_text_append_text (combo_box, _("Do not change standard")); + + for (s = tv_next_video_standard (zapping->info, NULL); + s; s = tv_next_video_standard (zapping->info, s)) +- { +- menu_item = gtk_menu_item_new_with_label (s->label); +- gtk_widget_show (menu_item); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); +- } +- +- return menu; ++ gtk_combo_box_text_append_text (combo_box, s->label); + } + + static GtkWidget * +@@ -1742,8 +1699,6 @@ + + /* Build dialog */ + +- ce->tooltips = gtk_tooltips_new (); +- + ce->channel_editor = GTK_DIALOG (gtk_dialog_new ()); + gtk_window_set_title (GTK_WINDOW (ce->channel_editor), _("Channel editor")); + CONNECT (channel_editor, destroy); +@@ -1751,10 +1706,10 @@ + { + GtkWidget *dialog_vbox; + +- dialog_vbox = GTK_DIALOG (ce->channel_editor)->vbox; ++ dialog_vbox = gtk_dialog_get_content_area (GTK_DIALOG (ce->channel_editor)); + gtk_widget_show (dialog_vbox); + +- ce->vbox = GTK_BOX (gtk_vbox_new (FALSE, 3)); ++ ce->vbox = GTK_BOX (gtk_box_new (GTK_ORIENTATION_VERTICAL, 3)); + gtk_widget_show (GTK_WIDGET (ce->vbox)); + gtk_box_pack_start (GTK_BOX (dialog_vbox), + GTK_WIDGET (ce->vbox), TRUE, TRUE, 0); +@@ -1762,7 +1717,7 @@ + { + GtkWidget *vpaned; + +- vpaned = gtk_vpaned_new (); ++ vpaned = gtk_paned_new (GTK_ORIENTATION_VERTICAL); + gtk_widget_show (vpaned); + gtk_box_pack_start (ce->vbox, vpaned, TRUE, TRUE, 0); + +@@ -1779,7 +1734,7 @@ + GtkWidget *hbox; + GtkWidget *scrolledwindow; + +- hbox = gtk_hbox_new (FALSE, 0); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_widget_show (hbox); + gtk_container_add (GTK_CONTAINER (frame), hbox); + +@@ -1788,11 +1743,11 @@ + #if 0 + GtkWidget *label; + #endif +- vbox = gtk_vbox_new (FALSE, 3); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_widget_show (vbox); + gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0); + +- ce->country_menu = GTK_OPTION_MENU (create_country_menu (ce)); ++ ce->country_menu = GTK_COMBO_BOX_TEXT (create_country_menu (ce)); + gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (ce->country_menu), + FALSE, FALSE, 0); + CONNECT (country_menu, changed); +@@ -1800,7 +1755,7 @@ + { + GtkWidget *hbox; + +- hbox = gtk_vbox_new (TRUE, 3); ++ hbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_widget_show (hbox); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0); + +@@ -1810,11 +1765,12 @@ + gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ce->channel_search), + TRUE, TRUE, 0); + CONNECT (channel_search, clicked); +- gtk_tooltips_set_tip (ce->tooltips, GTK_WIDGET (ce->channel_search), +- _("Select a suitable frequency table, then " +- "click here to search through all channels " +- "in the table and add the received stations " +- "to the channel list."), NULL); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (ce->channel_search), ++ _("Select a suitable frequency " ++ "table, then click here to search " ++ "through all channels in the " ++ "table and add the received " ++ "stations to the channel list.")); + + ce->add_all_channels = GTK_BUTTON (gtk_button_new_with_mnemonic + (_("Add all _channels"))); +@@ -1822,10 +1778,10 @@ + gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (ce->add_all_channels), + TRUE, TRUE, 0); + CONNECT (add_all_channels, clicked); +- gtk_tooltips_set_tip (ce->tooltips, +- GTK_WIDGET (ce->add_all_channels), +- _("Add all channels in the frequency " +- "table to the channel list."), NULL); ++ gtk_widget_set_tooltip_text (GTK_WIDGET (ce->add_all_channels), ++ _("Add all channels in the " ++ "frequency table to the channel " ++ "list.")); + + ce->import_xawtv = GTK_BUTTON (gtk_button_new_with_mnemonic + (_("_Import XawTV configuration"))); +@@ -1864,7 +1820,7 @@ + GtkWidget *hbox; + GtkWidget *scrolledwindow; + +- hbox = gtk_hbox_new (FALSE, 3); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); + gtk_widget_show (hbox); + gtk_container_add (GTK_CONTAINER (frame), hbox); + +@@ -1874,14 +1830,14 @@ + { + GtkWidget *vbox; + +- vbox = gtk_vbox_new (FALSE, 3); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 3); + gtk_widget_show (vbox); + gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0); + +- BUTTON (channel_up, GTK_STOCK_GO_UP, FALSE); +- BUTTON (channel_down, GTK_STOCK_GO_DOWN, FALSE); +- BUTTON (channel_add, GTK_STOCK_ADD, TRUE); +- BUTTON (channel_remove, GTK_STOCK_REMOVE, FALSE); ++ BUTTON (channel_up, "go-up", FALSE); ++ BUTTON (channel_down, "go-down", FALSE); ++ BUTTON (channel_add, "list-add", TRUE); ++ BUTTON (channel_remove, "list-remove", FALSE); + } + } + } +@@ -1897,7 +1853,6 @@ + + { + GtkWidget *label; +- GtkWidget *menu; + GtkAdjustment *adj; + + ce->entry_table = GTK_TABLE (gtk_table_new (5, 2, FALSE)); +@@ -1918,14 +1873,13 @@ + + LABEL (_("Video input:"), 0, 1); + +- ce->entry_input = GTK_OPTION_MENU (gtk_option_menu_new ()); ++ ce->entry_input = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ()); + gtk_widget_show (GTK_WIDGET (ce->entry_input)); + CONNECT (entry_input, changed); + gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_input), 1, 2, 1, 2, + (GtkAttachOptions)(GTK_FILL), + (GtkAttachOptions)(0), 0, 0); +- gtk_option_menu_set_menu (ce->entry_input, +- GTK_WIDGET (create_input_menu (ce))); ++ create_input_menu (ce->entry_input); + + LABEL (_("Fine tuning:"), 0, 2); + +@@ -1946,14 +1900,12 @@ + + LABEL (_("Video standard:"), 0, 3); + +- ce->entry_standard = GTK_OPTION_MENU (gtk_option_menu_new ()); ++ ce->entry_standard = GTK_COMBO_BOX_TEXT (gtk_combo_box_text_new ()); + gtk_widget_show (GTK_WIDGET (ce->entry_standard)); + CONNECT (entry_standard, changed); + gtk_table_attach (ce->entry_table, GTK_WIDGET (ce->entry_standard), 1, 2, 3, 4, + (GtkAttachOptions)(GTK_FILL), + (GtkAttachOptions)(0), 0, 0); +- menu = gtk_menu_new (); +- gtk_option_menu_set_menu (ce->entry_standard, menu); + + LABEL (_("Accelerator:"), 0, 4); + +@@ -1971,7 +1923,8 @@ + { + GtkWidget *dialog_action_area; + +- dialog_action_area = GTK_DIALOG (ce->channel_editor)->action_area; ++ dialog_action_area = gtk_dialog_get_action_area (GTK_DIALOG ++ (ce->channel_editor)); + gtk_widget_show (dialog_action_area); + gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area), GTK_BUTTONBOX_END); + +@@ -1980,23 +1933,24 @@ + GtkWidget *ok; + GtkWidget *cancel; + +- hbox = gtk_hbox_new (TRUE, 15); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 15); + gtk_widget_show (hbox); + gtk_container_add (GTK_CONTAINER (dialog_action_area), hbox); + +- cancel = gtk_button_new_from_stock (GTK_STOCK_HELP); ++ cancel = gtk_button_new_from_icon_name ("help_browser", ++ GTK_ICON_SIZE_BUTTON); + gtk_widget_show (cancel); + gtk_box_pack_start (GTK_BOX (hbox), cancel, FALSE, TRUE, 0); + g_signal_connect (G_OBJECT (cancel), "clicked", + G_CALLBACK (on_help_clicked), ce); + +- cancel = gtk_button_new_from_stock (GTK_STOCK_CANCEL); ++ cancel = gtk_button_new_with_label (_("Cancel")); + gtk_widget_show (cancel); + gtk_box_pack_start (GTK_BOX (hbox), cancel, FALSE, TRUE, 0); + g_signal_connect (G_OBJECT (cancel), "clicked", + G_CALLBACK (on_cancel_clicked), ce); + +- ok = gtk_button_new_from_stock (GTK_STOCK_OK); ++ ok = gtk_button_new_with_label (_("OK")); + gtk_widget_show (ok); + gtk_box_pack_start (GTK_BOX (hbox), ok, FALSE, TRUE, 0); + g_signal_connect (G_OBJECT (ok), "clicked", +--- zapping.orig/src/cmd.c ++++ zapping/src/cmd.c +@@ -26,7 +26,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include "cmd.h" + #include "interface.h" +@@ -40,6 +40,7 @@ + static PyObject* py_quit (PyObject *self _unused_, + PyObject *args _unused_) + { ++ GdkWindow *window; + GList *p; + int x, y, w, h; + gboolean quit_muted; +@@ -67,9 +68,9 @@ + + flag_exit_program = TRUE; + +- gdk_window_get_origin(GTK_WIDGET (zapping)->window, &x, &y); +- gdk_window_get_geometry(GTK_WIDGET (zapping)->window, NULL, NULL, &w, &h, +- NULL); ++ window = gtk_widget_get_window (GTK_WIDGET (zapping)); ++ gdk_window_get_origin (window, &x, &y); ++ gdk_window_get_geometry (window, NULL, NULL, &w, &h); + + zconf_set_int (x, "/zapping/internal/callbacks/x"); + zconf_set_int (y, "/zapping/internal/callbacks/y"); +@@ -93,7 +94,7 @@ + p = p->next; + } + +- gtk_object_destroy (GTK_OBJECT (zapping)); ++ g_object_run_dispose (G_OBJECT (zapping)); + + gtk_main_quit (); + +@@ -339,15 +340,15 @@ + if (!zapping) + py_return_false; + +- subwindow = GTK_WIDGET (zapping->video)->window; ++ subwindow = gtk_widget_get_window (GTK_WIDGET (zapping->video)); + mw = gdk_window_get_toplevel(subwindow); + ok = ParseTuple (args, "ii", &w, &h); + + if (!ok) + g_error ("zapping.resize_screen(ii)"); + +- gdk_window_get_geometry (mw, NULL, NULL, &mw_w, &mw_h, NULL); +- gdk_window_get_geometry (subwindow, NULL, NULL, &sw_w, &sw_h, NULL); ++ gdk_window_get_geometry (mw, NULL, NULL, &mw_w, &mw_h); ++ gdk_window_get_geometry (subwindow, NULL, NULL, &sw_w, &sw_h); + + w += (mw_w - sw_w); + h += (mw_h - sw_h); +--- zapping.orig/src/eggcellrendererkeys.h ++++ zapping/src/eggcellrendererkeys.h +@@ -26,11 +26,11 @@ + G_BEGIN_DECLS + + #define EGG_TYPE_CELL_RENDERER_KEYS (egg_cell_renderer_keys_get_type ()) +-#define EGG_CELL_RENDERER_KEYS(obj) (GTK_CHECK_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys)) +-#define EGG_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) +-#define EGG_IS_CELL_RENDERER_KEYS(obj) (GTK_CHECK_TYPE ((obj), EGG_TYPE_CELL_RENDERER_KEYS)) +-#define EGG_IS_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_KEYS)) +-#define EGG_CELL_RENDERER_KEYS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) ++#define EGG_CELL_RENDERER_KEYS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys)) ++#define EGG_CELL_RENDERER_KEYS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) ++#define EGG_IS_CELL_RENDERER_KEYS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), EGG_TYPE_CELL_RENDERER_KEYS)) ++#define EGG_IS_CELL_RENDERER_KEYS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_KEYS)) ++#define EGG_CELL_RENDERER_KEYS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass)) + + typedef struct _EggCellRendererKeys EggCellRendererKeys; + typedef struct _EggCellRendererKeysClass EggCellRendererKeysClass; +--- zapping.orig/src/eggcellrendererkeys.c ++++ zapping/src/eggcellrendererkeys.c +@@ -298,7 +298,8 @@ + XModifierKeymap *mod_keymap; + gboolean retval = FALSE; + +- mod_keymap = XGetModifierMapping (gdk_display); ++ mod_keymap = XGetModifierMapping (GDK_DISPLAY_XDISPLAY ++ (gdk_display_get_default ())); + + map_size = 8 * mod_keymap->max_keypermod; + i = 0; +@@ -332,7 +333,7 @@ + if (keys->sizing_label == NULL) + keys->sizing_label = gtk_label_new (_("Type a new accelerator, or press Backspace to clear")); + +- gtk_widget_size_request (keys->sizing_label, &requisition); ++ gtk_widget_get_preferred_size (keys->sizing_label, NULL, &requisition); + (* GTK_CELL_RENDERER_CLASS (parent_class)->get_size) (cell, widget, cell_area, x_offset, y_offset, width, height); + /* FIXME: need to take the cell_area et al. into account */ + if (width) +@@ -358,6 +359,7 @@ + GdkModifierType consumed_modifiers; + guint upper; + GdkModifierType ignored_modifiers; ++ GdkDisplay *display; + + keys = EGG_CELL_RENDERER_KEYS (data); + accel_mods = 0; +@@ -365,10 +367,12 @@ + if (is_modifier (event->hardware_keycode)) + return TRUE; + ++ display = gdk_display_get_default (); ++ + edited = FALSE; + + consumed_modifiers = 0; +- gdk_keymap_translate_keyboard_state (gdk_keymap_get_default (), ++ gdk_keymap_translate_keyboard_state (gdk_keymap_get_for_display (display), + event->hardware_keycode, + event->state, + event->group, +@@ -376,8 +380,8 @@ + + upper = event->keyval; + accel_keyval = gdk_keyval_to_lower (upper); +- if (accel_keyval == GDK_ISO_Left_Tab) +- accel_keyval = GDK_Tab; ++ if (accel_keyval == GDK_KEY_ISO_Left_Tab) ++ accel_keyval = GDK_KEY_Tab; + + + +@@ -389,7 +393,7 @@ + consumed_modifiers &= ~(GDK_SHIFT_MASK); + } + +- egg_keymap_resolve_virtual_modifiers (gdk_keymap_get_default (), ++ egg_keymap_resolve_virtual_modifiers (gdk_keymap_get_for_display (display), + EGG_VIRTUAL_NUM_LOCK_MASK | + EGG_VIRTUAL_SCROLL_LOCK_MASK, + &ignored_modifiers); +@@ -403,13 +407,13 @@ + else + g_assert_not_reached (); + +- if (accel_mods == 0 && accel_keyval == GDK_Escape) ++ if (accel_mods == 0 && accel_keyval == GDK_KEY_Escape) + goto out; /* cancel */ + + /* clear the accelerator on Backspace */ + if (keys->edit_key != 0 && + accel_mods == 0 && +- accel_keyval == GDK_BackSpace) ++ accel_keyval == GDK_KEY_BackSpace) + accel_keyval = 0; + + if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_GTK) +@@ -518,21 +522,28 @@ + EggCellRendererKeys *keys; + GtkWidget *label; + GtkWidget *eventbox; ++ GtkStyleContext *ctxt; ++ GdkWindow *window; ++ GdkRGBA eventbox_color; ++ GdkRGBA label_color; ++ gboolean editable; + + celltext = GTK_CELL_RENDERER_TEXT (cell); + keys = EGG_CELL_RENDERER_KEYS (cell); + + /* If the cell isn't editable we return NULL. */ +- if (celltext->editable == FALSE) ++ g_object_get (celltext, "editable", &editable, NULL); ++ if (editable == FALSE) + return NULL; + +- g_return_val_if_fail (widget->window != NULL, NULL); ++ window = gtk_widget_get_window (widget); ++ g_return_val_if_fail (window != NULL, NULL); + +- if (gdk_keyboard_grab (widget->window, FALSE, ++ if (gdk_keyboard_grab (window, FALSE, + gdk_event_get_time (event)) != GDK_GRAB_SUCCESS) + return NULL; + +- if (gdk_pointer_grab (widget->window, FALSE, ++ if (gdk_pointer_grab (window, FALSE, + GDK_BUTTON_PRESS_MASK, + FALSE, NULL, + gdk_event_get_time (event)) != GDK_GRAB_SUCCESS) +@@ -555,12 +566,15 @@ + + label = gtk_label_new (NULL); + gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); +- +- gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL, +- &widget->style->bg[GTK_STATE_SELECTED]); + +- gtk_widget_modify_fg (label, GTK_STATE_NORMAL, +- &widget->style->fg[GTK_STATE_SELECTED]); ++ ctxt = gtk_widget_get_style_context (widget); ++ gtk_style_context_get_background_color (ctxt, GTK_STATE_SELECTED, ++ &eventbox_color); ++ gtk_widget_override_background_color (eventbox, GTK_STATE_NORMAL, ++ &eventbox_color); ++ ++ gtk_style_context_get_color (ctxt, GTK_STATE_SELECTED, &label_color); ++ gtk_widget_override_color (label, GTK_STATE_NORMAL, &label_color); + + if (keys->accel_key != 0) + gtk_label_set_text (GTK_LABEL (label), +--- zapping.orig/src/eggaccelerators.h ++++ zapping/src/eggaccelerators.h +@@ -21,7 +21,7 @@ + #ifndef __EGG_ACCELERATORS_H__ + #define __EGG_ACCELERATORS_H__ + +-#include ++#include + #include + + G_BEGIN_DECLS +--- zapping.orig/src/eggaccelerators.c ++++ zapping/src/eggaccelerators.c +@@ -579,20 +579,20 @@ + j = 0; + while (j < n_entries) + { +- if (keyvals[j] == GDK_Num_Lock) ++ if (keyvals[j] == GDK_KEY_Num_Lock) + mask |= EGG_VIRTUAL_NUM_LOCK_MASK; +- else if (keyvals[j] == GDK_Scroll_Lock) ++ else if (keyvals[j] == GDK_KEY_Scroll_Lock) + mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK; +- else if (keyvals[j] == GDK_Meta_L || +- keyvals[j] == GDK_Meta_R) ++ else if (keyvals[j] == GDK_KEY_Meta_L || ++ keyvals[j] == GDK_KEY_Meta_R) + mask |= EGG_VIRTUAL_META_MASK; +- else if (keyvals[j] == GDK_Hyper_L || +- keyvals[j] == GDK_Hyper_R) ++ else if (keyvals[j] == GDK_KEY_Hyper_L || ++ keyvals[j] == GDK_KEY_Hyper_R) + mask |= EGG_VIRTUAL_HYPER_MASK; +- else if (keyvals[j] == GDK_Super_L || +- keyvals[j] == GDK_Super_R) ++ else if (keyvals[j] == GDK_KEY_Super_L || ++ keyvals[j] == GDK_KEY_Super_R) + mask |= EGG_VIRTUAL_SUPER_MASK; +- else if (keyvals[j] == GDK_Mode_switch) ++ else if (keyvals[j] == GDK_KEY_Mode_switch) + mask |= EGG_VIRTUAL_MODE_SWITCH_MASK; + + ++j; +--- zapping.orig/src/frequencies.c ++++ zapping/src/frequencies.c +@@ -28,7 +28,7 @@ + #include + #include "common/math.h" + +-#include ++#include + #include "frequencies.h" + + #include "zmisc.h" +--- zapping.orig/src/fullscreen.c ++++ zapping/src/fullscreen.c +@@ -67,7 +67,7 @@ + on_key_press (GtkWidget * widget, + GdkEventKey * event) + { +- if (GDK_q == event->keyval ++ if (GDK_KEY_q == event->keyval + && (event->state & GDK_CONTROL_MASK)) + { + was_fullscreen = TRUE; +@@ -76,7 +76,7 @@ + + return TRUE; + } +- else if (GDK_Escape == event->keyval) ++ else if (GDK_KEY_Escape == event->keyval) + { + python_command (widget, "zapping.switch_mode('window')"); + +@@ -148,6 +148,7 @@ + gpointer user_data _unused_) + { + GtkWindow *window; ++ GdkWindow *gdkwindow; + + if (0) + { +@@ -157,15 +158,15 @@ + gint height; + const tv_screen *s; + ++ gdkwindow = gtk_widget_get_window (black_window); + /* Root window relative position. */ +- gdk_window_get_origin (black_window->window, &x, &y); ++ gdk_window_get_origin (gdkwindow, &x, &y); + +- gdk_window_get_geometry (black_window->window, ++ gdk_window_get_geometry (gdkwindow, + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + s = tv_screen_list_find (screens, + x, y, +@@ -257,7 +258,7 @@ + GdkWindow *window; + const tv_screen *xs; + +- window = GTK_WIDGET (zapping)->window; ++ window = gtk_widget_get_window (GTK_WIDGET (zapping)); + + /* Root window relative position. */ + gdk_window_get_origin (window, &x, &y); +@@ -266,8 +267,7 @@ + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + xs = tv_screen_list_find (screens, + x, y, +@@ -430,6 +430,7 @@ + guint vwidth; + guint vheight; + GtkWidget *fixed; ++ GdkWindow *gdkwindow; + + #ifdef HAVE_LIBZVBI + if (CAPTURE_MODE_TELETEXT == cmode) +@@ -453,7 +454,7 @@ + window = GTK_WINDOW (black_window); + + gtk_widget_realize (black_window); +- gdk_window_set_decorations (black_window->window, 0); ++ gdk_window_set_decorations (gtk_widget_get_window (black_window), 0); + + gtk_widget_set_size_request (black_window, + (gint) xs->width, +@@ -511,10 +512,12 @@ + + gtk_widget_show (black_window); + ++ gdkwindow = gtk_widget_get_window (drawing_area); ++ + if (CAPTURE_MODE_TELETEXT == cmode) + { + /* XXX TeletextView should already do this on realize, doesn't work??? */ +- gdk_window_set_back_pixmap (drawing_area->window, NULL, FALSE); ++ gdk_window_set_background_pattern (gdkwindow, NULL); + } + + /* Make sure we're on the right screen. */ +@@ -545,7 +548,7 @@ + + case CAPTURE_MODE_READ: + if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), +- GDK_WINDOW_XWINDOW (drawing_area->window), ++ GDK_WINDOW_XID (gdkwindow), + TVENG_ATTACH_READ, + zapping->info)) + { +@@ -561,7 +564,7 @@ + case CAPTURE_MODE_TELETEXT: + /* Bktr driver needs special programming for VBI-only mode. */ + if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), +- GDK_WINDOW_XWINDOW (drawing_area->window), ++ GDK_WINDOW_XID (gdkwindow), + TVENG_ATTACH_VBI, + zapping->info)) + { +@@ -728,7 +731,7 @@ + goto failure; + } + +- gdk_window_get_root_origin (GTK_WIDGET (zapping)->window, ++ gdk_window_get_root_origin (gtk_widget_get_window (GTK_WIDGET (zapping)), + &old_mw_x, + &old_mw_y); + +--- zapping.orig/src/interface.c ++++ zapping/src/interface.c +@@ -28,8 +28,7 @@ + # include "config.h" + #endif + +-#include +-#include ++#include + + #include "interface.h" + #include "zmisc.h" +@@ -41,7 +40,13 @@ + #include "plugins.h" + #include "remote.h" + +-extern gboolean have_wm_hints; ++/* An array containing all GtkBuilder objects. It is allocated by ++ build_widget when the function is invoked for the first time and is ++ never freed for the lifecycle of the program. More elements are ++ added on subsequent calls. This unfortunate situation is necessary ++ because there is no replacement for glade_get_widget_tree in ++ GtkBuilder. Perhaps there is a better way to handle this. */ ++static GPtrArray *builders = NULL; + + /* Finds the named widget in the tree parent belongs to. + Returns a pointer to it or NULL if not found. */ +@@ -51,7 +56,6 @@ + { + GtkWidget *widget; + GtkWidget *result; +- GladeXML *tree; + gchar *buf; + + widget = parent; +@@ -64,18 +68,29 @@ + if ((result = (GtkWidget*) g_object_get_data (G_OBJECT (widget), buf))) + break; /* found registered widget with that name */ + +- if ((tree = glade_get_widget_tree (widget))) +- if ((result = glade_xml_get_widget (tree, name))) +- break; /* found glade widget with that name */ +- ++ /* A brutal simulation of glade_get_widget_tree -- crawl through ++ all GtkBuilder objects to get the widget. */ ++ if (builders) ++ { ++ guint i; ++ ++ for (i = 0; i < builders->len; i++) ++ if ((result = GTK_WIDGET (gtk_builder_get_object ++ (g_ptr_array_index (builders, i), name)))) ++ break; /* found GtkBuilder widget with that name */ ++ } ++ ++ /* There is no replacement for glade_get_widget_name either so ++ just print the type of the object. Completely useless for ++ debugging purposes but probably better than nothing. */ + if (0) + fprintf (stderr, "found '%s'\n", +- glade_get_widget_name (widget)); ++ gtk_widget_get_name (widget)); + + if (GTK_IS_MENU (widget)) + widget = gtk_menu_get_attach_widget (GTK_MENU (widget)); + else +- widget = widget->parent; ++ widget = gtk_widget_get_parent (widget); + } + + g_free (buf); +@@ -116,7 +131,7 @@ + + for (;;) + { +- if (!GTK_IS_MENU (parent) && !parent->parent) ++ if (!GTK_IS_MENU (parent) && !gtk_widget_get_parent (parent)) + { + gchar * buf; + +@@ -129,7 +144,7 @@ + if (GTK_IS_MENU (parent)) + parent = gtk_menu_get_attach_widget (GTK_MENU (parent)); + else +- parent = parent->parent; ++ parent = gtk_widget_get_parent (parent); + + if (!parent) + return; /* toplevel not found */ +@@ -139,11 +154,10 @@ + /** + * build_widget: + * @name: Name of the widget. +- * @file: Name of the Glade file. ++ * @file: Name of the GtkBuilder file. + * +- * Loads a GtkWidget from a Glade file, when @file is %NULL from +- * zapping.glade2. All the memory is freed when the object (widget) +- * is destroyed. If name is %NULL, all widgets are loaded, but this ++ * Loads a GtkWidget from a GtkBuilder file, when @file is %NULL from ++ * zapping.ui. If name is %NULL, all widgets are loaded, but this + * is not recommended. + * + * Return value: +@@ -153,26 +167,26 @@ + build_widget (const gchar * name, + const gchar * file) + { +- GladeXML *xml; ++ GtkBuilder *builder; + GtkWidget *widget; + gchar *path; + + if (!file) +- file = "zapping.glade2"; ++ file = "zapping.ui"; ++ ++ if (!builders) ++ builders = g_ptr_array_new (); + + path = g_strconcat (PACKAGE_DATA_DIR "/" PACKAGE "/", file, NULL); +- xml = glade_xml_new (path, name, NULL); ++ builder = gtk_builder_new_from_file (path); ++ gtk_builder_set_translation_domain (builder, GETTEXT_PACKAGE); + +- if (!xml) +- { +- RunBox ("File %s [%s] not found, please contact the maintainer", +- GTK_MESSAGE_ERROR, path, name); +- exit (EXIT_FAILURE); +- } ++ if (!g_ptr_array_find (builders, builder, NULL)) ++ g_ptr_array_add (builders, builder); + + g_free (path); + +- widget = glade_xml_get_widget (xml, name); ++ widget = GTK_WIDGET (gtk_builder_get_object (builder, name)); + + if (!widget) + { +@@ -181,7 +195,10 @@ + exit (EXIT_FAILURE); + } + +- glade_xml_signal_autoconnect (xml); ++ /* This won't work because most (all?) callbacks are static. ++ Fortunately, most (all?) connections are done with explicit calls ++ to g_signal_connect and friends. */ ++ gtk_builder_connect_signals (builder, NULL); + + return widget; + } +--- zapping.orig/src/keyboard.c ++++ zapping/src/keyboard.c +@@ -28,7 +28,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include "keyboard.h" + #include "properties.h" +@@ -49,16 +49,16 @@ + { + /* These are synonyms, let's favour the versions more + readily understandable by the user. */ +- case GDK_Prior: ++ case GDK_KEY_Prior: + return "Page_Up"; + +- case GDK_Next: ++ case GDK_KEY_Next: + return "Page_Down"; + +- case GDK_KP_Prior: ++ case GDK_KEY_KP_Prior: + return "KP_Page_Up"; + +- case GDK_KP_Next: ++ case GDK_KEY_KP_Next: + return "KP_Page_Down"; + + default: +@@ -140,7 +140,7 @@ + + key.key = gdk_keyval_to_lower (gdk_keyval_from_name (name)); + +- if (key.key == GDK_VoidSymbol) ++ if (key.key == GDK_KEY_VoidSymbol) + key.mask = 0; + + return key; +@@ -334,7 +334,7 @@ + key.key = gdk_keyval_from_name (name); + key.mask = 0; + +- if (key.key != GDK_VoidSymbol) ++ if (key.key != GDK_KEY_VoidSymbol) + { + key.mask += gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (ke->ctrl)) ? + GDK_CONTROL_MASK : 0; +@@ -365,22 +365,22 @@ + { + z_key key; + +- case GDK_Shift_L: +- case GDK_Shift_R: +- case GDK_Control_L: +- case GDK_Control_R: +- case GDK_Caps_Lock: +- case GDK_Shift_Lock: +- case GDK_Meta_L: +- case GDK_Meta_R: +- case GDK_Alt_L: +- case GDK_Alt_R: +- case GDK_Super_L: +- case GDK_Super_R: +- case GDK_Hyper_L: +- case GDK_Hyper_R: +- case GDK_Mode_switch: +- case GDK_Multi_key: ++ case GDK_KEY_Shift_L: ++ case GDK_KEY_Shift_R: ++ case GDK_KEY_Control_L: ++ case GDK_KEY_Control_R: ++ case GDK_KEY_Caps_Lock: ++ case GDK_KEY_Shift_Lock: ++ case GDK_KEY_Meta_L: ++ case GDK_KEY_Meta_R: ++ case GDK_KEY_Alt_L: ++ case GDK_KEY_Alt_R: ++ case GDK_KEY_Super_L: ++ case GDK_KEY_Super_R: ++ case GDK_KEY_Hyper_L: ++ case GDK_KEY_Hyper_R: ++ case GDK_KEY_Mode_switch: ++ case GDK_KEY_Multi_key: + break; + + default: +@@ -509,7 +509,7 @@ + + ke = g_malloc (sizeof (*ke)); + +- ke->hbox = gtk_hbox_new (FALSE, 0); ++ ke->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + g_object_set_data_full (G_OBJECT (ke->hbox), "z_key_entry", ke, + (GDestroyNotify) g_free); + gtk_widget_show (ke->hbox); +@@ -571,7 +571,7 @@ + { + key_binding *kb, **kbpp; + +- if (key.key == GDK_VoidSymbol || !command || !command[0]) ++ if (key.key == GDK_KEY_VoidSymbol || !command || !command[0]) + return; + + for (kbpp = &kb_list; (kb = *kbpp); kbpp = &kb->next) +@@ -642,70 +642,70 @@ + * Note Ctrl+, Alt+ are reserved for Gnome shortcuts (exception + * Ctrl+S and +R), which are all defined in zapping.glade. + */ +- { 0, GDK_a, "zapping.mute()" }, /* XawTV */ +- { CTRL + ALT, GDK_c, "zapping.toggle_mode('capture')" }, /* historic */ +- { 0, GDK_c, "zapping.toggle_mode('capture')" }, +- { SHIFT, GDK_c, "zapping.ttx_open_new()" }, +- { 0, GDK_e, "zapping.channel_editor()" }, /* XawTV */ +- { 0, GDK_f, "zapping.toggle_mode('fullscreen')" }, +- { 0, GDK_g, "zapping.quickshot('ppm')" }, /* XawTV */ +- { 0, GDK_h, "zapping.ttx_hold()" }, +- { SHIFT, GDK_h, "zapping.ttx_hold()" }, +- { 0, GDK_j, "zapping.quickshot('jpeg')" }, /* XawTV */ +- { CTRL + ALT, GDK_n, "zapping.ttx_open_new()" }, /* historic */ +- { 0, GDK_n, "zapping.ttx_open_new()" }, +- { CTRL + ALT, GDK_o, "zapping.toggle_mode('preview')" }, /* historic */ +- { 0, GDK_o, "zapping.toggle_mode('preview')" }, +- { CTRL + ALT, GDK_p, "zapping.toggle_mode('preview')" }, /* historic */ +- { CTRL, GDK_p, "zapping.toggle_mode('preview')" }, /* historic */ +- { 0, GDK_p, "zapping.toggle_mode('preview')" }, +- { 0, GDK_q, "zapping.quit()" }, /* XawTV */ +- { SHIFT, GDK_r, "zapping.ttx_reveal()" }, +- { 0, GDK_r, "zapping.record()" }, /* XawTV */ +- { CTRL, GDK_r, "zapping.quickrec()" }, +- { 0, GDK_s, "zapping.screenshot()" }, +- { CTRL, GDK_s, "zapping.quickshot()" }, +- { CTRL + ALT, GDK_t, "zapping.switch_mode('teletext')" }, /* historic */ +- { 0, GDK_t, "zapping.switch_mode('teletext')" }, +- { 0, GDK_space, "zapping.channel_up()" }, /* XawTV */ +- { 0, GDK_question, "zapping.ttx_reveal()" }, +- { 0, GDK_plus, "zapping.control_incr('volume',+1)" }, +- { 0, GDK_minus, "zapping.control_incr('volume',-1)" }, +- { 0, GDK_Page_Up, "zapping.channel_up()" }, +- { 0, GDK_KP_Page_Up, "zapping.channel_up()" }, +- { 0, GDK_Page_Down, "zapping.channel_down()" }, +- { 0, GDK_KP_Page_Down,"zapping.channel_down()" }, +- { 0, GDK_Home, "zapping.ttx_home()" }, +- { 0, GDK_KP_Home, "zapping.ttx_home()" }, +- { 0, GDK_Up, "zapping.ttx_page_incr(+1)" }, +- { 0, GDK_KP_Up, "zapping.ttx_page_incr(+1)" }, +- { 0, GDK_Down, "zapping.ttx_page_incr(-1)" }, +- { 0, GDK_KP_Down, "zapping.ttx_page_incr(-1)" }, +- { SHIFT, GDK_Up, "zapping.ttx_page_incr(+10)" }, +- { SHIFT, GDK_KP_Up, "zapping.ttx_page_incr(+10)" }, +- { SHIFT, GDK_Down, "zapping.ttx_page_incr(-10)" }, +- { SHIFT, GDK_KP_Down, "zapping.ttx_page_incr(-10)" }, +- { 0, GDK_Left, "zapping.ttx_subpage_incr(-1)" }, +- { 0, GDK_KP_Left, "zapping.ttx_subpage_incr(-1)" }, +- { 0, GDK_Right, "zapping.ttx_subpage_incr(+1)" }, +- { 0, GDK_KP_Right, "zapping.ttx_subpage_incr(+1)" }, +- { 0, GDK_KP_Add, "zapping.control_incr('volume',+1)" }, /* XawTV */ +- { SHIFT, GDK_KP_Add, "zapping.picture_size_cycle(+1)" }, +- { 0, GDK_KP_Subtract,"zapping.control_incr('volume',-1)" }, /* XawTV */ +- { SHIFT, GDK_KP_Subtract,"zapping.picture_size_cycle(-1)" }, +- { 0, GDK_KP_Enter, "zapping.mute()" }, /* XawTV */ ++ { 0, GDK_KEY_a, "zapping.mute()" }, /* XawTV */ ++ { CTRL + ALT, GDK_KEY_c, "zapping.toggle_mode('capture')" }, /* historic */ ++ { 0, GDK_KEY_c, "zapping.toggle_mode('capture')" }, ++ { SHIFT, GDK_KEY_c, "zapping.ttx_open_new()" }, ++ { 0, GDK_KEY_e, "zapping.channel_editor()" }, /* XawTV */ ++ { 0, GDK_KEY_f, "zapping.toggle_mode('fullscreen')" }, ++ { 0, GDK_KEY_g, "zapping.quickshot('ppm')" }, /* XawTV */ ++ { 0, GDK_KEY_h, "zapping.ttx_hold()" }, ++ { SHIFT, GDK_KEY_h, "zapping.ttx_hold()" }, ++ { 0, GDK_KEY_j, "zapping.quickshot('jpeg')" }, /* XawTV */ ++ { CTRL + ALT, GDK_KEY_n, "zapping.ttx_open_new()" }, /* historic */ ++ { 0, GDK_KEY_n, "zapping.ttx_open_new()" }, ++ { CTRL + ALT, GDK_KEY_o, "zapping.toggle_mode('preview')" }, /* historic */ ++ { 0, GDK_KEY_o, "zapping.toggle_mode('preview')" }, ++ { CTRL + ALT, GDK_KEY_p, "zapping.toggle_mode('preview')" }, /* historic */ ++ { CTRL, GDK_KEY_p, "zapping.toggle_mode('preview')" }, /* historic */ ++ { 0, GDK_KEY_p, "zapping.toggle_mode('preview')" }, ++ { 0, GDK_KEY_q, "zapping.quit()" }, /* XawTV */ ++ { SHIFT, GDK_KEY_r, "zapping.ttx_reveal()" }, ++ { 0, GDK_KEY_r, "zapping.record()" }, /* XawTV */ ++ { CTRL, GDK_KEY_r, "zapping.quickrec()" }, ++ { 0, GDK_KEY_s, "zapping.screenshot()" }, ++ { CTRL, GDK_KEY_s, "zapping.quickshot()" }, ++ { CTRL + ALT, GDK_KEY_t, "zapping.switch_mode('teletext')" }, /* historic */ ++ { 0, GDK_KEY_t, "zapping.switch_mode('teletext')" }, ++ { 0, GDK_KEY_space, "zapping.channel_up()" }, /* XawTV */ ++ { 0, GDK_KEY_question,"zapping.ttx_reveal()" }, ++ { 0, GDK_KEY_plus, "zapping.control_incr('volume',+1)" }, ++ { 0, GDK_KEY_minus, "zapping.control_incr('volume',-1)" }, ++ { 0, GDK_KEY_Page_Up,"zapping.channel_up()" }, ++ { 0, GDK_KEY_KP_Page_Up,"zapping.channel_up()" }, ++ { 0, GDK_KEY_Page_Down,"zapping.channel_down()" }, ++ { 0, GDK_KEY_KP_Page_Down,"zapping.channel_down()" }, ++ { 0, GDK_KEY_Home, "zapping.ttx_home()" }, ++ { 0, GDK_KEY_KP_Home,"zapping.ttx_home()" }, ++ { 0, GDK_KEY_Up, "zapping.ttx_page_incr(+1)" }, ++ { 0, GDK_KEY_KP_Up, "zapping.ttx_page_incr(+1)" }, ++ { 0, GDK_KEY_Down, "zapping.ttx_page_incr(-1)" }, ++ { 0, GDK_KEY_KP_Down,"zapping.ttx_page_incr(-1)" }, ++ { SHIFT, GDK_KEY_Up, "zapping.ttx_page_incr(+10)" }, ++ { SHIFT, GDK_KEY_KP_Up, "zapping.ttx_page_incr(+10)" }, ++ { SHIFT, GDK_KEY_Down, "zapping.ttx_page_incr(-10)" }, ++ { SHIFT, GDK_KEY_KP_Down,"zapping.ttx_page_incr(-10)" }, ++ { 0, GDK_KEY_Left, "zapping.ttx_subpage_incr(-1)" }, ++ { 0, GDK_KEY_KP_Left,"zapping.ttx_subpage_incr(-1)" }, ++ { 0, GDK_KEY_Right, "zapping.ttx_subpage_incr(+1)" }, ++ { 0, GDK_KEY_KP_Right,"zapping.ttx_subpage_incr(+1)" }, ++ { 0, GDK_KEY_KP_Add, "zapping.control_incr('volume',+1)" }, /* XawTV */ ++ { SHIFT, GDK_KEY_KP_Add, "zapping.picture_size_cycle(+1)" }, ++ { 0, GDK_KEY_KP_Subtract,"zapping.control_incr('volume',-1)" }, /* XawTV */ ++ { SHIFT, GDK_KEY_KP_Subtract,"zapping.picture_size_cycle(-1)" }, ++ { 0, GDK_KEY_KP_Enter, "zapping.mute()" }, /* XawTV */ + /* conflict with keypad channel number entering + { 0, GDK_Escape, "zapping.toggle_mode()" }, */ +- { 0, GDK_F5, "zapping.control_incr('brightness',-1)" }, /* XawTV */ +- { 0, GDK_F6, "zapping.control_incr('brightness',+1)" }, /* XawTV */ +- { 0, GDK_F7, "zapping.control_incr('hue',-1)" }, /* XawTV */ +- { 0, GDK_F8, "zapping.control_incr('hue',+1)" }, /* XawTV */ +- { 0, GDK_F9, "zapping.control_incr('contrast',-1)" }, /* XawTV */ +- { 0, GDK_F10, "zapping.control_incr('contrast',+1)" }, /* XawTV */ +- { 0, GDK_F11, "zapping.toggle_mode('fullscreen')" }, /* historic */ ++ { 0, GDK_KEY_F5, "zapping.control_incr('brightness',-1)" }, /* XawTV */ ++ { 0, GDK_KEY_F6, "zapping.control_incr('brightness',+1)" }, /* XawTV */ ++ { 0, GDK_KEY_F7, "zapping.control_incr('hue',-1)" }, /* XawTV */ ++ { 0, GDK_KEY_F8, "zapping.control_incr('hue',+1)" }, /* XawTV */ ++ { 0, GDK_KEY_F9, "zapping.control_incr('contrast',-1)" }, /* XawTV */ ++ { 0, GDK_KEY_F10, "zapping.control_incr('contrast',+1)" }, /* XawTV */ ++ { 0, GDK_KEY_F11, "zapping.toggle_mode('fullscreen')" }, /* historic */ + /* conflict + { 0, GDK_F11, "zapping.control_incr('saturation',-1)" },*/ /* XawTV */ +- { 0, GDK_F12, "zapping.control_incr('saturation',+1)" }, /* XawTV */ ++ { 0, GDK_KEY_F12, "zapping.control_incr('saturation',+1)" }, /* XawTV */ + }; + + static const gint num_default_key_bindings = G_N_ELEMENTS (default_key_bindings); +@@ -804,6 +804,14 @@ + C_NUM + }; + ++/* User function for g_list_foreach; just swaps arguments. */ ++static void ++fill_combobox (gpointer list_item, ++ gpointer combo_box) ++{ ++ return gtk_combo_box_text_append_text (combo_box, list_item); ++} ++ + static GtkListStore * + create_model (void) + { +@@ -853,7 +861,8 @@ + C_COMMAND, new_text, -1); + + combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); +- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), new_text); ++ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))), ++ new_text); + + z_property_item_modified (GTK_WIDGET (tree_view)); + } +@@ -959,14 +968,15 @@ + { + combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); + gtk_tree_model_get (model, &iter, C_COMMAND, &action, -1); +- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (combo)->entry), action); ++ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo))), ++ action); + g_free (action); + } + } + + + static void +-on_combo_entry_changed (GtkEditable * editable, ++on_combo_entry_changed (GtkComboBox * combobox, + GtkTreeView * tree_view) + { + GtkTreeSelection *selection; +@@ -980,7 +990,7 @@ + if (!z_tree_selection_iter_first (selection, model, &iter)) + return; + +- text = gtk_editable_get_chars (editable, 0, -1); ++ text = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combobox)); + + gtk_list_store_set (GTK_LIST_STORE (model), &iter, + C_COMMAND, text, -1); +@@ -1007,7 +1017,7 @@ + gtk_list_store_append (GTK_LIST_STORE (model), &iter); + + combo = lookup_widget (GTK_WIDGET (tree_view), "combo1"); +- cmd = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (combo)->entry)); ++ cmd = gtk_entry_get_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (combo)))); + if (NULL == cmd) + cmd = ""; + +@@ -1125,8 +1135,8 @@ + G_CALLBACK (on_accel_edited), tree_view); + + widget = lookup_widget (GTK_WIDGET (tree_view), "combo1"); +- gtk_combo_set_popdown_strings (GTK_COMBO (widget), cmd_list ()); +- g_signal_connect (G_OBJECT (GTK_COMBO (widget)->entry), "changed", ++ g_list_foreach (cmd_list (), fill_combobox, widget); ++ g_signal_connect (G_OBJECT (widget), "changed", + G_CALLBACK (on_combo_entry_changed), tree_view); + + widget = lookup_widget (page, "general-keyboard-add"); +@@ -1155,7 +1165,7 @@ + }; + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "zapping.glade2"); ++ "zapping.ui"); + } + + void +--- zapping.orig/src/main.c ++++ zapping/src/main.c +@@ -20,9 +20,8 @@ + # include "config.h" + #endif + +-#include ++#include + #include +-#include + #include + #define ZCONF_DOMAIN "/zapping/options/main/" + #include "zconf.h" +@@ -62,8 +61,6 @@ + + Zapping * zapping; + +-static GnomeClient * session; +- + /*** END OF GLOBAL STUFF ***/ + + void shutdown_zapping(void); +@@ -119,61 +116,6 @@ + #endif + } + +-static gboolean +-session_save (GnomeClient * client, +- gint phase, +- GnomeSaveStyle save_style, +- gboolean shutting_down, +- GnomeInteractStyle interact_style, +- gboolean fast, +- gpointer user_data) +-{ +- GList *p; +- gchar **argv; +- guint argc; +- gboolean success; +- +- phase = phase; +- save_style = save_style; +- shutting_down = shutting_down; +- interact_style = interact_style; +- fast = fast; +- +- argv = g_malloc0 (4 * sizeof (gchar *)); +- argc = 0; +- +- argv[argc++] = user_data; /* main() argv[0] */ +- +- gnome_client_set_clone_command (client, argc, argv); +- gnome_client_set_restart_command (client, argc, argv); +- +- success = TRUE; +- +- for (p = g_list_first (plugin_list); p; p = p->next) +- { +- struct plugin_info *pi; +- +- /* Shutdown while recording etc no good. */ +- pi = (struct plugin_info *) p->data; +- success &= plugin_running (pi); +- } +- +- /* libgnomeui 2.8 bug: ignores return value. */ +- client->save_successfull = success; +- +- return success; +-} +- +-static void +-session_die (GnomeClient * client, +- gpointer user_data) +-{ +- client = client; +- user_data = user_data; +- +- on_python_command1 (GTK_WIDGET (zapping), "zapping.quit()"); +-} +- + #include "pixmaps/brightness.h" + #include "pixmaps/contrast.h" + #include "pixmaps/saturation.h" +@@ -186,36 +128,21 @@ + #include "pixmaps/screenshot.h" + + #define ADD_STOCK(name) \ +- item.stock_id = "zapping-" #name; \ +- gtk_stock_add (&item, 1); \ +- z_icon_factory_add_pixdata (item.stock_id, & name ## _png); ++ z_icon_factory_add_pixdata ("zapping-" #name, & name ## _png); + + static void + init_zapping_stock (void) + { +- static const GtkStockItem items [] = { +- { "zapping-mute", N_("Mute"), 0, 0, NULL }, +- { "zapping-teletext", N_("Teletext"), 0, 0, NULL }, +- { "zapping-subtitle", N_("Subtitles"), 0, 0, NULL }, +- { "zapping-video", N_("Video"), 0, 0, NULL }, +- }; +- GtkStockItem item; +- +- CLEAR (item); +- + ADD_STOCK (brightness); + ADD_STOCK (contrast); + ADD_STOCK (saturation); + ADD_STOCK (hue); + ADD_STOCK (recordtb); + ADD_STOCK (screenshot); +- +- gtk_stock_add (items, G_N_ELEMENTS (items)); +- +- z_icon_factory_add_pixdata ("zapping-mute", &mute_png); +- z_icon_factory_add_pixdata ("zapping-teletext", &teletext_png); +- z_icon_factory_add_pixdata ("zapping-subtitle", &subtitle_png); +- z_icon_factory_add_pixdata ("zapping-video", &video_png); ++ ADD_STOCK (mute); ++ ADD_STOCK (teletext); ++ ADD_STOCK (subtitle); ++ ADD_STOCK (video); + } + + static void +@@ -384,6 +311,8 @@ + char ** argv) + { + GList * p; ++ GOptionContext *ctxt; ++ GError *error = NULL; + gint x_bpp = -1; + gint dword_align = FALSE; + gint disable_plugins = FALSE; +@@ -417,13 +346,13 @@ + }; + gint num_fallbacks = sizeof(fallback_devices)/sizeof(char*); + +- const struct poptOption options[] = { ++ const GOptionEntry options[] = { + { + "device", + 0, +- POPT_ARG_STRING, +- &video_device, + 0, ++ G_OPTION_ARG_FILENAME, ++ &video_device, + N_("Kernel video device"), + N_("FILENAME") + }, +@@ -433,54 +362,54 @@ + { + "xv-video-port", + 0, +- POPT_ARG_INT, +- &xv_video_port, + 0, ++ G_OPTION_ARG_INT, ++ &xv_video_port, + N_("XVideo video input port"), + NULL + }, + { + "xv-image-port", + 0, +- POPT_ARG_INT, +- &xv_image_port, + 0, ++ G_OPTION_ARG_INT, ++ &xv_image_port, + N_("XVideo image overlay port"), + NULL + }, + { + "xv-port", /* for compatibility with Zapping 0.6 */ + 0, +- POPT_ARG_INT, +- &xv_video_port, + 0, ++ G_OPTION_ARG_INT, ++ &xv_video_port, + N_("XVideo video input port"), + NULL + }, + { + "no-xv-video", + 0, +- POPT_ARG_NONE, +- &disable_xv_video, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_xv_video, + N_("Disable XVideo video input support"), + NULL + }, + { + "no-xv-image", + 0, +- POPT_ARG_NONE, +- &disable_xv_image, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_xv_image, + N_("Disable XVideo image overlay support"), + NULL + }, + { + "no-xv", /* for compatibility with Zapping 0.6 */ + 'v', +- POPT_ARG_NONE, +- &disable_xv, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_xv, + N_("Disable XVideo extension support"), + NULL + }, +@@ -490,36 +419,36 @@ + { + "no-overlay", + 0, +- POPT_ARG_NONE, +- &disable_overlay, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_overlay, + N_("Disable video overlay"), + NULL + }, + { + "remote", + 0, +- POPT_ARG_NONE, +- &disable_overlay, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_overlay, + N_("X display is remote, disable video overlay"), + NULL + }, + { + "no-vbi", + 'i', +- POPT_ARG_NONE, +- &disable_vbi, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_vbi, + N_("Disable VBI support"), + NULL + }, + { + "no-plugins", + 'p', +- POPT_ARG_NONE, +- &disable_plugins, + 0, ++ G_OPTION_ARG_NONE, ++ &disable_plugins, + N_("Disable plugins"), + NULL + }, +@@ -530,9 +459,9 @@ + used, but kept for compatibility. */ + "no-zsfb", + 'z', +- POPT_ARG_NONE, +- &dummy, + 0, ++ G_OPTION_ARG_NONE, ++ &dummy, + /* TRANSLATORS: --no-zsfb command line option. */ + N_("Obsolete"), + NULL +@@ -540,72 +469,72 @@ + { + "esd-out", + 0, +- POPT_ARG_NONE, +- &esd_output, + 0, +- "Copy recorded sound to sound daemon", ++ G_OPTION_ARG_NONE, ++ &esd_output, ++ "Copy recorded sound to sound daemon (obsolete)", + NULL + }, + { + "ivtv-audio", + 0, +- POPT_ARG_NONE, +- &ivtv_audio, + 0, ++ G_OPTION_ARG_NONE, ++ &ivtv_audio, + "Use ivtv audio device", + NULL + }, + { + "bpp", + 'b', +- POPT_ARG_INT, +- &x_bpp, + 0, ++ G_OPTION_ARG_INT, ++ &x_bpp, + N_("Color depth of the X display"), + N_("BPP") + }, + { + "debug", + 'd', +- POPT_ARG_NONE, +- &debug_msg, + 0, ++ G_OPTION_ARG_NONE, ++ &debug_msg, + N_("Print debug messages"), + NULL + }, + { + "io-debug", + 0, +- POPT_ARG_NONE, +- &io_debug_msg, + 0, ++ G_OPTION_ARG_NONE, ++ &io_debug_msg, + 0, /* N_("Log driver accesses"), */ + NULL + }, + { + "dword-align", + 0, +- POPT_ARG_NONE, +- &dword_align, + 0, ++ G_OPTION_ARG_NONE, ++ &dword_align, + N_("Force dword alignment of the overlay window"), + NULL + }, + { + "command", + 'c', +- POPT_ARG_STRING, +- &command, + 0, ++ G_OPTION_ARG_STRING, ++ &command, + N_("Execute the given command and exit"), + N_("CMD") + }, + { + "yuv-format", + 'y', +- POPT_ARG_STRING, +- &yuv_format, + 0, ++ G_OPTION_ARG_STRING, ++ &yuv_format, + /* TRANSLATORS: --yuv-format command line option. */ + N_("Obsolete"), + NULL +@@ -613,9 +542,9 @@ + { + "tunerless-norm", + 'n', +- POPT_ARG_STRING, +- &norm, + 0, ++ G_OPTION_ARG_STRING, ++ &norm, + /* TRANSLATORS: --tunerless-norm command line option. */ + N_("Obsolete"), + NULL +@@ -623,19 +552,13 @@ + { + "cpu-features", + 0, +- POPT_ARG_STRING, +- &cpu_feature_str, + 0, ++ G_OPTION_ARG_STRING, ++ &cpu_feature_str, + N_("Override CPU detection"), + NULL + }, + { +- NULL, +- 0, +- 0, +- NULL, +- 0, +- NULL, + NULL + } /* end the list */ + }; +@@ -656,21 +579,22 @@ + textdomain (GETTEXT_PACKAGE); + #endif + +- gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE, +- argc, argv, +- GNOME_PARAM_APP_DATADIR, PACKAGE_DATA_DIR, +- GNOME_PARAM_POPT_TABLE, options, +- GNOME_CLIENT_PARAM_SM_CONNECT, TRUE, +- NULL); ++ ctxt = g_option_context_new (_("- television viewer for GNOME")); ++ g_option_context_add_main_entries (ctxt, options, GETTEXT_PACKAGE); ++ g_option_context_add_group (ctxt, gtk_get_option_group (TRUE)); ++ if (!g_option_context_parse (ctxt, &argc, &argv, &error)) ++ { ++ fprintf (stderr, _("Option parsing failed: %s\n"), error->message); ++ exit (EXIT_FAILURE); ++ } ++ ++ gtk_init (&argc, &argv); + + #ifndef HAVE_PROGRAM_INVOCATION_NAME + program_invocation_name = argv[0]; + program_invocation_short_name = g_get_prgname(); + #endif + +- session = gnome_master_client (); +- g_assert (NULL != session); +- + gconf_client = gconf_client_get_default (); + g_assert (NULL != gconf_client); + +@@ -706,10 +630,8 @@ + } + + D(); +- glade_gnome_init(); +- D(); +- gnome_window_icon_set_default_from_file +- (PACKAGE_PIXMAPS_DIR "/gnome-television.png"); ++ gtk_window_set_default_icon_from_file ++ (PACKAGE_PIXMAPS_DIR "/gnome-television.png", NULL); + D(); + init_zapping_stock (); + D(); +@@ -838,7 +760,8 @@ + + x11_screensaver_init (); + +- info = tveng_device_info_new(GDK_DISPLAY (), x_bpp); ++ info = tveng_device_info_new(GDK_DISPLAY_XDISPLAY ++ (gdk_display_get_default ()), x_bpp); + if (!info) + { + g_error(_("Cannot get device info struct")); +@@ -961,9 +884,6 @@ + if (-1 == tv_mute_set (info, TRUE)) + mutable = FALSE; + D(); +- z_tooltips_active (zconf_get_boolean +- (NULL, "/zapping/options/main/show_tooltips")); +- D(); + zconf_create_boolean (TRUE, NULL, "/zapping/options/main/disable_screensaver"); + x11_screensaver_control (zconf_get_boolean + (NULL, "/zapping/options/main/disable_screensaver")); +@@ -974,23 +894,17 @@ + D(); + zapping = ZAPPING (zapping_new ()); + { +- GnomeClientFlags flags; +- +- flags = gnome_client_get_flags (session); ++ gint width = 0; ++ gint height = 0; + +- /* When started by the session manager we automatically get our +- previous size and position. */ +- if (!(flags & GNOME_CLIENT_RESTARTED)) +- { +- gint width; +- gint height; ++ /* Get recorded window size. */ ++ zconf_get_int (&width, "/zapping/internal/callbacks/w"); ++ zconf_get_int (&height, "/zapping/internal/callbacks/h"); + +- zconf_get_int (&width, "/zapping/internal/callbacks/w"); +- zconf_get_int (&height, "/zapping/internal/callbacks/h"); ++ if (width && height) ++ gtk_window_set_default_size (GTK_WINDOW (zapping), width, height); + +- gtk_window_set_default_size (GTK_WINDOW (zapping), width, height); +- D(); +- } ++ D(); + } + gtk_widget_show(GTK_WIDGET (zapping)); + zapping->info = info; +@@ -1002,7 +916,7 @@ + + /* ensure that the main window is realized */ + gtk_widget_realize(GTK_WIDGET (zapping)); +- while (!GTK_WIDGET (zapping->video)->window) ++ while (!gtk_widget_get_window (GTK_WIDGET (zapping->video))) + z_update_gui(); + D(); + +@@ -1077,11 +991,6 @@ + D(); + restore_last_capture_mode (); + D(); +- printv("session manager\n"); +- g_signal_connect (session, "save-yourself", +- G_CALLBACK (session_save), argv[0]); +- g_signal_connect (session, "die", +- G_CALLBACK (session_die), NULL); + printv("going into main loop...\n"); + gtk_main(); + } +--- zapping.orig/src/osd.c ++++ zapping/src/osd.c +@@ -32,7 +32,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #define ZCONF_DOMAIN "/zapping/options/osd/" + #include "zconf.h" +@@ -94,20 +94,23 @@ + */ + static void + paint_piece (piece *p, ++ cairo_t *cr, + gint x, gint y, + gint w, gint h) + { +- z_pixbuf_render_to_drawable(p->scaled, p->da->window, +- p->da->style->white_gc, x, y, w, h); ++ z_pixbuf_render_to_drawable(p->scaled, gtk_widget_get_window (p->da), ++ cr, x, y, w, h); + } + + static gboolean +-expose (GtkWidget *da _unused_, +- GdkEventExpose *event, ++expose (GtkWidget *da, ++ cairo_t *cr, + piece *p) + { +- paint_piece(p, event->area.x, event->area.y, +- event->area.width, event->area.height); ++ GdkRectangle rect; ++ ++ gdk_cairo_get_clip_rectangle (cr, &rect); ++ paint_piece (p, cr, rect.x, rect.y, rect.width, rect.height); + + return TRUE; + } +@@ -218,22 +221,38 @@ + + if (!osd_window) + { +- if (gdk_window_get_parent(p->da->window) != orphanarium->window) +- gdk_window_reparent(p->da->window, orphanarium->window, 0, 0); ++ if (gdk_window_get_parent (gtk_widget_get_window (p->da)) ++ != gtk_widget_get_window (orphanarium)) ++ gdk_window_reparent (gtk_widget_get_window (p->da), ++ gtk_widget_get_window (orphanarium), 0, 0); + return; + } +- else if (osd_window->window != gdk_window_get_parent(p->da->window)) ++ else if (gtk_widget_get_window (osd_window) ++ != gdk_window_get_parent (gtk_widget_get_window (p->da))) + { +- gdk_window_reparent(p->da->window, osd_window->window, dest_x, +- dest_y); +- gdk_window_show(p->da->window); ++ gdk_window_reparent (gtk_widget_get_window (p->da), ++ gtk_widget_get_window (osd_window), ++ dest_x, dest_y); ++ gdk_window_show (gtk_widget_get_window (p->da)); + } + +- gdk_window_move_resize(p->da->window, +- dest_x, dest_y, dest_w, dest_h); ++ gdk_window_move_resize (gtk_widget_get_window (p->da), ++ dest_x, dest_y, dest_w, dest_h); + + if (p->scaled) +- paint_piece(p, 0, 0, dest_w, dest_h); ++ { ++ cairo_t *cr; ++ cairo_surface_t *surface; ++ ++ surface = gdk_window_create_similar_surface (gtk_widget_get_window ++ (p->da), ++ CAIRO_CONTENT_COLOR_ALPHA, ++ dest_w, dest_h); ++ cr = cairo_create (surface); ++ paint_piece (p, cr, 0, 0, dest_w, dest_h); ++ cairo_surface_destroy (surface); ++ cairo_destroy (cr); ++ } + } + + /** +@@ -276,7 +295,7 @@ + gtk_fixed_put(GTK_FIXED(orphanarium), da, 0, 0); + + gtk_widget_realize(da); +- gdk_window_set_back_pixmap(da->window, NULL, FALSE); ++ gdk_window_set_background_pattern (gtk_widget_get_window (da), NULL); + + return da; + } +@@ -284,8 +303,10 @@ + static void + unget_window(GtkWidget *window) + { +- if (gdk_window_get_parent(window->window) != orphanarium->window) +- gdk_window_reparent(window->window, orphanarium->window, 0, 0); ++ if (gdk_window_get_parent (gtk_widget_get_window (window)) ++ != gtk_widget_get_window (orphanarium)) ++ gdk_window_reparent (gtk_widget_get_window (window), ++ gtk_widget_get_window (orphanarium), 0, 0); + + gtk_widget_destroy(window); + } +@@ -355,7 +376,7 @@ + + p->da = da; + +- g_signal_connect(G_OBJECT(p->da), "expose-event", ++ g_signal_connect(G_OBJECT(p->da), "draw", + G_CALLBACK(expose), p); + + p->x = x; +@@ -453,35 +474,6 @@ + return FALSE; + } + +-/** +- * Given the rgb and the colormap creates a suitable color that should +- * be unref by unref_color +- */ +-static +-GdkColor *create_color (float r, float g, float b, +- GdkColormap *cmap) +-{ +- GdkColor *ret = g_malloc0(sizeof(GdkColor)); +- +- ret->red = r*65535; +- ret->green = g*65535; +- ret->blue = b*65535; +- +- gdk_colormap_alloc_color(cmap, ret, FALSE, TRUE); +- +- return ret; +-} +- +-/** +- * Decreases the reference count of the given color, allocated with +- * create_color. +- */ +-static void +-unref_color (GdkColor *color, GdkColormap *cmap) +-{ +- gdk_colormap_free_colors(cmap, color, 1); +- g_free(color); +-} + + static gchar * + remove_markup (const gchar * s) +@@ -576,16 +568,16 @@ + osd_render_osd (void (*timeout_cb)(gboolean), + const gchar *src, gboolean markup) + { +- GdkDrawable *canvas; ++ cairo_surface_t *canvas; ++ cairo_t *cr; + GtkWidget *patch = pop_window (); ++ GdkWindow *window = gtk_widget_get_window (patch); + PangoContext *context = gtk_widget_get_pango_context (patch); + PangoLayout *layout = pango_layout_new (context); + PangoFontDescription *pfd = NULL; +- GdkGC *gc = gdk_gc_new (patch->window); +- GdkColormap *cmap = gdk_drawable_get_colormap (patch->window); + const gchar *fname = zcg_char (NULL, "font"); + PangoRectangle logical, ink; +- GdkColor *bg; ++ GdkRGBA rgba; + gint w, h; + gfloat rx, ry, rw, rh; + gchar *buf = g_strdup_printf ("%s", +@@ -616,7 +608,6 @@ + GTK_MESSAGE_ERROR); + unget_window (patch); + g_object_unref (G_OBJECT (layout)); +- g_object_unref (G_OBJECT (gc)); + g_free (buf); + return; + } +@@ -635,18 +626,22 @@ + w = logical.width; + h = logical.height; + +- canvas = gdk_pixmap_new (patch->window, w, h, -1); ++ canvas = gdk_window_create_similar_surface (window, ++ CAIRO_CONTENT_COLOR_ALPHA, w, h); + + /* Draw the canvas contents */ +- bg = create_color(zcg_float(NULL, "bg_r"), +- zcg_float(NULL, "bg_g"), +- zcg_float(NULL, "bg_b"), cmap); +- +- gdk_gc_set_foreground(gc, bg); +- gdk_draw_rectangle(canvas, gc, TRUE, 0, 0, w, h); +- unref_color(bg, cmap); ++ cr = cairo_create (canvas); ++ rgba.red = zcg_float (NULL, "bg_r"); ++ rgba.green = zcg_float (NULL, "bg_g"); ++ rgba.blue = zcg_float (NULL, "bg_b"); ++ rgba.alpha = 1.0; ++ ++ gdk_cairo_set_source_rgba (cr, &rgba); ++ cairo_rectangle (cr, 0, 0, w, h); ++ cairo_fill (cr); + +- gdk_draw_layout (canvas, gc, 0, 0, layout); ++ cairo_move_to (cr, 0, 0); ++ pango_cairo_show_layout (cr, layout); + + /* Compute the resulting patch geometry */ + rh = 0.1; +@@ -662,8 +657,7 @@ + ry = 1 - rh; + + /* Create the patch */ +- add_piece(gdk_pixbuf_get_from_drawable +- (NULL, canvas, cmap, 0, 0, 0, 0, w, h), ++ add_piece (gdk_pixbuf_get_from_window (window, 0, 0, w, h), + patch, 0, OSD_ROW, 0, 0, 0, rx, ry, rw, rh, NULL); + + zmodel_changed(osd_model); +@@ -686,8 +680,8 @@ + /* Cleanup */ + pango_font_description_free (pfd); + g_object_unref (G_OBJECT (layout)); +- g_object_unref (G_OBJECT (canvas)); +- g_object_unref (G_OBJECT (gc)); ++ cairo_surface_destroy (canvas); ++ cairo_destroy (cr); + g_free (buf); + } + +@@ -882,10 +876,14 @@ + void + osd_set_window(GtkWidget *dest_window) + { ++ GdkWindow *window; ++ + gtk_widget_realize(dest_window); ++ window = gtk_widget_get_window (dest_window); + + cx = cy = 0; +- gdk_drawable_get_size(dest_window->window, &cw, &ch); ++ cw = gdk_window_get_width (window); ++ ch = gdk_window_get_height (window); + + set_window(dest_window, FALSE); + } +@@ -997,11 +995,12 @@ + osd_setup (GtkWidget *page) + { + GtkWidget *widget; ++ GdkRGBA fg, bg; + + /* OSD type */ + widget = lookup_widget(page, "optionmenu22"); +- gtk_option_menu_set_history(GTK_OPTION_MENU(widget), +- (guint) zcg_int(NULL, "osd_type")); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), ++ zcg_int(NULL, "osd_type")); + on_osd_type_changed (page, page); + + g_signal_connect(G_OBJECT (widget), "changed", +@@ -1011,24 +1010,24 @@ + /* OSD font */ + widget = lookup_widget(page, "general-osd-font-selector"); + if (zcg_char(NULL, "font")) +- gnome_font_picker_set_font_name(GNOME_FONT_PICKER(widget), +- zcg_char(NULL, "font")); ++ gtk_font_chooser_set_font (GTK_FONT_CHOOSER (widget), ++ zcg_char(NULL, "font")); + + /* OSD foreground color */ ++ fg.red = zcg_float (NULL, "fg_r"); ++ fg.green = zcg_float (NULL, "fg_g"); ++ fg.blue = zcg_float (NULL, "fg_b"); ++ fg.alpha = 1.0; + widget = lookup_widget(page, "general-osd-foreground-selector"); +- gnome_color_picker_set_d(GNOME_COLOR_PICKER(widget), +- zcg_float(NULL, "fg_r"), +- zcg_float(NULL, "fg_g"), +- zcg_float(NULL, "fg_b"), +- 0.0); ++ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), &fg); + + /* OSD background color */ ++ bg.red = zcg_float (NULL, "bg_r"); ++ bg.green = zcg_float (NULL, "bg_g"); ++ bg.blue = zcg_float (NULL, "bg_b"); ++ bg.alpha = 1.0; + widget = lookup_widget(page, "general-osd-background-selector"); +- gnome_color_picker_set_d(GNOME_COLOR_PICKER(widget), +- zcg_float(NULL, "bg_r"), +- zcg_float(NULL, "bg_g"), +- zcg_float(NULL, "bg_b"), +- 0.0); ++ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), &bg); + + /* OSD timeout in seconds */ + widget = lookup_widget(page, "spinbutton2"); +@@ -1040,28 +1039,26 @@ + osd_apply (GtkWidget *page) + { + GtkWidget *widget; +- gdouble r, g, b, a; ++ GdkRGBA rgba; + + widget = lookup_widget(page, "optionmenu22"); /* osd type */ + zcs_int(z_option_menu_get_active(widget), "osd_type"); + + widget = lookup_widget(page, "general-osd-font-selector"); +- zcs_char(gnome_font_picker_get_font_name(GNOME_FONT_PICKER(widget)), +- "font"); ++ zcs_char (gtk_font_chooser_get_font (GTK_FONT_CHOOSER (widget)), ++ "font"); + + widget = lookup_widget(page, "general-osd-foreground-selector"); +- gnome_color_picker_get_d(GNOME_COLOR_PICKER(widget), &r, &g, &b, +- &a); +- zcs_float(r, "fg_r"); +- zcs_float(g, "fg_g"); +- zcs_float(b, "fg_b"); ++ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &rgba); ++ zcs_float (rgba.red, "fg_r"); ++ zcs_float (rgba.green, "fg_g"); ++ zcs_float (rgba.blue, "fg_b"); + + widget = lookup_widget(page, "general-osd-background-selector"); +- gnome_color_picker_get_d(GNOME_COLOR_PICKER(widget), &r, &g, &b, +- &a); +- zcs_float(r, "bg_r"); +- zcs_float(g, "bg_g"); +- zcs_float(b, "bg_b"); ++ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &rgba); ++ zcs_float (rgba.red, "bg_r"); ++ zcs_float (rgba.green, "bg_g"); ++ zcs_float (rgba.blue, "bg_b"); + + widget = lookup_widget(page, "spinbutton2"); /* osd timeout */ + zcs_float(gtk_spin_button_get_value(GTK_SPIN_BUTTON(widget)), "timeout"); +@@ -1082,7 +1079,7 @@ + + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "zapping.glade2"); ++ "zapping.ui"); + } + + /** +--- zapping.orig/src/overlay.c ++++ zapping/src/overlay.c +@@ -129,8 +129,7 @@ + /** The overlay rectangle, relative to root_window. */ + tv_window overlay_rect; + +- GdkColormap * colormap; +- GdkColor chroma_key_color; ++ GdkRGBA chroma_key_color; + guint chroma_key_color_cnxn_id; + + GdkEventMask old_root_events; +@@ -187,10 +186,12 @@ + get_clips (const struct context * c, + tv_clip_vector * vector) + { ++ GdkWindow *window = gtk_widget_get_window (c->video_window); ++ + if (!x11_window_clip_vector + (vector, +- GDK_WINDOW_XDISPLAY (c->video_window->window), +- GDK_WINDOW_XID (c->video_window->window), ++ GDK_WINDOW_XDISPLAY (window), ++ GDK_WINDOW_XID (window), + c->overlay_rect.x, + c->overlay_rect.y, + c->overlay_rect.width, +@@ -487,11 +488,11 @@ + } + + static unsigned int +-chroma_key_rgb (GdkColor * color) ++chroma_key_rgb (GdkRGBA * color) + { +- return ((color->red >> 8) | +- (color->green & 0xFF00) | +- ((color->blue & 0xFF00) << 8)); ++ return (((int) (color->red * 255) << 16) | ++ ((int) (color->green * 255) << 8) | ++ (int) (color->blue * 255)); + } + + static gboolean +@@ -515,14 +516,6 @@ + /* Implied by tv_set_overlay_window_chromakey(): + tv_enable_overlay (c->info, FALSE); */ + +- /* Restore background color (chroma key). XXX the X server +- should do this automatically, did we we disabled that +- somewhere to avoid flicker in capture overlay_mode? */ +- gdk_window_clear_area (c->video_window->window, +- /* x, y */ 0, 0, +- c->vw_width, +- c->vw_height); +- + if (!select_screen (c)) + return FALSE; + +@@ -576,15 +569,6 @@ + + tv_enable_overlay (c->info, FALSE); + +- if (c->colormap) +- { +- /* Restore background color (chroma key). */ +- gdk_window_clear_area (c->video_window->window, +- /* x, y */ 0, 0, +- c->vw_width, +- c->vw_height); +- } +- + /* XXX set overlay rectangle here, currently the XVideo + interface fills the entire window when overlay is enabled. */ + +@@ -920,7 +904,7 @@ + G_CALLBACK (callback), + /* user_data */ c); + +- gdk_window_set_events (widget->window, old_events); ++ gdk_window_set_events (gtk_widget_get_window (widget), old_events); + } + + void +@@ -990,16 +974,7 @@ + + terminate (c); + +- if (c->colormap) +- { +- gdk_colormap_free_colors (c->colormap, +- &c->chroma_key_color, 1); +- +- g_object_unref (G_OBJECT (c->colormap)); +- c->colormap = NULL; +- +- z_set_window_bg_black (c->video_window); +- } ++ z_set_window_bg_black (c->video_window); + + tv_clip_vector_destroy (&c->tmp_vector); + tv_clip_vector_destroy (&c->cur_vector); +@@ -1013,20 +988,27 @@ + } + + static gboolean +-chroma_key_color_from_config (GdkColor * color) ++chroma_key_color_from_config (GdkRGBA * color) + { ++ gchar *value; ++ gboolean success; ++ + /* Factory default if the config is inaccessible + or the string is malformed. */ +- color->pixel = 0; +- color->red = 0xFFFF; +- color->green = 0xCCCC; +- color->blue = 0xCCCC; ++ color->alpha = 1.0; ++ color->red = 1.0; ++ color->green = 0.8; ++ color->blue = 0.8; + + /* XXX error message please. */ +- return z_gconf_get_color (color, "/apps/zapping/window/chroma_key_color"); ++ z_gconf_get_string (&value, "/apps/zapping/window/chroma_key_color"); ++ success = gdk_rgba_parse (color, value); ++ g_free (value); ++ ++ return success; + } + +-static GdkColor * ++static GdkRGBA * + set_window_bg_black (struct context * c) + { + z_set_window_bg_black (c->video_window); +@@ -1036,53 +1018,32 @@ + return &c->chroma_key_color; + } + +-static GdkColor * ++static GdkRGBA * + set_window_bg_from_config (struct context * c) + { +- GdkColor color; ++ GdkRGBA color; + + if (!DEVICE_SUPPORTS_CHROMA_KEYING (c)) + return set_window_bg_black (c); + +- if (c->colormap) +- { +- gdk_colormap_free_colors (c->colormap, +- &c->chroma_key_color, 1); +- } +- else +- { +- c->colormap = gdk_colormap_get_system (); +- } +- + /* Error ignored, will continue with default. */ + chroma_key_color_from_config (&color); + c->chroma_key_color = color; + +- if (!OVERLAY_COLORMAP_FAILURE_TEST +- && gdk_colormap_alloc_color (c->colormap, +- &c->chroma_key_color, +- /* writable */ FALSE, +- /* or_best_match */ TRUE)) ++ if (!OVERLAY_COLORMAP_FAILURE_TEST) + { +- /* Note gdk_colormap_alloc_color() may change c->chroma_key_color. */ +- + z_set_window_bg (c->video_window, &c->chroma_key_color); + + return &c->chroma_key_color; + } + else + { +- g_object_unref (G_OBJECT (c->colormap)); +- c->colormap = NULL; +- + z_show_non_modal_message_dialog + (GTK_WINDOW (zapping), GTK_MESSAGE_ERROR, + _("No chroma-key color"), +- _("Color #%2X%2X%2X is not available for chroma-keying. " ++ _("Color %s is not available for chroma-keying. " + "Try another color.\n"), +- color.red >> 8, +- color.green >> 8, +- color.blue >> 8); ++ gdk_rgba_to_string (&color)); + + return set_window_bg_black (c); + } +@@ -1104,7 +1065,7 @@ + set_window_bg_from_config (c); + } + +-static GdkColor * ++static GdkRGBA * + watch_config_chroma_key_color (struct context * c) + { + if (!DEVICE_SUPPORTS_CHROMA_KEYING (c)) +@@ -1127,14 +1088,16 @@ + GdkEventMask new_events) + { + GdkEventMask old_events; ++ GdkWindow *window; + + if (NULL != callback) + g_signal_connect (G_OBJECT (widget), "event", + G_CALLBACK (callback), + /* user_data */ c); + +- old_events = gdk_window_get_events (widget->window); +- gdk_window_set_events (widget->window, old_events | new_events); ++ window = gtk_widget_get_window (widget); ++ old_events = gdk_window_get_events (window); ++ gdk_window_set_events (window, old_events | new_events); + + return old_events; + } +@@ -1158,13 +1121,12 @@ + c->main_window = main_window; + c->video_window = video_window; + +- gdk_window_get_origin (c->main_window->window, ++ gdk_window_get_origin (gtk_widget_get_window (c->main_window), + &c->mw_x, &c->mw_y); + +- gdk_window_get_geometry (c->video_window->window, ++ gdk_window_get_geometry (gtk_widget_get_window (c->video_window), + &c->vw_x, &c->vw_y, +- &width, &height, +- /* depth */ NULL); ++ &width, &height); + c->vw_width = width; + c->vw_height = height; + +@@ -1177,7 +1139,7 @@ + /* Make sure we use an XVideo adaptor which can render into + da->window. (Doesn't matter with X.org but it's the right thing + to do.) */ +- xwindow = GDK_WINDOW_XWINDOW (c->video_window->window); ++ xwindow = GDK_WINDOW_XID (gtk_widget_get_window (c->video_window)); + + /* Switch to overlay mode, XVideo or other. */ + if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), +@@ -1225,22 +1187,36 @@ + switch (c->overlay_mode) + { + GC xgc; +- GdkColor *color; ++ GdkRGBA *color; ++ GdkWindow *window; ++ Display *disp; ++ XGCValues values; + unsigned int rgb; + + case XVIDEO_OVERLAY: + /* XXX no const limit please, ask the driver instead. */ + z_video_set_max_size (Z_VIDEO (video_window), 768, 576); + +- xwindow = GDK_WINDOW_XWINDOW (c->video_window->window); +- xgc = GDK_GC_XGC (c->video_window->style->white_gc); ++ window = gtk_widget_get_window (c->video_window); ++ xwindow = GDK_WINDOW_XID (window); ++ disp = GDK_SCREEN_XDISPLAY (gdk_window_get_screen (window)); ++ values.graphics_exposures = False; ++ values.fill_style = FillTiled; ++ xgc = XCreateGC (disp, xwindow, GCGraphicsExposures | GCFillStyle, ++ &values); + + color = watch_config_chroma_key_color (c); + + rgb = chroma_key_rgb (color); + ++ /* Memory leak: xgc is not freed on success. Perhaps it should ++ be a global variable that is handled in stop_overlay. */ + if (!tv_set_overlay_xwindow (c->info, xwindow, xgc, rgb)) +- goto failure; ++ { ++ XFreeGC (disp, xgc); ++ ++ goto failure; ++ } + + /* Disable double buffering just in case, will help when a + XV driver doesn't provide XV_COLORKEY but requires the colorkey +--- zapping.orig/src/zmisc.c ++++ zapping/src/zmisc.c +@@ -83,22 +83,22 @@ + dialog = gtk_dialog_new_with_buttons + (title, GTK_WINDOW (main_window), + GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL, +- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, +- GTK_STOCK_OK, GTK_RESPONSE_OK, ++ _("_Cancel"), GTK_RESPONSE_CANCEL, ++ _("_OK"), GTK_RESPONSE_OK, + NULL); + + gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); + +- vbox = GTK_BOX (GTK_DIALOG (dialog) -> vbox); ++ vbox = GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (dialog))); + + if (prompt) + { + label = gtk_label_new (prompt); +- gtk_box_pack_start_defaults (vbox, label); ++ gtk_box_pack_start (vbox, label, TRUE, TRUE, 0); + gtk_widget_show(label); + } + entry = gtk_entry_new(); +- gtk_box_pack_start_defaults(GTK_BOX(vbox), entry); ++ gtk_box_pack_start (vbox, entry, TRUE, TRUE, 0); + gtk_widget_show(entry); + gtk_widget_grab_focus(entry); + if (default_text) +@@ -122,128 +122,34 @@ + const gchar * icon) + { + GtkWidget * imi; +- GtkWidget * image; +- +- imi = gtk_image_menu_item_new_with_mnemonic (mnemonic); + + if (icon) + { +- image = gtk_image_new_from_stock (icon, GTK_ICON_SIZE_MENU); +- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (imi), +- image); +- /* not sure whether this is necessary, but won't harm */ +- gtk_widget_show (image); +- } +- +- return (imi); +-} +- +-/* +- * Zapping Global Tooltips +- */ +- +-static GList * tooltips_list = NULL; +-static GtkTooltips * tooltips_default = NULL; +-static gboolean tooltips_enabled = TRUE; +- +-static void +-tooltips_destroy_notify (gpointer data, +- GObject *where_the_object_was _unused_) +-{ +- tooltips_list = g_list_remove (tooltips_list, data); +-} +- +-GtkTooltips * +-z_tooltips_add (GtkTooltips * tips) +-{ +- if (!tips) +- tips = gtk_tooltips_new (); /* XXX destroy at exit */ +- +- tooltips_list = g_list_append (tooltips_list, (gpointer) tips); +- +- g_object_weak_ref (G_OBJECT (tips), +- tooltips_destroy_notify, +- (gpointer) tips); +- +- if (tooltips_enabled) +- gtk_tooltips_enable (tips); +- else +- gtk_tooltips_disable (tips); +- +- return tips; +-} +- +-void +-z_tooltips_active (gboolean enable) +-{ +- GList *list; +- +- tooltips_enabled = enable; +- +- for (list = tooltips_list; list; list = list->next) +- { +- if (enable) +- gtk_tooltips_enable (GTK_TOOLTIPS (list->data)); +- else +- gtk_tooltips_disable (GTK_TOOLTIPS (list->data)); +- } +-} +- +-void +-z_tooltip_set (GtkWidget * widget, +- const gchar * tip_text) +-{ +- if (!tooltips_default) +- tooltips_default = z_tooltips_add (NULL); +- +-#ifndef ZMISC_TOOLTIP_WARNING +-#define ZMISC_TOOLTIP_WARNING 0 +-#endif +- +- if (ZMISC_TOOLTIP_WARNING && GTK_WIDGET_NO_WINDOW(widget)) +- fprintf(stderr, "Warning: tooltip <%s> for " +- "widget without window\n", tip_text); +- +- gtk_tooltips_set_tip (tooltips_default, widget, tip_text, "private tip"); +-} +- +-GtkWidget * +-z_tooltip_set_wrap (GtkWidget * widget, +- const gchar * tip_text) +-{ +- if (!tooltips_default) +- tooltips_default = z_tooltips_add (NULL); +- +- if (GTK_WIDGET_NO_WINDOW(widget)) +- { +- GtkWidget *event_box = gtk_event_box_new (); ++ GtkWidget *box; ++ GtkWidget *image; ++ GtkWidget *label; + +- gtk_widget_show (widget); +- gtk_container_add (GTK_CONTAINER (event_box), widget); +- widget = event_box; ++ /* A convoluted and suboptimal replacement for GtkImageMenuItem, ++ mostly identical to the example in the API documentation. */ ++ box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++ image = gtk_image_new_from_icon_name (icon, GTK_ICON_SIZE_MENU); ++ label = gtk_label_new_with_mnemonic (mnemonic); ++ imi = gtk_menu_item_new (); ++ ++ gtk_container_add (GTK_CONTAINER (box), image); ++ gtk_label_set_use_underline (GTK_LABEL (label), TRUE); ++ /* The suggested xalign property value is 0.0 but this makes it ++ look weird as the icon is glued to the label. */ ++ gtk_label_set_xalign (GTK_LABEL (label), 0.1); ++ gtk_box_pack_end (GTK_BOX (box), label, TRUE, TRUE, 0); ++ gtk_container_add (GTK_CONTAINER (imi), box); + } ++ else ++ imi = gtk_menu_item_new_with_mnemonic (mnemonic); + +- gtk_tooltips_set_tip (tooltips_default, widget, tip_text, "private tip"); +- +- return widget; +-} +- +-void +-z_set_sensitive_with_tooltip (GtkWidget * widget, +- gboolean sensitive, +- const gchar * on_tip, +- const gchar * off_tip) +-{ +- const gchar *new_tip; +- +- if (!tooltips_default) +- tooltips_default = z_tooltips_add (NULL); +- +- gtk_widget_set_sensitive (widget, sensitive); +- +- new_tip = sensitive ? on_tip : off_tip; /* can be NULL */ ++ gtk_widget_show_all (imi); + +- gtk_tooltips_set_tip (tooltips_default, widget, new_tip, NULL); ++ return (imi); + } + + /**************************************************************************/ +@@ -324,7 +230,6 @@ + #ifdef HAVE_LIBZVBI + + TeletextView *view; +- BonoboDockItem *dock_item; + + /* Teletext in main window */ + +@@ -339,9 +244,7 @@ + (G_OBJECT (zapping), G_SIGNAL_MATCH_FUNC, + 0, 0, NULL, G_CALLBACK (on_zapping_key_press), NULL); + +- dock_item = gnome_app_get_dock_item_by_name (&zapping->app, +- "teletext-toolbar"); +- gtk_widget_destroy (GTK_WIDGET (dock_item)); ++ gtk_widget_destroy (GTK_WIDGET (view->toolbar)); + + gtk_widget_destroy (GTK_WIDGET (view)); + g_object_set_data (G_OBJECT (zapping), "TeletextView", NULL); +@@ -362,7 +265,6 @@ + GtkWidget *widget; + gint width; + gint height; +- BonoboDockItemBehavior behaviour; + + if (!_teletext_view_new + || !zvbi_get_object ()) +@@ -378,8 +280,9 @@ + + /* Bktr driver needs special programming for VBI-only mode. */ + if (-1 == tveng_attach_device (zcg_char (NULL, "video_device"), +- GDK_WINDOW_XWINDOW +- (GTK_WIDGET (zapping->video)->window), ++ GDK_WINDOW_XID ++ (gtk_widget_get_window (GTK_WIDGET ++ (zapping->video))), + TVENG_ATTACH_VBI, zapping->info)) + { + ShowBox ("Teletext mode not available.", +@@ -416,19 +319,9 @@ + + view->toolbar = (TeletextToolbar *) widget; + +- behaviour = BONOBO_DOCK_ITEM_BEH_EXCLUSIVE; +- if (!gconf_client_get_bool +- (gconf_client, "/desktop/gnome/interface/toolbar_detachable", NULL)) +- behaviour |= BONOBO_DOCK_ITEM_BEH_LOCKED; +- +- gnome_app_add_toolbar (&zapping->app, +- GTK_TOOLBAR (widget), +- "teletext-toolbar", +- behaviour, +- BONOBO_DOCK_TOP, +- /* band_num */ 2, +- /* band_position */ 0, +- /* offset */ 0); ++ gtk_container_add (GTK_CONTAINER (gtk_widget_get_ancestor ++ (GTK_WIDGET (view), GTK_TYPE_BOX)), ++ widget); + + zapping_view_appbar (zapping, TRUE); + +@@ -441,12 +334,11 @@ + gtk_container_add (GTK_CONTAINER (zapping->contents), + GTK_WIDGET (view)); + +- gdk_window_get_geometry (GTK_WIDGET (view)->window, ++ gdk_window_get_geometry (gtk_widget_get_window (GTK_WIDGET (view)), + /* x */ NULL, + /* y */ NULL, + &width, +- &height, +- /* depth */ NULL); ++ &height); + + if (width > 10 && height > 10) + view->client_redraw (view, width, height); +@@ -463,27 +355,27 @@ + + void + z_set_window_bg (GtkWidget * widget, +- GdkColor * color) ++ GdkRGBA * color) + { + GdkRectangle rect; ++ GdkWindow *window; + +- gtk_widget_modify_bg (widget, GTK_STATE_NORMAL, color); ++ gtk_widget_override_background_color (widget, GTK_STATE_FLAG_NORMAL, color); + + rect.x = 0; + rect.y = 0; +- rect.width = widget->allocation.width; +- rect.height = widget->allocation.height; ++ rect.width = gtk_widget_get_allocated_width (widget); ++ rect.height = gtk_widget_get_allocated_height (widget); + +- gdk_window_invalidate_rect (widget->window, &rect, /* children */ FALSE); +- gdk_window_process_updates (widget->window, /* children */ FALSE); ++ window = gtk_widget_get_window (widget); ++ gdk_window_invalidate_rect (window, &rect, /* children */ FALSE); ++ gdk_window_process_updates (window, /* children */ FALSE); + } + + void + z_set_window_bg_black (GtkWidget * widget) + { +- GdkColor color; +- +- CLEAR (color); ++ GdkRGBA color = {0, 0, 0, 1}; + + z_set_window_bg (widget, &color); + } +@@ -559,6 +451,7 @@ + tveng_device_info * info, + gboolean warnings) + { ++ GdkWindow *window; + int return_value = 0; + gint x, y, w, h; + display_mode old_dmode; +@@ -596,13 +489,9 @@ + video standard over to the new device. FIXME also control values. */ + zconf_set_sources (info); + +- { +- GdkWindow *window; +- +- window = GTK_WIDGET (zapping->video)->window; +- gdk_window_get_geometry(window, NULL, NULL, &w, &h, NULL); +- gdk_window_get_origin(window, &x, &y); +- } ++ window = gtk_widget_get_window (GTK_WIDGET (zapping->video)); ++ gdk_window_get_geometry (window, NULL, NULL, &w, &h); ++ gdk_window_get_origin(window, &x, &y); + + #if 0 /* XXX should use quiet_set, but that can't handle yet + how the controls are rebuilt when switching btw +@@ -647,13 +536,13 @@ + { + if (-1 == tveng_attach_device + (zcg_char(NULL, "video_device"), +- GDK_WINDOW_XID (GTK_WIDGET (zapping->video)->window), ++ GDK_WINDOW_XID (window), + TVENG_ATTACH_READ, info)) + { + /* Try restoring as XVideo, error ignored. */ + tveng_attach_device + (zcg_char(NULL, "video_device"), +- GDK_WINDOW_XID (GTK_WIDGET (zapping->video)->window), ++ GDK_WINDOW_XID (window), + TVENG_ATTACH_XV, info); + + if (warnings) +@@ -829,13 +718,6 @@ + return -1; + } + +-void set_stock_pixmap (GtkWidget *button, +- const gchar *new_pix) +-{ +- gtk_button_set_use_stock (GTK_BUTTON (button), TRUE); +- gtk_button_set_label (GTK_BUTTON (button), new_pix); +-} +- + /** + * Just like gdk_pixbuf_copy_area but does clipping. + */ +@@ -900,7 +782,7 @@ + void + z_pixbuf_render_to_drawable (GdkPixbuf *pixbuf, + GdkWindow *window, +- GdkGC *gc, ++ cairo_t *cr, + gint x, + gint y, + gint width, +@@ -933,13 +815,9 @@ + if (width < 0 || height < 0) + return; + +- gdk_draw_pixbuf (window, gc, +- pixbuf, +- x, y, +- x, y, +- width, height, +- GDK_RGB_DITHER_NORMAL, +- x, y); ++ gdk_cairo_set_source_pixbuf (cr, pixbuf, x, y); ++ cairo_rectangle (cr, x, y, width, height); ++ cairo_fill (cr); + } + + gint +@@ -947,7 +825,7 @@ + GtkWidget *item) + { + gint return_value = +- g_list_index(GTK_MENU_SHELL(menu)->children, item); ++ g_list_index (gtk_container_get_children (GTK_CONTAINER (menu)), item); + + return return_value ? return_value : -1; + } +@@ -958,7 +836,8 @@ + { + GList *list; + +- list = g_list_nth (menu_shell->children, n); ++ list = g_list_nth (gtk_container_get_children (GTK_CONTAINER (menu_shell)), ++ n); + assert (list != NULL); + + return GTK_WIDGET (list->data); +@@ -968,50 +847,19 @@ + gint + z_option_menu_get_active (GtkWidget *option_menu) + { +- return gtk_option_menu_get_history (GTK_OPTION_MENU (option_menu)); ++ return gtk_combo_box_get_active (GTK_COMBO_BOX (option_menu)); + } + + void + z_option_menu_set_active (GtkWidget *option_menu, +- guint index) ++ gint index) + { +- gtk_option_menu_set_history(GTK_OPTION_MENU(option_menu), index); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (option_menu), index); + } + + static GtkAccelGroup *accel_group = NULL; + + static void +-change_pixmenuitem_label (GtkWidget *menuitem, +- const gchar *new_label) +-{ +- GtkWidget *widget = GTK_BIN(menuitem)->child; +- +- gtk_label_set_text(GTK_LABEL(widget), new_label); +-} +- +-void +-z_change_menuitem (GtkWidget *widget, +- const gchar *new_pixmap, +- const gchar *new_label, +- const gchar *new_tooltip) +-{ +- GtkWidget *image; +- +- if (new_label) +- change_pixmenuitem_label(widget, new_label); +- if (new_tooltip) +- z_tooltip_set(widget, new_tooltip); +- if (new_pixmap) +- { +- image = gtk_image_new_from_stock (new_pixmap, GTK_ICON_SIZE_MENU); +- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (widget), +- image); +- /* not sure whether this is necessary, but won't harm */ +- gtk_widget_show (image); +- } +-} +- +-static void + appbar_hide(GtkWidget *appbar _unused_) + { + zapping_view_appbar (zapping, FALSE); +@@ -1027,8 +875,8 @@ + if (old) + return; + +- widget = gtk_button_new_from_stock (GTK_STOCK_CLOSE); +- z_tooltip_set(widget, _("Hide the statusbar")); ++ widget = gtk_button_new_from_icon_name ("window-close", GTK_ICON_SIZE_BUTTON); ++ gtk_widget_set_tooltip_text (widget, _("Hide the statusbar")); + + if (widget) + gtk_box_pack_end(GTK_BOX(zapping->appbar), widget, FALSE, FALSE, 0); +@@ -1055,10 +903,7 @@ + } + else /* just clean */ + { +- GtkWidget *status; +- +- status = gnome_appbar_get_status (zapping->appbar); +- gtk_label_set_text (GTK_LABEL (status), ""); ++ gtk_statusbar_remove_all (zapping->appbar, 0); + } + + status_hide_timeout_id = NO_SOURCE_ID; +@@ -1072,18 +917,11 @@ + guint timeout, + gboolean hide) + { +- GtkWidget *status; +- + zapping_view_appbar (zapping, TRUE); + +- status = gnome_appbar_get_status (zapping->appbar); +- + add_hide (); + +- if (markup) +- gtk_label_set_markup (GTK_LABEL (status), message); +- else +- gtk_label_set_text (GTK_LABEL (status), message); ++ gtk_statusbar_push (zapping->appbar, 0, message); + + if (status_hide_timeout_id > 0) + g_source_remove (status_hide_timeout_id); +@@ -1371,7 +1209,7 @@ + + g_object_set_data_full (G_OBJECT (w), "basename", + g_strdup (basename), +- (GtkDestroyNotify) g_free); ++ (GDestroyNotify) g_free); + } + + /* See ttx export or screenshot for a demo */ +@@ -1560,14 +1398,10 @@ + { + GList *p; + +- for (p = toolbar->children; p; p = p->next) +- { +- GtkToolbarChild *child = (GtkToolbarChild *) p->data; +- +- if (child->type == GTK_TOOLBAR_CHILD_WIDGET +- && GTK_IS_TOOLBAR (child->widget)) +- z_toolbar_set_style_recursive (GTK_TOOLBAR (child->widget), style); +- } ++ for (p = gtk_container_get_children (GTK_CONTAINER (toolbar)); ++ p; p = p->next) ++ if (GTK_IS_TOOLBAR (p->data)) ++ z_toolbar_set_style_recursive (GTK_TOOLBAR (p->data), style); + + switch (style) + { +@@ -1769,7 +1603,7 @@ + z_device_entry *de = data; + + if (de->timeout != NO_SOURCE_ID) +- gtk_timeout_remove (de->timeout); ++ g_source_remove (de->timeout); + + tv_device_node_delete_list (&de->list); + +@@ -1846,15 +1680,9 @@ + } + + static void +-on_z_device_entry_changed (GtkEntry * entry, ++on_z_device_entry_changed (GtkComboBox * combobox, + gpointer user_data); + +-/* XXX deprecated, although the GtkCombo description elaborates: +- "The drop-down list is a GtkList widget and can be accessed +- using the list member of the GtkCombo. List elements can contain +- arbitrary widgets, [by appending GtkListItems to the list]" */ +-extern GtkWidget *gtk_list_item_new (void); +- + static void + z_device_entry_relist (z_device_entry * de) + { +@@ -1862,18 +1690,13 @@ + + if (de->combo) + gtk_widget_destroy (de->combo); +- de->combo = gtk_combo_new (); ++ de->combo = gtk_combo_box_text_new_with_entry (); + gtk_widget_show (de->combo); + + for (n = de->list; n; n = n->next) + { +- GtkWidget *item; +- GtkWidget *label; + gchar *s; + +- item = gtk_list_item_new (); +- gtk_widget_show (item); +- + /* XXX Perhaps add an icon indicating if the device is + present but busy (v4l...), or the user has no access permission. */ + +@@ -1885,19 +1708,15 @@ + else + s = g_strdup (n->device); + +- label = z_device_entry_label_new (s, 0); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (de->combo), s); + g_free (s); +- +- gtk_container_add (GTK_CONTAINER (item), label); +- gtk_combo_set_item_string (GTK_COMBO (de->combo), GTK_ITEM (item), n->device); +- gtk_container_add (GTK_CONTAINER (GTK_COMBO (de->combo)->list), item); + } + +- gtk_table_attach (GTK_TABLE (de->table), de->combo, 1, 2, 2, 2 + 1, +- GTK_FILL | GTK_EXPAND, 0, 0, 0); ++ gtk_table_attach (GTK_TABLE (de->table), de->combo, 1, 2, 2, 2 + 1, ++ GTK_FILL | GTK_EXPAND, 0, 0, 0); + +- g_signal_connect (G_OBJECT (GTK_COMBO (de->combo)->entry), +- "changed", G_CALLBACK (on_z_device_entry_changed), de); ++ g_signal_connect (de->combo, "changed", ++ G_CALLBACK (on_z_device_entry_changed), de); + } + + static gboolean +@@ -1905,9 +1724,9 @@ + { + z_device_entry *de = user_data; + tv_device_node *n; +- const gchar *s; ++ gchar *s; + +- s = gtk_entry_get_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry)); ++ s = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (de->combo)); + + if (s && s[0]) + if ((n = de->open_fn (de->table, de->list, s, de->user_data))) +@@ -1915,6 +1734,7 @@ + tv_device_node_add (&de->list, n); + z_device_entry_relist (de); + z_device_entry_select (de, n); ++ g_free (s); + return FALSE; + } + +@@ -1924,20 +1744,20 @@ + } + + static void +-on_z_device_entry_changed (GtkEntry * entry, ++on_z_device_entry_changed (GtkComboBox * combobox, + gpointer user_data) + { + z_device_entry *de = user_data; + tv_device_node *n; +- const gchar *s; ++ gchar *s; + + if (de->timeout != NO_SOURCE_ID) + { +- gtk_timeout_remove (de->timeout); ++ g_source_remove (de->timeout); + de->timeout = NO_SOURCE_ID; + } + +- s = gtk_entry_get_text (entry); ++ s = gtk_combo_box_text_get_active_text (GTK_COMBO_BOX_TEXT (combobox)); + + if (s && s[0]) + { +@@ -1945,13 +1765,14 @@ + if (0 == strcmp (s, n->device)) + { + z_device_entry_select (de, n); ++ g_free (s); + return; + } + + z_device_entry_select (de, NULL); + +- de->timeout = gtk_timeout_add (1000 /* ms */, +- on_z_device_entry_timeout, de); ++ de->timeout = g_timeout_add (1000 /* ms */, ++ on_z_device_entry_timeout, de); + } + else + { +@@ -2011,13 +1832,13 @@ + + z_device_entry_relist (de); + +- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), ""); ++ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (de->combo))), ""); + + if (current_device && current_device[0]) +- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), ++ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (de->combo))), + current_device); + else if (list) +- gtk_entry_set_text (GTK_ENTRY (GTK_COMBO (de->combo)->entry), ++ gtk_entry_set_text (GTK_ENTRY (gtk_bin_get_child (GTK_BIN (de->combo))), + list->device); + + return de->table; +@@ -2223,11 +2044,12 @@ + "SELECTION_CLEAR", "SELECTION_REQUEST", "SELECTION_NOTIFY", + "PROXIMITY_IN", "PROXIMITY_OUT", "DRAG_ENTER", "DRAG_LEAVE", + "DRAG_MOTION", "DRAG_STATUS", "DROP_START", "DROP_FINISHED", +- "CLIENT_EVENT", "VISIBILITY_NOTIFY", "NO_EXPOSE" ++ "CLIENT_EVENT", "VISIBILITY_NOTIFY", "SCROLL", "WINDOW_STATE", ++ "SETTING", "OWNER_CHANGE", "GRAB_BROKEN", "DAMAGE" + }; + + if (event->type >= GDK_NOTHING +- && event->type <= GDK_NO_EXPOSE) ++ && event->type <= GDK_DAMAGE) + return event_name[event->type - GDK_NOTHING]; + else + return "unknown"; +@@ -2253,7 +2075,7 @@ + #define VALID_ITER(iter, list_store) \ + ((iter) != NULL \ + && (iter)->user_data != NULL \ +- && ((GTK_LIST_STORE (list_store))->stamp == (iter)->stamp)) ++ && gtk_list_store_iter_is_valid (GTK_LIST_STORE (list_store), iter)) + + gboolean + z_tree_selection_iter_first (GtkTreeSelection * selection, +@@ -2355,7 +2177,7 @@ + name); + + gtk_dialog_add_buttons (GTK_DIALOG (dialog), +- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, ++ _("_Cancel"), GTK_RESPONSE_REJECT, + _("_Overwrite"), GTK_RESPONSE_ACCEPT, + NULL); + } +@@ -2384,7 +2206,7 @@ + + gtk_dialog_add_buttons (GTK_DIALOG (dialog), + _("Continue"), GTK_RESPONSE_ACCEPT, +- GTK_STOCK_CANCEL, GTK_RESPONSE_REJECT, ++ _("_Cancel"), GTK_RESPONSE_REJECT, + NULL); + } + +@@ -2642,6 +2464,7 @@ + const gchar * link_id) + { + GError *error = NULL; ++ gchar *uri; + + if (DISPLAY_MODE_FULLSCREEN == zapping->display_mode) + { +@@ -2652,22 +2475,26 @@ + /* warnings */ FALSE); + } + +- if (!gnome_help_display (filename, link_id, &error)) +- { +- if (error) +- { +- if (NULL == parent) +- parent = GTK_WINDOW (zapping); ++ if (link_id) ++ /* This is the documented format of the URI with section but it ++ doesn't work because #link_id is appended once again. */ ++ uri = g_strconcat ("ghelp:", filename, "?", link_id, NULL); ++ else ++ uri = g_strconcat ("ghelp:", filename, NULL); + +- z_show_non_modal_message_dialog +- (parent, GTK_MESSAGE_ERROR, +- _("Could not open help file"), "%s", +- error->message); ++ /* Ignore first argument since yelp is always launched. */ ++ if (!gtk_show_uri_on_window (NULL, uri, GDK_CURRENT_TIME, &error)) ++ { ++ if (NULL == parent) ++ parent = GTK_WINDOW (zapping); + +- g_error_free (error); +- error = NULL; +- } ++ z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, ++ _("Could not open help file"), "%s", ++ error->message); ++ g_error_free (error); + } ++ ++ g_free (uri); + } + + void +@@ -2685,21 +2512,15 @@ + /* warnings */ TRUE); + } + +- if (!gnome_url_show (url, &error)) ++ if (!gtk_show_uri_on_window (NULL, url, GDK_CURRENT_TIME, &error)) + { +- if (error) +- { +- if (NULL == parent) +- parent = GTK_WINDOW (zapping); ++ if (NULL == parent) ++ parent = GTK_WINDOW (zapping); + +- z_show_non_modal_message_dialog +- (parent, GTK_MESSAGE_ERROR, +- _("Could not open URL"), "%s", +- error->message); +- +- g_error_free (error); +- error = NULL; +- } ++ z_show_non_modal_message_dialog (parent, GTK_MESSAGE_ERROR, ++ _("Could not open URL"), "%s", ++ error->message); ++ g_error_free (error); + } + } + +--- zapping.orig/src/plugin_properties.c ++++ zapping/src/plugin_properties.c +@@ -22,7 +22,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include "interface.h" + #include "zmisc.h" +@@ -236,7 +236,7 @@ + } + + static void +-on_properties_destroy (GtkObject * object _unused_, ++on_properties_destroy (GObject * object _unused_, + gpointer user_data _unused_) + { + GtkAction *action; +--- zapping.orig/src/plugins.c ++++ zapping/src/plugins.c +@@ -549,7 +549,7 @@ + (*info->plugin_capture_stop)(); + } + +-void plugin_add_gui (GnomeApp * app, struct plugin_info * info) ++void plugin_add_gui (GtkWindow * app, struct plugin_info * info) + { + g_assert(info != NULL); + g_assert(app != NULL); +@@ -558,7 +558,7 @@ + ((*info->plugin_add_gui)(app)); + } + +-void plugin_remove_gui (GnomeApp * app, struct plugin_info * info) ++void plugin_remove_gui (GtkWindow * app, struct plugin_info * info) + { + g_assert(info != NULL); + g_assert(app != NULL); +--- zapping.orig/src/properties.c ++++ zapping/src/properties.c +@@ -43,7 +43,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #define ZCONF_DOMAIN "/zapping/internal/properties/" + #include "zconf.h" +@@ -93,15 +93,16 @@ + GtkWidget *notebook = lookup_widget(widget, "properties-notebook"); + + /* Walk till our parent is the notebook */ +- while (widget && widget->parent != notebook && widget->parent) ++ while (widget && gtk_widget_get_parent (widget) != notebook ++ && gtk_widget_get_parent (widget)) + { + if (GTK_IS_MENU(widget)) + widget = gtk_menu_get_attach_widget (GTK_MENU (widget) ); + else +- widget = widget -> parent; ++ widget = gtk_widget_get_parent (widget); + } + +- if (!widget || !widget->parent) ++ if (!widget || !gtk_widget_get_parent (widget)) + { + g_warning("Property item ancestor not found!!"); + return; +@@ -169,15 +170,11 @@ + } + } + +- if (GNOME_IS_FILE_ENTRY(widget)) ++ if (GTK_IS_FILE_CHOOSER_BUTTON (widget)) + { +- widget = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(widget)); +- autoconnect_modify(dialog, widget, page_id); +- } +- else if (GNOME_IS_ENTRY(widget)) +- { +- widget = gnome_entry_gtk_entry(GNOME_ENTRY(widget)); +- autoconnect_modify(dialog, widget, page_id); ++ g_signal_connect (G_OBJECT (widget), "file-set", ++ G_CALLBACK (modify_page), ++ GINT_TO_POINTER (page_id)); + } + else if (GTK_IS_TOGGLE_BUTTON(widget)) + { +@@ -197,19 +194,13 @@ + G_CALLBACK(modify_page), + GINT_TO_POINTER(page_id)); + } +- else if (GTK_IS_OPTION_MENU(widget)) +- { +- g_signal_connect(G_OBJECT(widget), "changed", +- G_CALLBACK(modify_page), +- GINT_TO_POINTER(page_id)); +- } +- else if (GNOME_IS_FONT_PICKER(widget)) ++ else if (GTK_IS_FONT_BUTTON (widget)) + { + g_signal_connect(G_OBJECT(widget), "font-set", + G_CALLBACK(font_set_bridge), + GINT_TO_POINTER(page_id)); + } +- else if (GNOME_IS_COLOR_PICKER(widget)) ++ else if (GTK_IS_COLOR_BUTTON (widget)) + { + g_signal_connect(G_OBJECT(widget), "color-set", + G_CALLBACK(color_set_bridge), +@@ -251,7 +242,7 @@ + if (GTK_IS_BUTTON(widget)) + return; /* Nothing to be done for buttons */ + +- if (GTK_WIDGET_VISIBLE(widget)) ++ if (gtk_widget_get_visible (widget)) + *group = + (g_list_index(gtk_container_get_children(group_container), + widget)-1)/2; +@@ -442,7 +433,7 @@ + + req_max_width = z_object_get_int_data (G_OBJECT (parent), "req_max_width"); + +- gtk_widget_size_request(widget, &request); ++ gtk_widget_get_preferred_size (widget, NULL, &request); + if (request.width > req_max_width) + { + req_max_width = request.width; +@@ -478,7 +469,7 @@ + /* Adding a new group */ + if (container == sidebar && GTK_IS_BUTTON(widget)) + { +- gtk_widget_size_request(widget, &request); ++ gtk_widget_get_preferred_size (widget, NULL, &request); + + req_button_height += request.height; + g_object_set_data(G_OBJECT(sidebar), "req_button_height", +@@ -490,7 +481,7 @@ + else if (GTK_IS_BUTTON(widget)) + { + /* Get size request for the parent container */ +- gtk_widget_size_request(container, &request); ++ gtk_widget_get_preferred_size (container, NULL, &request); + + if (req_max_height < request.height) + { +@@ -527,12 +518,13 @@ + GtkWidget *nsbutton; + gint i, page_count = 0; + +- hbox = gtk_hbox_new(FALSE, 3); +- gtk_box_pack_start_defaults(GTK_BOX(dialog->vbox), hbox); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3); ++ gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), ++ hbox, TRUE, TRUE, 0); + frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); + gtk_box_pack_start(GTK_BOX(hbox), frame, FALSE, FALSE, 0); +- vbox = gtk_vbox_new(FALSE, 0); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_widget_show(vbox); + gtk_container_add(GTK_CONTAINER(frame), vbox); + register_widget(NULL, vbox, "group-container"); +@@ -543,7 +535,7 @@ + /* Some eye candy first */ + frame = gtk_frame_new(NULL); + gtk_frame_set_shadow_type(GTK_FRAME(frame), GTK_SHADOW_IN); +- gtk_box_pack_start_defaults(GTK_BOX(hbox), frame); ++ gtk_box_pack_start (GTK_BOX (hbox), frame, TRUE, TRUE, 0); + /* Notebook */ + notebook = GTK_NOTEBOOK(gtk_notebook_new()); + gtk_notebook_set_show_tabs(notebook, FALSE); +@@ -595,7 +587,7 @@ + } + + static void +-on_properties_destroy (GtkObject * object _unused_, ++on_properties_destroy (GObject * object _unused_, + gpointer user_data _unused_) + { + GtkAction *action; +@@ -622,10 +614,10 @@ + (_("Zapping Properties"), + GTK_WINDOW (zapping), + GTK_DIALOG_DESTROY_WITH_PARENT, +- GTK_STOCK_OK, GTK_RESPONSE_OK, +- GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, +- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, +- GTK_STOCK_HELP, GTK_RESPONSE_HELP, ++ _("_OK"), GTK_RESPONSE_OK, ++ _("_Apply"), GTK_RESPONSE_APPLY, ++ _("_Cancel"), GTK_RESPONSE_CANCEL, ++ _("_Help"), GTK_RESPONSE_HELP, + NULL)); + + if (zapping) +@@ -684,8 +676,8 @@ + g_free(buf); + + buf = g_strdup_printf("group-contents-%s", group); +- contents = gtk_vbox_new(FALSE, 0); +- gtk_box_pack_start_defaults(GTK_BOX(vbox), contents); ++ contents = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); ++ gtk_box_pack_start (GTK_BOX (vbox), contents, TRUE, TRUE, 0); + g_object_set_data_full(G_OBJECT(contents), "group-name", + g_strdup(group), + g_free); +@@ -727,12 +719,12 @@ + group_list = gtk_radio_button_get_group(GTK_RADIO_BUTTON(radio)); + g_object_set_data(G_OBJECT(container), "group_list", group_list); + +- vbox = gtk_vbox_new(FALSE, 0); ++ vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0); + gtk_container_add(GTK_CONTAINER(radio), vbox); + if (pixmap) +- gtk_box_pack_start_defaults(GTK_BOX(vbox), pixmap); ++ gtk_box_pack_start (GTK_BOX (vbox), pixmap, TRUE, TRUE, 0); + label_widget = gtk_label_new(label); +- gtk_box_pack_start_defaults(GTK_BOX(vbox), label_widget); ++ gtk_box_pack_start (GTK_BOX (vbox), label_widget, TRUE, TRUE, 0); + + gtk_button_set_relief(GTK_BUTTON(radio), GTK_RELIEF_NONE); + +--- zapping.orig/src/properties-handler.c ++++ zapping/src/properties-handler.c +@@ -29,7 +29,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include "interface.h" + #include "properties.h" +@@ -143,8 +143,7 @@ + + /* Selected video device */ + widget = lookup_widget(page, "fileentry1"); +- widget = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(widget)); +- gtk_entry_set_text(GTK_ENTRY(widget), ++ gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (widget), + zconf_get_string(NULL, + "/zapping/options/main/video_device")); + /* Current controller */ +@@ -165,9 +164,9 @@ + + widget = lookup_widget(page, "fileentry1"); /* Video device entry + */ +- text = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY(widget), +- TRUE); +- if (text) ++ text = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); ++ ++ if (g_file_test (text, G_FILE_TEST_EXISTS)) + zconf_set_string(text, "/zapping/options/main/video_device"); + + g_free(text); /* In the docs it says this should be freed */ +@@ -839,13 +838,33 @@ + }; + + static void +-style_menu_item_activated (GtkWidget * item _unused_, +- GtkToolbarStyle style) ++global_menu_item_activated (void) ++{ ++ const char *key; ++ ++ key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; ++ ++ /* Unset the per-app toolbar setting */ ++ gconf_client_unset (gconf_client, key, NULL); ++} ++ ++static void ++style_menu_item_activated (GtkWidget * widget, ++ gpointer date) + { +- char *key; ++ const char *key; + guint i; ++ gint style; + +- key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); ++ key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; ++ style = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); ++ ++ /* This is actually the "default" style but since the widget is ++ already a GtkComboBoxText instead of the deprecated (and missing ++ in GTK+ 3) GtkOptionMenu, we can't use separate callbacks for the ++ different items as they are not GObject's. */ ++ if (style == 4) ++ global_menu_item_activated (); + + /* Set our per-app toolbar setting */ + for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++) +@@ -857,75 +876,38 @@ + break; + } + } +- +- g_free (key); + } + + static void +-global_menu_item_activated (GtkWidget * item _unused_) +-{ +- char *key; +- +- key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); +- +- /* Unset the per-app toolbar setting */ +- gconf_client_unset (gconf_client, key, NULL); +- g_free (key); +-} +- +-static GtkWidget * +-create_toolbar_style_menu (void) ++create_toolbar_style_menu (GtkWidget *combobox) + { +- GtkWidget *menu; +- GtkWidget *item; +- GtkWidget *both_item, *both_horiz_item; +- GtkWidget *icons_item, *text_item, *global_item; +- GSList *group; + char *both, *both_horiz, *icons, *text, *global; +- char *str, *key; ++ char *str; ++ const char *key; + GtkToolbarStyle toolbar_style; + +- group = NULL; +- toolbar_style = GTK_TOOLBAR_BOTH; +- menu = gtk_menu_new (); ++ /* This property is deprecated and is ignored by modern GTK+. The ++ only way to make this work seems to be through our own GSettings ++ schemas, once the program migrates away from GConf. */ ++ g_object_get (gtk_settings_get_default (), "gtk-toolbar-style", ++ &toolbar_style, NULL); ++ ++ if (!toolbar_style) ++ toolbar_style = GTK_TOOLBAR_BOTH; + + both = _("Text Below Icons"); + both_horiz = _("Priority Text Beside Icons"); + icons = _("Icons Only"); + text = _("Text Only"); + +- both_item = gtk_radio_menu_item_new_with_label (group, both); +- g_signal_connect (both_item, "activate", +- G_CALLBACK (style_menu_item_activated), +- GINT_TO_POINTER (GTK_TOOLBAR_BOTH)); +- group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (both_item)); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), both_item); +- +- both_horiz_item = gtk_radio_menu_item_new_with_label (group, both_horiz); +- g_signal_connect (both_horiz_item, "activate", +- G_CALLBACK (style_menu_item_activated), +- GINT_TO_POINTER (GTK_TOOLBAR_BOTH_HORIZ)); +- group = gtk_radio_menu_item_get_group +- (GTK_RADIO_MENU_ITEM (both_horiz_item)); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), both_horiz_item); +- +- icons_item = gtk_radio_menu_item_new_with_label (group, icons); +- g_signal_connect (icons_item, "activate", ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), icons); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), text); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), both); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), both_horiz); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), toolbar_style); ++ g_signal_connect (combobox, "changed", + G_CALLBACK (style_menu_item_activated), +- GINT_TO_POINTER (GTK_TOOLBAR_ICONS)); +- group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (icons_item)); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), icons_item); +- +- text_item = gtk_radio_menu_item_new_with_label (group, text); +- g_signal_connect (text_item, "activate", +- G_CALLBACK (style_menu_item_activated), +- GINT_TO_POINTER (GTK_TOOLBAR_TEXT)); +- +- group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (text_item)); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), text_item); +- +- item = gtk_separator_menu_item_new (); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item); ++ NULL); + + /* Get global setting */ + str = gconf_client_get_string +@@ -958,23 +940,19 @@ + } + + global = g_strdup_printf (_("Use desktop default (%s)"), str); +- global_item = gtk_radio_menu_item_new_with_label (group, global); +- g_signal_connect (global_item, "activate", +- G_CALLBACK (global_menu_item_activated), NULL); +- group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (global_item)); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), global); + g_free (global); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), global_item); + +- gtk_widget_show_all (menu); ++ gtk_widget_show_all (combobox); + + /* Now select the correct menu according to our preferences */ +- key = gnome_gconf_get_gnome_libs_settings_relative ("toolbar_style"); ++ key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; + str = gconf_client_get_string (gconf_client, key, NULL); + + if (str == NULL) + { + /* We have no per-app setting, so the global one must be right. */ +- gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (global_item), TRUE); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 4); + } + else + { +@@ -985,20 +963,10 @@ + switch (toolbar_style) + { + case GTK_TOOLBAR_BOTH: +- gtk_check_menu_item_set_active +- (GTK_CHECK_MENU_ITEM (both_item), TRUE); +- break; + case GTK_TOOLBAR_BOTH_HORIZ: +- gtk_check_menu_item_set_active +- (GTK_CHECK_MENU_ITEM (both_horiz_item), TRUE); +- break; + case GTK_TOOLBAR_ICONS: +- gtk_check_menu_item_set_active +- (GTK_CHECK_MENU_ITEM (icons_item), TRUE); +- break; + case GTK_TOOLBAR_TEXT: +- gtk_check_menu_item_set_active +- (GTK_CHECK_MENU_ITEM (text_item), TRUE); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), toolbar_style); + break; + default: + g_assert_not_reached (); +@@ -1006,10 +974,6 @@ + + g_free (str); + } +- +- g_free (key); +- +- return menu; + } + + /* Main window */ +@@ -1032,7 +996,7 @@ + + /* Toolbar style */ + w = lookup_widget(page, "toolbar_style"); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (w), create_toolbar_style_menu ()); ++ create_toolbar_style_menu (w); + + /* Swap Page Up/Down */ + /* +@@ -1043,8 +1007,7 @@ + + /* Title format Z will use */ + w = lookup_widget(page, "title_format"); +- w = gnome_entry_gtk_entry(GNOME_ENTRY(w)); +- gtk_entry_set_text(GTK_ENTRY(w), ++ gtk_entry_set_text (GTK_ENTRY (w), + zconf_get_string(NULL, + "/zapping/options/main/title_format")); + +@@ -1072,7 +1035,7 @@ + if (n < 0) + n = 0; /* historical: -1 disabled keypad channel number entering */ + +- gtk_option_menu_set_history (GTK_OPTION_MENU (w), (guint) n); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (w), n); + } + + } +@@ -1084,11 +1047,6 @@ + gboolean top; + gboolean active; + +- widget = lookup_widget(page, "checkbutton14"); /* show tooltips */ +- top = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); +- zconf_set_boolean (top, "/zapping/options/main/show_tooltips"); +- z_tooltips_active (top); +- + widget = lookup_widget(page, "disable_screensaver"); + top = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); + zconf_set_boolean (top, "/zapping/options/main/disable_screensaver"); +@@ -1096,8 +1054,7 @@ + + + widget = lookup_widget(page, "title_format"); /* title format */ +- widget = gnome_entry_gtk_entry(GNOME_ENTRY(widget)); +- zconf_set_string(gtk_entry_get_text(GTK_ENTRY(widget)), ++ zconf_set_string (gtk_entry_get_text (GTK_ENTRY (widget)), + "/zapping/options/main/title_format"); + + #if 0 /* FIXME */ +@@ -1143,8 +1100,6 @@ + #ifdef HAVE_VIDMODE_EXTENSION + + { +- GtkWidget *menu; +- GtkWidget *menuitem; + const x11_vidmode_info *info; + const x11_vidmode_info *hist; + const gchar *mode; +@@ -1154,16 +1109,13 @@ + + mode = zconf_get_string (NULL, "/zapping/options/main/fullscreen/vidmode"); + +- menu = gtk_menu_new (); ++ widget = lookup_widget (page, "optionmenu2"); + + /* TRANSLATORS: Fullscreen video mode */ +- menuitem = gtk_menu_item_new_with_label (_("Do not change")); +- gtk_widget_show (menuitem); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); +- +- menuitem = gtk_menu_item_new_with_label (_("Automatic")); +- gtk_widget_show (menuitem); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), ++ _("Do not change")); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), ++ _("Automatic")); + + h = (mode && 0 == strcmp (mode, "auto")); + hist = x11_vidmode_by_name (vidmodes, mode); +@@ -1180,16 +1132,13 @@ + info->width, info->height, + (unsigned int)(info->vfreq + 0.5)); + +- menuitem = gtk_menu_item_new_with_label (s); +- gtk_widget_show (menuitem); +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (widget), s); + + g_free (s); + } + +- widget = lookup_widget(page, "optionmenu2"); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (widget), menu); +- gtk_option_menu_set_history (GTK_OPTION_MENU(widget), h); ++ ++ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), h); + } + + #else /* !HAVE_VIDMODE_EXTENSION */ +@@ -1209,7 +1158,7 @@ + /* capture size under XVideo */ + widget = lookup_widget(page, "optionmenu20"); + hist = zconf_get_uint (NULL, "/zapping/options/capture/xvsize"); +- gtk_option_menu_set_history (GTK_OPTION_MENU (widget), hist); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (widget), hist); + } + + #else +@@ -1226,12 +1175,12 @@ + + if (z_gconf_get_string (&str, "/apps/zapping/window/chroma_key_color")) + { +- GdkColor color; ++ GdkRGBA color; + +- if (string_to_color (&color, str)) ++ if (gdk_rgba_parse (&color, str)) + { + widget = lookup_widget(page, "colorbutton1"); +- gtk_color_button_set_color (GTK_COLOR_BUTTON (widget), ++ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (widget), + &color); + } + +@@ -1310,13 +1259,16 @@ + #endif + + { +- GdkColor color; ++ GdkRGBA color; ++ gchar *str; + + widget = lookup_widget (page, "colorbutton1"); +- gtk_color_button_get_color (GTK_COLOR_BUTTON (widget), &color); ++ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (widget), &color); ++ str = gdk_rgba_to_string (&color); + + /* XXX error ignored. */ +- z_gconf_set_color ("/apps/zapping/window/chroma_key_color", &color); ++ zconf_set_string (str, "/apps/zapping/window/chroma_key_color"); ++ g_free (str); + } + + widget = lookup_widget (page, "general-video-fixed-inc"); +@@ -1354,7 +1306,7 @@ + }; + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "zapping.glade2"); ++ "zapping.ui"); + } + + void startup_properties_handler(void) +--- zapping.orig/src/subtitle.c ++++ zapping/src/subtitle.c +@@ -25,7 +25,7 @@ + + #ifdef HAVE_LIBZVBI + +-#include ++#include + + #include "plugins/subtitle/view.h" + #include "common/fifo.h" /* zf_current_time() */ +@@ -105,7 +105,7 @@ + gpointer user_data) + { + if (GTK_IS_CHECK_MENU_ITEM (menu_item)) +- if (!GTK_CHECK_MENU_ITEM (menu_item)->active) ++ if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menu_item))) + return; + + zvbi_caption_pgno = (vbi3_pgno) GPOINTER_TO_INT (user_data); +@@ -279,7 +279,7 @@ + + if (tooltip) + { +- z_tooltip_set (menu_item, tooltip); ++ gtk_widget_set_tooltip_text (menu_item, tooltip); + g_free (tooltip); + } + +@@ -315,32 +315,25 @@ + return count; + } + +-static GnomeUIInfo +-subtitles_uiinfo [] = { +- { +- GNOME_APP_UI_ITEM, N_("_Disable"), NULL, +- G_CALLBACK (on_python_command1), "zapping.closed_caption(0)", NULL, +- GNOME_APP_PIXMAP_NONE, NULL, +- 0, (GdkModifierType) 0, NULL +- }, +- GNOMEUIINFO_END +-}; +- + GtkWidget * + zvbi_subtitle_menu_new (vbi3_pgno curr_pgno) + { + vbi3_decoder *vbi; + GtkMenuShell *menu; ++ GtkWidget *widget; + + if (!(vbi = zvbi_get_object ())) + return NULL; + + menu = GTK_MENU_SHELL (gtk_menu_new ()); + +- gnome_app_fill_menu (menu, subtitles_uiinfo, +- /* accel */ NULL, +- /* mnemo */ TRUE, +- /* position */ 0); ++ widget = gtk_menu_item_new_with_mnemonic (_("_Disable")); ++ gtk_widget_show (widget); ++ g_signal_connect_swapped (widget, "activate", ++ G_CALLBACK (on_python_command1), ++ (gpointer) "zapping.closed_caption(0)"); ++ gtk_menu_shell_append (menu, widget); ++ gtk_widget_show (GTK_WIDGET (menu)); + + zvbi_menu_shell_insert_active_subtitle_pages (menu, /* position */ 1, + curr_pgno, +--- zapping.orig/src/v4linterface.c ++++ zapping/src/v4linterface.c +@@ -26,7 +26,7 @@ + # include "config.h" + #endif + +-#include ++#include + #include + #include + +@@ -216,10 +216,19 @@ + for (i = 0; i < G_N_ELEMENTS (pixmaps); ++i) + if (0 && ctrl->id == pixmaps[i].id) + { +- symbol = gtk_image_new_from_stock (pixmaps[i].stock_id, +- GTK_ICON_SIZE_BUTTON); ++ symbol = gtk_image_new_from_icon_name (pixmaps[i].stock_id, ++ GTK_ICON_SIZE_BUTTON); + gtk_misc_set_alignment (GTK_MISC (symbol), 1.0, 0.5); +- symbol = z_tooltip_set_wrap (symbol, ctrl->label); ++ ++ if (!gtk_widget_get_has_window (symbol)) ++ { ++ GtkWidget *event_box = gtk_event_box_new (); ++ ++ gtk_widget_show (symbol); ++ gtk_container_add (GTK_CONTAINER (event_box), symbol); ++ symbol = event_box; ++ gtk_widget_set_tooltip_text (symbol, ctrl->label); ++ } + break; + } + +@@ -240,7 +249,8 @@ + struct control *c = user_data; + + TV_CALLBACK_BLOCK (c->tvcb, tveng_set_control +- (c->ctrl, (int) adjust->value, c->info)); ++ (c->ctrl, (int) gtk_adjustment_get_value (adjust), ++ c->info)); + } + + static void +@@ -332,13 +342,13 @@ + } + + static void +-on_control_menuitem_activate (GtkMenuItem * menuitem, ++on_control_menuitem_activate (GtkComboBox * combobox, + gpointer user_data) + { + struct control *c = user_data; + gint value; + +- value = z_object_get_int_data (G_OBJECT (menuitem), "value"); ++ value = gtk_combo_box_get_active (combobox); + + tveng_set_control (c->ctrl, value, c->info); + } +@@ -350,39 +360,26 @@ + { + GtkWidget *label; /* This shows what the menu is for */ + GtkWidget *option_menu; /* The option menu */ +- GtkWidget *menu; /* The menu displayed */ +- GtkWidget *menu_item; /* Each of the menu items */ + struct control *c; + guint i; + + label = gtk_label_new (ctrl->label); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + +- option_menu = gtk_option_menu_new (); +- menu = gtk_menu_new (); +- gtk_widget_show (menu); +- gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); ++ option_menu = gtk_combo_box_text_new (); ++ gtk_widget_show (option_menu); + + c = add_control (cb, info, ctrl, label, option_menu, + NULL, NULL, NULL, NULL); + + /* Start querying menu_items and building the menu */ + for (i = 0; ctrl->menu[i] != NULL; i++) +- { +- menu_item = gtk_menu_item_new_with_label (_(ctrl->menu[i])); +- gtk_widget_show (menu_item); +- +- g_object_set_data (G_OBJECT (menu_item), "value", +- GINT_TO_POINTER (i)); +- +- g_signal_connect (G_OBJECT (menu_item), "activate", +- G_CALLBACK (on_control_menuitem_activate), c); ++ gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (option_menu), ++ _(ctrl->menu[i])); + +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); +- } +- +- gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), +- (guint) ctrl->value); ++ g_signal_connect (option_menu, "changed", ++ G_CALLBACK (on_control_menuitem_activate), c); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (option_menu), ctrl->value); + } + + static void +@@ -409,20 +406,17 @@ + } + + static void +-on_color_set (GnomeColorPicker * colorpicker _unused_, +- guint arg1, +- guint arg2, +- guint arg3, +- guint arg4 _unused_, ++on_color_set (GtkColorButton * colorpicker, + gpointer user_data) + { + struct control *c = user_data; + guint color; ++ GdkRGBA rgba; + +- color = (arg1 >> 8) << 16; /* red */ +- color += (arg2 >> 8) << 8; /* green */ +- color += (arg3 >> 8); /* blue */ +- /* arg4 alpha ignored */ ++ gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (colorpicker), &rgba); ++ color = (((int) (rgba.red * 255) << 16) | ++ ((int) (rgba.green * 255) << 8) | ++ (int) (rgba.blue * 255)); + + tveng_set_control (c->ctrl, (int) color, c->info); + } +@@ -433,24 +427,24 @@ + tv_control * ctrl) + { + GtkWidget *label; +- GnomeColorPicker *color_picker; ++ GtkColorButton *color_picker; ++ GdkRGBA rgba; + gchar *buffer; + + label = gtk_label_new (ctrl->label); + gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5); + +- color_picker = GNOME_COLOR_PICKER (gnome_color_picker_new ()); +- gnome_color_picker_set_use_alpha (color_picker, FALSE); +- gnome_color_picker_set_i8 (color_picker, +- (ctrl->value & 0xff0000) >> 16, +- (ctrl->value & 0xff00) >> 8, +- (ctrl->value & 0xff), +- 0); ++ rgba.red = ((ctrl->value & 0xff0000) >> 16) / 255.0; ++ rgba.green = ((ctrl->value & 0xff00) >> 8) / 255.0; ++ rgba.blue = (ctrl->value & 0xff) / 255.0; ++ ++ color_picker = GTK_COLOR_BUTTON (gtk_color_button_new_with_rgba (&rgba)); ++ gtk_color_chooser_set_use_alpha (GTK_COLOR_CHOOSER (color_picker), FALSE); + + /* TRANSLATORS: In controls box, color picker control, + something like "Adjust Chroma-Key" for overlay. */ + buffer = g_strdup_printf (_("Adjust %s"), ctrl->label); +- gnome_color_picker_set_title (color_picker, buffer); ++ gtk_color_button_set_title (color_picker, buffer); + g_free (buffer); + + add_control (cb, info, ctrl, label, GTK_WIDGET(color_picker), +@@ -477,7 +471,7 @@ + gtk_container_remove (GTK_CONTAINER (cb->window), cb->hbox); + } + +- cb->hbox = gtk_hbox_new (FALSE, 0); ++ cb->hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); + gtk_container_set_border_width (GTK_CONTAINER (cb->hbox), 6); + gtk_container_add (GTK_CONTAINER (cb->window), cb->hbox); + +@@ -512,7 +506,8 @@ + if (cb->table) + { + gtk_widget_show (cb->table); +- gtk_box_pack_start_defaults (GTK_BOX (cb->hbox), cb->table); ++ gtk_box_pack_start (GTK_BOX (cb->hbox), cb->table, ++ TRUE, TRUE, 0); + } + + cb->table = gtk_table_new (1, 2, FALSE); +@@ -552,7 +547,7 @@ + if (cb->table) + { + gtk_widget_show (cb->table); +- gtk_box_pack_start_defaults (GTK_BOX (cb->hbox), cb->table); ++ gtk_box_pack_start (GTK_BOX (cb->hbox), cb->table, TRUE, TRUE, 0); + } + + gtk_widget_show (cb->hbox); +@@ -565,12 +560,12 @@ + { + switch (event->keyval) + { +- case GDK_Escape: ++ case GDK_KEY_Escape: + gtk_widget_destroy (widget); + return TRUE; /* handled */ + +- case GDK_c: +- case GDK_C: ++ case GDK_KEY_c: ++ case GDK_KEY_C: + if (event->state & GDK_CONTROL_MASK) + { + gtk_widget_destroy (widget); +@@ -676,20 +671,22 @@ + break; + + case TV_CONTROL_TYPE_CHOICE: +- gtk_option_menu_set_history +- (GTK_OPTION_MENU (c->widget), (guint) ctrl->value); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (c->widget), ctrl->value); + break; + + case TV_CONTROL_TYPE_ACTION: + break; + + case TV_CONTROL_TYPE_COLOR: +- gnome_color_picker_set_i8 +- (GNOME_COLOR_PICKER (c->widget), +- (ctrl->value & 0xff0000) >> 16, +- (ctrl->value & 0xff00) >> 8, +- (ctrl->value & 0xff), +- 0); ++ { ++ GdkRGBA rgba; ++ ++ rgba.red = ((ctrl->value & 0xff0000) >> 16) / 255.0; ++ rgba.green = ((ctrl->value & 0xff00) >> 8) / 255.0; ++ rgba.blue = (ctrl->value & 0xff) / 255.0; ++ ++ gtk_color_chooser_set_rgba (GTK_COLOR_CHOOSER (c->widget), &rgba); ++ } + break; + + default: +@@ -1759,7 +1756,7 @@ + + switch (event->keyval) + { +- case GDK_KP_0 ... GDK_KP_9: ++ case GDK_KEY_KP_0 ... GDK_KEY_KP_9: + { + tveng_tuned_channel *tc; + guint len; +@@ -1769,7 +1766,7 @@ + if (len >= sizeof (kp_chsel_buf) - 1) + memcpy (kp_chsel_buf, kp_chsel_buf + 1, len--); + +- kp_chsel_buf[len] = event->keyval - GDK_KP_0 + '0'; ++ kp_chsel_buf[len] = event->keyval - GDK_KEY_KP_0 + '0'; + kp_chsel_buf[len + 1] = 0; + + show: +@@ -1838,7 +1835,7 @@ + return TRUE; + } + +- case GDK_KP_Decimal: ++ case GDK_KEY_KP_Decimal: + if (txl >= 1) + { + const tveng_tuned_channel *tc; +@@ -1879,7 +1876,7 @@ + #endif + return TRUE; + +- case GDK_KP_Enter: ++ case GDK_KEY_KP_Enter: + kp_enter (txl); + + kp_chsel_buf[0] = 0; +@@ -2021,7 +2018,7 @@ + if (!tv_cur_video_standard (sm->info)) + { + gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); +- gtk_menu_item_remove_submenu (sm->menu_item); ++ gtk_menu_item_set_submenu (sm->menu_item, NULL); + } + else + { +@@ -2052,14 +2049,15 @@ + gboolean success; + gint index; + +- if (!GTK_CHECK_MENU_ITEM (menu_item)->active) ++ if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menu_item))) + return; + + menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); + if (!menu_shell) + return; + +- index = g_list_index (menu_shell->children, menu_item); ++ index = g_list_index (gtk_container_get_children (GTK_CONTAINER ++ (menu_shell)), menu_item); + + success = FALSE; + +@@ -2159,7 +2157,7 @@ + if (!tv_cur_audio_input (sm->info)) + { + gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); +- gtk_menu_item_remove_submenu (sm->menu_item); ++ gtk_menu_item_set_submenu (sm->menu_item, NULL); + } + else + { +@@ -2190,14 +2188,15 @@ + gboolean success; + gint index; + +- if (!GTK_CHECK_MENU_ITEM (menu_item)->active) ++ if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menu_item))) + return; + + menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); + if (!menu_shell) + return; + +- index = g_list_index (menu_shell->children, menu_item); ++ index = g_list_index (gtk_container_get_children (GTK_CONTAINER ++ (menu_shell)), menu_item); + + success = FALSE; + +@@ -2295,7 +2294,7 @@ + if (!tv_cur_video_input (sm->info)) + { + gtk_widget_set_sensitive (GTK_WIDGET (sm->menu_item), FALSE); +- gtk_menu_item_remove_submenu (sm->menu_item); ++ gtk_menu_item_set_submenu (sm->menu_item, NULL); + } + else + { +@@ -2330,14 +2329,15 @@ + gboolean success; + gint index; + +- if (!GTK_CHECK_MENU_ITEM (menu_item)->active) ++ if (!gtk_check_menu_item_get_active (GTK_CHECK_MENU_ITEM (menu_item))) + return; + + menu_shell = GTK_MENU_SHELL (gtk_menu_item_get_submenu (sm->menu_item)); + if (!menu_shell) + return; + +- index = g_list_index (menu_shell->children, menu_item); ++ index = g_list_index (gtk_container_get_children (GTK_CONTAINER ++ (menu_shell)), menu_item); + + success = FALSE; + +@@ -2410,13 +2410,12 @@ + sm = g_malloc0 (sizeof (*sm)); + sm->info = info; + +- item = z_gtk_pixmap_menu_item_new (_("Video standards"), +- GTK_STOCK_SELECT_COLOR); ++ item = gtk_menu_item_new_with_label (_("Video standards")); + gtk_widget_show (item); + + sm->menu_item = GTK_MENU_ITEM (item); + g_object_set_data_full (G_OBJECT (item), "sm", sm, +- (GtkDestroyNotify) on_menu_item_destroy); ++ (GDestroyNotify) on_menu_item_destroy); + + gtk_menu_shell_insert (menu, item, pos); + +@@ -2436,7 +2435,7 @@ + + sm->menu_item = GTK_MENU_ITEM (item); + g_object_set_data_full (G_OBJECT (item), "sm", sm, +- (GtkDestroyNotify) on_menu_item_destroy); ++ (GDestroyNotify) on_menu_item_destroy); + + gtk_menu_shell_insert (menu, item, pos); + +@@ -2456,7 +2455,7 @@ + + sm->menu_item = GTK_MENU_ITEM (item); + g_object_set_data_full (G_OBJECT (item), "sm", sm, +- (GtkDestroyNotify) on_menu_item_destroy); ++ (GDestroyNotify) on_menu_item_destroy); + + gtk_menu_shell_insert (menu, item, pos); + +@@ -2495,7 +2494,7 @@ + if (!(tc = nth_channel (index))) + return; + +- menu_item = z_gtk_pixmap_menu_item_new (tc->name, GTK_STOCK_PROPERTIES); ++ menu_item = z_gtk_pixmap_menu_item_new (tc->name, "document-properties"); + + g_signal_connect_swapped (G_OBJECT (menu_item), "activate", + G_CALLBACK (select_channel), +@@ -2503,7 +2502,7 @@ + + if ((tooltip = z_key_name (tc->accel))) + { +- z_tooltip_set (menu_item, tooltip); ++ gtk_widget_set_tooltip_text (menu_item, tooltip); + g_free (tooltip); + } + +@@ -2549,7 +2548,7 @@ + /* TRANSLATORS: This is displayed in the channel menu when + the channel list is empty. */ + menu_item = z_gtk_pixmap_menu_item_new (_("No channels"), +- GTK_STOCK_CLOSE); ++ "window-close"); + gtk_widget_set_sensitive (menu_item, FALSE); + gtk_widget_show (menu_item); + gtk_menu_shell_insert (menu, menu_item, pos); +--- zapping.orig/src/vdr.c ++++ zapping/src/vdr.c +@@ -26,7 +26,7 @@ + # include "config.h" + #endif + +-#include ++#include + + #include + #include +--- zapping.orig/src/video_xv.c ++++ zapping/src/video_xv.c +@@ -58,7 +58,8 @@ + }; + + static GdkWindow *window = NULL; +-static GdkGC *gc = NULL; ++static cairo_t *cr = NULL; ++static GC gc; + + /* + This curious construct assures that we only grab the minimum set of +@@ -100,7 +101,9 @@ + return ref->xvport; + } + +- if (Success == XvGrabPort (GDK_DISPLAY (), ref->xvport, CurrentTime)) ++ if (Success == XvGrabPort (GDK_DISPLAY_XDISPLAY ++ (gdk_display_get_default ()), ++ ref->xvport, CurrentTime)) + { + ref->refcount ++; + return ref->xvport; +@@ -128,8 +131,8 @@ + { + /* Check for screwed up stuff */ + g_assert (xvports[i].refcount == 0); +- XvUngrabPort (GDK_DISPLAY (), xvports[i].xvport, +- CurrentTime); ++ XvUngrabPort (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ xvports[i].xvport, CurrentTime); + } + + return; +@@ -162,7 +165,7 @@ + + old_error_handler = XSetErrorHandler (x11_error_handler); + +- display = GDK_DISPLAY (); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + xvport = grab_port (pixfmt); + if (None == xvport) +@@ -374,14 +377,14 @@ + return; + } + +- display = GDK_DISPLAY (); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + /* FIXME these calls may allocate resources and fail (asynchronously). */ + #ifdef USE_XV_SHM + if (pimage->uses_shm) + XvShmPutImage(display, pimage->xvport, +- GDK_WINDOW_XWINDOW(window), +- GDK_GC_XGC(gc), pimage->image, ++ GDK_WINDOW_XID (window), ++ gc, pimage->image, + 0, 0, image->fmt.width, image->fmt.height, /* source */ + 0, 0, width, height, /* dest */ + True); +@@ -389,8 +392,8 @@ + + if (!pimage->uses_shm) + XvPutImage(display, pimage->xvport, +- GDK_WINDOW_XWINDOW(window), +- GDK_GC_XGC(gc), pimage->image, ++ GDK_WINDOW_XID (window), ++ gc, pimage->image, + 0, 0, image->fmt.width, image->fmt.height, /* source */ + 0, 0, width, height /* dest */); + +@@ -407,7 +410,8 @@ + + #ifdef USE_XV_SHM + if (pimage->uses_shm) +- XShmDetach(GDK_DISPLAY(), &pimage->shminfo); ++ XShmDetach (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), ++ &pimage->shminfo); + #endif + + if (!pimage->uses_shm) +@@ -427,18 +431,37 @@ + } + + static void +-set_destination (GdkWindow *_w, GdkGC *_gc, ++set_destination (GdkWindow *_w, cairo_t *_cr, + tveng_device_info *info _unused_) + { ++ Display *display; ++ XGCValues values; ++ ++ if ((window == _w) && (cr == _cr)) ++ return; ++ + window = _w; +- gc = _gc; ++ cr = _cr; ++ ++ /* We have the context but it's unusable as it has to be passed as ++ argument to Xlib's draw routines. It would be nice if cairo ++ provided a cairo_xlib_*_get_gc public function. */ ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); ++ values.graphics_exposures = False; ++ values.fill_style = FillTiled; ++ gc = XCreateGC (display, GDK_WINDOW_XID (window), ++ GCGraphicsExposures | GCFillStyle, &values); + } + + static void + unset_destination(tveng_device_info *info _unused_) + { ++ if ((!window) && (!cr)) ++ return; ++ + window = NULL; +- gc = NULL; ++ cr = NULL; ++ XFreeGC (GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()), gc); + } + + static tv_pixfmt_set +@@ -977,7 +1000,7 @@ + + printv ("xv_image_port 0x%x\n", xv_image_port); + +- display = GDK_DISPLAY (); ++ display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + + if (Success != XvQueryExtension (display, + &version, &revision, +--- zapping.orig/src/video_x11.c ++++ zapping/src/video_x11.c +@@ -39,11 +39,11 @@ + #include "x11stuff.h" + + static GdkWindow *window = NULL; +-static GdkGC *gc = NULL, *black_gc = NULL; ++static cairo_t *cr = NULL; + static tv_pixfmt x11_pixfmt; + + struct _zimage_private { +- GdkImage *image; ++ cairo_surface_t *surface; + }; + + static zimage* +@@ -51,35 +51,38 @@ + { + zimage *new_image; + zimage_private *pimage; +- GdkImage *image; ++ cairo_surface_t *surface; ++ int width, height, stride; + + g_assert (pixfmt == x11_pixfmt); + +- image = gdk_image_new (GDK_IMAGE_FASTEST, gdk_visual_get_system (), +- (gint) w, (gint) h); ++ surface = cairo_image_surface_create (CAIRO_FORMAT_A1, w, h); + +- if (!image) ++ if (!surface) + return NULL; + +- if ((guint) image->width != w || +- (guint) image->height != h) ++ width = cairo_image_surface_get_width (surface); ++ height = cairo_image_surface_get_height (surface); ++ stride = cairo_image_surface_get_stride (surface); ++ ++ if ((guint) width != w || (guint) height != h) + { +- g_object_unref (G_OBJECT (image)); ++ cairo_surface_destroy (surface); + return NULL; + } + + pimage = g_malloc0 (sizeof (*pimage)); + new_image = zimage_create_object (); + new_image->priv = pimage; +- pimage->image = image; ++ pimage->surface = surface; + + new_image->fmt.width = w; + new_image->fmt.height = h; + new_image->fmt.pixel_format = tv_pixel_format_from_pixfmt (pixfmt); + new_image->fmt.offset[0] = 0; +- new_image->fmt.bytes_per_line[0] = image->bpl; +- new_image->fmt.size = image->bpl * image->height; +- new_image->img = image->mem; ++ new_image->fmt.bytes_per_line[0] = width * stride; ++ new_image->fmt.size = width * height * stride; ++ new_image->img = cairo_image_surface_get_data (surface); + + return new_image; + } +@@ -93,31 +96,35 @@ + gint x = (w - iw) >> 1; + gint w2 = (w + iw) >> 1; + ++ cairo_save (cr); ++ cairo_set_source_rgb (cr, 0, 0, 0); ++ + if (y > 0) +- gdk_draw_rectangle (canvas, black_gc, TRUE, +- 0, 0, w, y); ++ cairo_rectangle (cr, 0, 0, w, y); + if (h2 > 0) +- gdk_draw_rectangle (canvas, black_gc, TRUE, +- 0, y + ih, w, h2); ++ cairo_rectangle (cr, 0, y + ih, w, h2); + if (x > 0) +- gdk_draw_rectangle (canvas, black_gc, TRUE, +- 0, y, x, ih); ++ cairo_rectangle (cr, 0, y, x, ih); + if (w2 > 0) +- gdk_draw_rectangle (canvas, black_gc, TRUE, +- x + iw, y, w2, ih); ++ cairo_rectangle (cr, x + iw, y, w2, ih); ++ ++ cairo_fill (cr); ++ cairo_restore (cr); + } + + static void + image_put (zimage *image, guint w, guint h) + { + zimage_private *pimage = image->priv; +- gint iw = pimage->image->width, ih = pimage->image->height; ++ gint iw = cairo_image_surface_get_width (pimage->surface); ++ gint ih = cairo_image_surface_get_height (pimage->surface); + + g_assert (window != NULL); + + clear_canvas (window, w, h, iw, ih); +- gdk_draw_image (window, gc, pimage->image, +- 0, 0, (w - iw)/2, (h - ih)/2, iw, ih); ++ cairo_set_source_surface (cr, pimage->surface, 0, 0); ++ cairo_rectangle (cr, 0, 0, iw, ih); ++ cairo_fill (cr); + + gdk_display_flush (gdk_display_get_default ()); + } +@@ -127,47 +134,32 @@ + { + zimage_private *pimage = image->priv; + +- g_object_unref (G_OBJECT (pimage->image)); ++ cairo_surface_destroy (pimage->surface); + + g_free (pimage); + } + + static void +-set_destination (GdkWindow *_w, GdkGC *_gc, ++set_destination (GdkWindow *_w, cairo_t *_cr, + tveng_device_info *info _unused_) + { +- GdkColor black = {0, 0, 0, 0}; +- + /* set_ and _unset will be called multiple times */ +- if ((window == _w) && (gc == _gc)) ++ if ((window == _w) && (cr == _cr)) + return; + + window = _w; +- gc = _gc; +- +- if (black_gc) +- g_object_unref (G_OBJECT (black_gc)); +- +- black_gc = gdk_gc_new (window); +- gdk_gc_copy (black_gc, gc); +- +- gdk_gc_set_fill (black_gc, GDK_SOLID); +- gdk_gc_set_rgb_fg_color (gc, &black); +- gdk_gc_set_rgb_bg_color (gc, &black); ++ cr = _cr; + } + + static void + unset_destination(tveng_device_info *info _unused_) + { + /* see comment in set_destination */ +- if ((!window) && (!gc)) ++ if ((!window) && (!cr)) + return; + + window = NULL; +- gc = NULL; +- +- g_object_unref (G_OBJECT (black_gc)); +- black_gc = NULL; ++ cr = NULL; + } + + static tv_pixfmt_set +--- zapping.orig/src/Makefile.am ++++ zapping/src/Makefile.am +@@ -83,7 +83,7 @@ + tvengxv.c tvengxv.h \ + v4linterface.c v4linterface.h \ + vdr.c vdr.h \ +- video_xv.c video_x11.c video_gdkrgb.c video_mem.c \ ++ video_xv.c video_x11.c video_mem.c \ + x11stuff.c x11stuff.h \ + xawtv.c xawtv.h \ + yuv2rgb.c yuv2rgb.h gen_conv.h \ +--- zapping.orig/src/xawtv.c ++++ zapping/src/xawtv.c +@@ -27,8 +27,7 @@ + + #include "site_def.h" + +-#include +-#include ++#include + #include + #include + #include +@@ -953,7 +952,7 @@ + use of XGetWindowProperty() because function is fubar. */ + + if (!XGetWindowProperty (GDK_WINDOW_XDISPLAY (window), +- GDK_WINDOW_XWINDOW (window), ++ GDK_WINDOW_XID (window), + xatom, + /* long_offset */ 0 / sizeof (long), + /* long_length */ 65536 / sizeof (long), +@@ -1081,7 +1080,7 @@ + ch->rf_name ? rf_name : "?", 0, + ch->name ? name : "?"); + +- gdk_property_change (window->window, ++ gdk_property_change (gtk_widget_get_window (window), + _GA_XAWTV_STATION, + _GA_STRING, /* bits */ 8, + GDK_PROP_MODE_REPLACE, +@@ -1102,6 +1101,7 @@ + xawtv_ipc_init (GtkWidget * window) + { + const guchar station[] = "0.000\0?\0?"; ++ GdkWindow *w = gtk_widget_get_window (window); + GdkEventMask mask; + + _GA_XAWTV_STATION = gdk_atom_intern ("_XAWTV_STATION", +@@ -1114,7 +1114,7 @@ + + /* _XAWTV_STATION identifies us as XawTV clone which understands + _XAWTV_REMOTE commands. Make sure the lights are on. */ +- gdk_property_change (window->window, ++ gdk_property_change (w, + _GA_XAWTV_STATION, + _GA_STRING, /* bits */ 8, + GDK_PROP_MODE_REPLACE, +@@ -1123,9 +1123,9 @@ + g_signal_connect (G_OBJECT (window), "event", + G_CALLBACK (on_event), /* user_data */ NULL); + +- mask = gdk_window_get_events (window->window); ++ mask = gdk_window_get_events (w); + mask |= GDK_PROPERTY_CHANGE_MASK; +- gdk_window_set_events (window->window, mask); ++ gdk_window_set_events (w, mask); + + return TRUE; + } +--- zapping.orig/src/zapping.c ++++ zapping/src/zapping.c +@@ -219,30 +219,32 @@ + view_menu (Zapping * z, + gboolean view) + { +- BonoboDockItem *dock_item; +- + if (view && z->decorated) + { + /* Adding a hidden menu is impossible, we have to add when the + menu becomes first visible. */ + if (!z->menubar_added) + { ++ GtkWidget *top; ++ GList *l; ++ + z->menubar_added = TRUE; +- gnome_app_set_menus (&z->app, z->menubar); ++ top = gtk_widget_get_toplevel (GTK_WIDGET (z->menubar)); ++ if (GTK_IS_WINDOW (top)) ++ for (l = gtk_container_get_children (GTK_CONTAINER (top)); ++ l; l = l->next) ++ if (GTK_IS_BOX (l->data)) ++ { ++ gtk_box_pack_start (l->data, GTK_WIDGET (z->menubar), ++ TRUE, TRUE, 0); ++ break; ++ } + } + +- dock_item = gnome_app_get_dock_item_by_name +- (&z->app, GNOME_APP_MENUBAR_NAME); +- +- gtk_widget_show (GTK_WIDGET (dock_item)); ++ gtk_widget_show (GTK_WIDGET (z->menubar)); + } + else if (z->menubar_added) +- { +- dock_item = gnome_app_get_dock_item_by_name +- (&z->app, GNOME_APP_MENUBAR_NAME); +- +- gtk_widget_hide (GTK_WIDGET (dock_item)); +- } ++ gtk_widget_hide (GTK_WIDGET (z->menubar)); + + gtk_widget_queue_resize (GTK_WIDGET (z)); + } +@@ -251,29 +253,30 @@ + view_toolbar (Zapping * z, + gboolean view) + { +- BonoboDockItem *dock_item; +- + if (view && z->decorated) + { + /* Same as above. */ + if (!z->toolbar_added) + { ++ GtkWidget *top; ++ GList *l; + z->toolbar_added = TRUE; +- gnome_app_set_toolbar (&z->app, z->toolbar); ++ top = gtk_widget_get_toplevel (GTK_WIDGET (z->toolbar)); ++ if (GTK_IS_WINDOW (top)) ++ for (l = gtk_container_get_children (GTK_CONTAINER (top)); ++ l; l = l->next) ++ if (GTK_IS_BOX (l->data)) ++ { ++ gtk_box_pack_start (l->data, GTK_WIDGET (z->toolbar), ++ TRUE, TRUE, 0); ++ break; ++ } + } + +- dock_item = gnome_app_get_dock_item_by_name +- (&z->app, GNOME_APP_TOOLBAR_NAME); +- +- gtk_widget_show (GTK_WIDGET (dock_item)); ++ gtk_widget_show (GTK_WIDGET (z->toolbar)); + } + else if (z->toolbar_added) +- { +- dock_item = gnome_app_get_dock_item_by_name +- (&z->app, GNOME_APP_TOOLBAR_NAME); +- +- gtk_widget_hide (GTK_WIDGET (dock_item)); +- } ++ gtk_widget_hide (GTK_WIDGET (z->toolbar)); + + gtk_widget_queue_resize (GTK_WIDGET (z)); + } +@@ -287,8 +290,25 @@ + /* Same as above. */ + if (!z->appbar_added) + { ++ GtkWidget *hbox; ++ GtkWidget *top; ++ GList *l; ++ + z->appbar_added = TRUE; +- gnome_app_set_statusbar (&z->app, GTK_WIDGET (z->appbar)); ++ hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0); ++ gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (z->appbar), ++ TRUE, TRUE, 0); ++ gtk_widget_show (hbox); ++ ++ top = gtk_widget_get_toplevel (GTK_WIDGET (z->appbar)); ++ if (GTK_IS_WINDOW (top)) ++ for (l = gtk_container_get_children (GTK_CONTAINER (top)); ++ l; l = l->next) ++ if (GTK_IS_BOX (l->data)) ++ { ++ gtk_box_pack_start (l->data, hbox, FALSE, FALSE, 0); ++ break; ++ } + } + else + { +@@ -433,38 +453,38 @@ + { "Assert", GTK_STOCK_DISCONNECT, "_Assert", NULL, NULL, + G_CALLBACK (assert_action) }, + #endif +- { "Quit", GTK_STOCK_QUIT, NULL, NULL, NULL, G_CALLBACK (quit_action) }, ++ { "Quit", "aplication-exit", NULL, NULL, NULL, G_CALLBACK (quit_action) }, + { "EditSubmenu", NULL, N_("_Edit"), NULL, NULL, NULL }, +- { "Preferences", GTK_STOCK_PREFERENCES, NULL, NULL, ++ { "Preferences", "preferences-system", NULL, NULL, + NULL, G_CALLBACK (preferences_action) }, + { "Plugins", NULL, N_("P_lugins"), NULL, + NULL, G_CALLBACK (plugins_action) }, + { "ChannelEditor", NULL /* 2.6 GTK_STOCK_EDIT */, N_("_Channels"), NULL, + NULL, G_CALLBACK (channel_editor_action) }, + { "ViewSubmenu", NULL, N_("_View"), NULL, NULL, NULL }, +- { "Window", GTK_STOCK_EXECUTE, N_("_Window"), "w", ++ { "Window", "system-run", N_("_Window"), "w", + NULL, G_CALLBACK (window_action) }, +- { "Fullscreen", GTK_STOCK_EXECUTE, N_("_Fullscreen"), "f", ++ { "Fullscreen", "system-run", N_("_Fullscreen"), "f", + NULL, G_CALLBACK (fullscreen_action) }, +- { "Background", GTK_STOCK_EXECUTE, N_("_Background"), "b", ++ { "Background", "system-run", N_("_Background"), "b", + NULL, G_CALLBACK (background_action) }, +- { "Overlay", GTK_STOCK_EXECUTE, N_("_Overlay mode"), "o", ++ { "Overlay", "system-run", N_("_Overlay mode"), "o", + NULL, G_CALLBACK (overlay_action) }, +- { "Capture", GTK_STOCK_EXECUTE, N_("_Capture mode"), "c", ++ { "Capture", "system-run", N_("_Capture mode"), "c", + NULL, G_CALLBACK (capture_action) }, + { "ChannelsSubmenu", NULL, N_("_Channels"), NULL, NULL, NULL }, + { "HelpSubmenu", NULL, N_("_Help"), NULL, NULL, NULL }, +- { "HelpContents", GTK_STOCK_HELP, N_("_Contents"), "F1", ++ { "HelpContents", "help-browser", N_("_Contents"), "F1", + NULL, G_CALLBACK (help_contents_action) }, +- { "About", GNOME_STOCK_ABOUT, N_("_About"), NULL, ++ { "About", "help-about", N_("_About"), NULL, + NULL, G_CALLBACK (about_action) }, + { "PopupSubmenu", NULL, "Dummy", NULL, NULL, NULL }, + { "Appearance", NULL, N_("Appearance"), NULL, NULL, NULL }, +- { "ChannelUp", GTK_STOCK_GO_UP, N_("Ch. Up"), NULL, ++ { "ChannelUp", "go-up", N_("Ch. Up"), NULL, + N_("Switch to higher channel"), G_CALLBACK (channel_up_action) }, +- { "ChannelDown", GTK_STOCK_GO_DOWN, N_("Ch. Down"), NULL, ++ { "ChannelDown", "go-down", N_("Ch. Down"), NULL, + N_("Switch to lower channel"), G_CALLBACK (channel_down_action) }, +- { "Controls", GTK_STOCK_EXECUTE, N_("Controls"), NULL, ++ { "Controls", "system-run", N_("Controls"), NULL, + N_("Change picture controls"), G_CALLBACK (controls_action) }, + }; + +@@ -714,7 +734,8 @@ + { + gint index; + +- index = g_list_index (GTK_MENU_SHELL (popup_menu)->children, widget); ++ index = g_list_index (gtk_container_get_children ++ (GTK_CONTAINER (popup_menu)), widget); + if (index >= 0) + { + if (_ttxview_hotlist_menu_insert) +@@ -775,7 +796,7 @@ + gtk_widget_show (menu_item); + gtk_menu_shell_append (menu, menu_item); + +- gtk_menu_item_remove_submenu (z->channels_menu); ++ gtk_menu_item_set_submenu (z->channels_menu, NULL); + gtk_menu_item_set_submenu (z->channels_menu, widget); + + add_channel_entries (menu, 1, 16, z->info); +@@ -958,8 +979,6 @@ + z_show_empty_submenu (z->subtitle_action_group, "SubtitlesSubmenu"); + z_show_empty_submenu (z->teletext_action_group, "BookmarksSubmenu"); + +- gnome_app_construct (&z->app, "Zapping", "Zapping"); +- + z->ui_manager = gtk_ui_manager_new (); + gtk_ui_manager_insert_action_group (z->ui_manager, + z->generic_action_group, APPEND); +@@ -1020,10 +1039,8 @@ + } + + { +- widget = gnome_appbar_new (/* progress */ FALSE, +- /* status */ TRUE, +- /* interactive */ GNOME_PREFERENCES_NEVER); +- z->appbar = GNOME_APPBAR (widget); ++ widget = gtk_statusbar_new (); ++ z->appbar = GTK_STATUSBAR (widget); + + /* Cannot hide the appbar at this point, so we add (and show) when + the Teletext plugin needs it. */ +@@ -1032,7 +1049,7 @@ + stack = z_stack_new (); + z->contents = Z_STACK (stack); + gtk_widget_show (stack); +- gnome_app_set_contents (&z->app, stack); ++ gtk_container_add (GTK_CONTAINER (&z->app), stack); + + widget = z_video_new (); + z->video = Z_VIDEO (widget); +@@ -1109,7 +1126,7 @@ + info.instance_size = sizeof (Zapping); + info.instance_init = instance_init; + +- type = g_type_register_static (GNOME_TYPE_APP, ++ type = g_type_register_static (GTK_TYPE_WINDOW, + "Zapping", + &info, (GTypeFlags) 0); + } +--- zapping.orig/src/zconf.c ++++ zapping/src/zconf.c +@@ -33,7 +33,7 @@ + # include "config.h" + #endif + +-#include ++#include + #include + #include + #include +@@ -1707,6 +1707,6 @@ + gboolean active = * (gboolean *) new_value_ptr; + GtkCheckMenuItem *item = user_data; + +- if (active != item->active) ++ if (active != gtk_check_menu_item_get_active (item)) + gtk_check_menu_item_set_active (item, active); + } +--- zapping.orig/src/zgconf.c ++++ zapping/src/zgconf.c +@@ -555,7 +555,7 @@ + } + + static void +-int_slider_changed (GtkObject * adj _unused_, ++int_slider_changed (GtkAdjustment * adj _unused_, + notify * n) + { + ZSpinSlider *spinslider; +@@ -588,7 +588,7 @@ + gint * var) + { + notify *n; +- GtkObject *adj; ++ GtkAdjustment *adj; + GtkWidget *spinslider; + + n = g_malloc0 (sizeof (*n)); +@@ -651,7 +651,7 @@ + } + + static void +-float_slider_changed (GtkObject * adj _unused_, ++float_slider_changed (GtkAdjustment * adj _unused_, + notify * n) + { + ZSpinSlider *spinslider; +@@ -679,7 +679,7 @@ + gdouble * var) + { + notify *n; +- GtkObject *adj; ++ GtkAdjustment *adj; + GtkWidget *spinslider; + + n = g_malloc0 (sizeof (*n)); +@@ -790,19 +790,19 @@ + { + GError *error = NULL; + notify_combo_box *n; +- GtkComboBox *combo_box; ++ GtkComboBoxText *combo_box; + guint i; + gchar *s; + + n = g_malloc0 (sizeof (*n)); + + n->n.var = NULL; +- n->n.object = G_OBJECT (gtk_combo_box_new_text ()); ++ n->n.object = G_OBJECT (gtk_combo_box_text_new ()); + +- combo_box = GTK_COMBO_BOX (n->n.object); ++ combo_box = GTK_COMBO_BOX_TEXT (n->n.object); + + for (i = 0; menu[i]; ++i) +- gtk_combo_box_append_text (combo_box, _(menu[i])); ++ gtk_combo_box_text_append_text (combo_box, _(menu[i])); + + if ((s = gconf_client_get_string (gconf_client, key, &error))) + { +@@ -810,14 +810,14 @@ + { + if (0 == strcmp (s, lookup_table[i].str)) + { +- gtk_combo_box_set_active (combo_box, (int) i); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), (int) i); + break; + } + } + } + else + { +- gtk_combo_box_set_active (combo_box, 0); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); + z_gconf_handle_get_error (key, &error); + } + +--- zapping.orig/src/zimage.c ++++ zapping/src/zimage.c +@@ -126,18 +126,20 @@ + if (backends[pz->backend].backend.image_put) + backends[pz->backend].backend.image_put + (image, +- (guint) dest_window->allocation.width, +- (guint) dest_window->allocation.height); ++ (guint) gtk_widget_get_allocated_width (dest_window), ++ (guint) gtk_widget_get_allocated_height (dest_window)); + } + + void + video_init (GtkWidget * window, +- GdkGC * gc) ++ cairo_t * cr) + { ++ GdkWindow *w = NULL; + tv_pixfmt_set pixfmt_set; + guint i; + +- g_assert (window->window); ++ w = gtk_widget_get_window (window); ++ g_assert (w); + + dest_window = window; + +@@ -148,8 +150,7 @@ + pixfmt_set |= backends[i].backend.supported_formats (); + + if (backends[i].backend.set_destination) +- backends[i].backend.set_destination (window->window, +- gc, zapping->info); ++ backends[i].backend.set_destination (w, cr, zapping->info); + } + + capture_format_id = request_capture_format (zapping->info, +@@ -192,7 +193,6 @@ + + extern void add_backend_xv (void); + extern void add_backend_x11 (void); +-extern void add_backend_gdkrgb (void); + extern void add_backend_mem (void); + + void startup_zimage (void) +@@ -200,7 +200,6 @@ + /* The order is important, fast backends should be added first */ + add_backend_xv (); + add_backend_x11 (); +- add_backend_gdkrgb (); + add_backend_mem (); + } + +--- zapping.orig/src/zspinslider.c ++++ zapping/src/zspinslider.c +@@ -33,17 +33,17 @@ + + static GObjectClass * parent_class; + +-gfloat ++gdouble + z_spinslider_get_value (ZSpinSlider * sp) + { + g_return_val_if_fail (Z_IS_SPINSLIDER (sp), 0.0); + +- return sp->spin_adj->value; ++ return gtk_adjustment_get_value (sp->spin_adj); + } + + void + z_spinslider_set_value (ZSpinSlider * sp, +- gfloat value) ++ gdouble value) + { + g_return_if_fail (Z_IS_SPINSLIDER (sp)); + +@@ -54,15 +54,15 @@ + gint + z_spinslider_get_int_value (ZSpinSlider * sp) + { +- gfloat value; ++ gdouble value; + + g_return_val_if_fail (Z_IS_SPINSLIDER (sp), 0); + +- value = sp->spin_adj->value; ++ value = gtk_adjustment_get_value (sp->spin_adj); + + if (value < G_MININT || value > G_MAXINT) + g_warning ("ZSpinSlider value %f not representable as gint.", +- (double) value); ++ value); + + return (gint) value; + } +@@ -79,7 +79,7 @@ + + void + z_spinslider_set_reset_value (ZSpinSlider * sp, +- gfloat value) ++ gdouble value) + { + g_return_if_fail (Z_IS_SPINSLIDER (sp)); + +@@ -92,31 +92,38 @@ + void + z_spinslider_adjustment_changed (ZSpinSlider * sp) + { ++ gdouble ps; ++ + g_return_if_fail (Z_IS_SPINSLIDER (sp)); + +- sp->hscale_adj->value = sp->spin_adj->value; +- sp->hscale_adj->lower = sp->spin_adj->lower; +- sp->hscale_adj->upper = sp->spin_adj->upper + sp->spin_adj->page_size; +- sp->hscale_adj->step_increment = sp->spin_adj->step_increment; +- sp->hscale_adj->page_increment = sp->spin_adj->page_increment; +- sp->hscale_adj->page_size = sp->spin_adj->page_size; ++ ps = gtk_adjustment_get_page_size (sp->spin_adj); + +- gtk_adjustment_changed (sp->spin_adj); +- gtk_adjustment_changed (sp->hscale_adj); ++ gtk_adjustment_configure (sp->hscale_adj, ++ gtk_adjustment_get_value (sp->spin_adj), ++ gtk_adjustment_get_lower (sp->spin_adj), ++ gtk_adjustment_get_upper (sp->spin_adj) + ps, ++ gtk_adjustment_get_step_increment (sp->spin_adj), ++ gtk_adjustment_get_page_increment (sp->spin_adj), ++ ps); + } + + static void + on_hscale_changed (GtkWidget * widget _unused_, + ZSpinSlider * sp) + { +- if (sp->spin_adj->value != sp->hscale_adj->value) +- gtk_adjustment_set_value (sp->spin_adj, sp->hscale_adj->value); ++ gdouble val = gtk_adjustment_get_value (sp->hscale_adj); ++ ++ if (gtk_adjustment_get_value (sp->spin_adj) != val) ++ gtk_adjustment_set_value (sp->spin_adj, val); + } + + static void + on_spinbutton_changed (GtkWidget * widget _unused_, + ZSpinSlider * sp) + { ++ gdouble sval = gtk_adjustment_get_value (sp->spin_adj); ++ gdouble hval = gtk_adjustment_get_value (sp->hscale_adj); ++ + if (!sp->in_reset) + { + if (sp->reset_state != 0) +@@ -126,18 +133,18 @@ + sp->reset_state--; + } + +- sp->history[2] = sp->spin_adj->value; ++ sp->history[2] = sval; + } + +- if (sp->spin_adj->value != sp->hscale_adj->value) +- gtk_adjustment_set_value (sp->hscale_adj, sp->spin_adj->value); ++ if (sval != hval) ++ gtk_adjustment_set_value (sp->hscale_adj, sval); + } + + static void + on_reset (GtkWidget * widget _unused_, + ZSpinSlider * sp) + { +- gfloat current_value; ++ gdouble current_value; + + current_value = sp->history[2]; + sp->history[2] = sp->history[1]; +@@ -179,12 +186,13 @@ + z_spinslider_new (GtkAdjustment * spin_adj, + GtkAdjustment * hscale_adj, + const gchar * unit, +- gfloat reset, ++ gdouble reset, + gint digits) + { + ZSpinSlider *sp; + GtkBox *box; + GtkWidget *widget; ++ gdouble value, lower, upper, step, page, page_size; + + g_return_val_if_fail (GTK_IS_ADJUSTMENT (spin_adj), NULL); + +@@ -193,11 +201,16 @@ + sp->spin_adj = spin_adj; + sp->hscale_adj = hscale_adj; + ++ value = gtk_adjustment_get_value (spin_adj); ++ lower = gtk_adjustment_get_lower (spin_adj); ++ upper = gtk_adjustment_get_upper (spin_adj); ++ step = gtk_adjustment_get_step_increment (spin_adj); ++ page = gtk_adjustment_get_page_increment (spin_adj); ++ page_size = gtk_adjustment_get_page_size (spin_adj); ++ + if (0) + fprintf (stderr, "zss_new %f %f...%f %f %f %f %d\n", +- spin_adj->value, spin_adj->lower, spin_adj->upper, +- spin_adj->step_increment, spin_adj->page_increment, +- spin_adj->page_size, digits); ++ value, lower, upper, step, page, page_size, digits); + + box = GTK_BOX (&sp->hbox); + +@@ -207,7 +220,7 @@ + GtkSpinButton *spin_button; + + widget = gtk_spin_button_new (spin_adj, +- spin_adj->step_increment, ++ step, + (guint) digits); + gtk_widget_show (widget); + +@@ -245,16 +258,16 @@ + + if (!hscale_adj) + { +- GtkObject *adj; ++ GtkAdjustment *adj; + + /* Necessary to reach spin_adj->upper with slider. */ + +- adj = gtk_adjustment_new (spin_adj->value, +- spin_adj->lower, +- spin_adj->upper + spin_adj->page_size, +- spin_adj->step_increment, +- spin_adj->page_increment, +- spin_adj->page_size); ++ adj = gtk_adjustment_new (value, ++ lower, ++ upper + page_size, ++ step, ++ page, ++ page_size); + + hscale_adj = GTK_ADJUSTMENT (adj); + sp->hscale_adj = hscale_adj; +@@ -263,7 +276,7 @@ + { + GtkScale *scale; + +- widget = gtk_hscale_new (hscale_adj); ++ widget = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, hscale_adj); + gtk_widget_show (widget); + + /* Another hack */ +@@ -303,7 +316,7 @@ + gtk_widget_show (image); + button = gtk_button_new (); + gtk_container_add (GTK_CONTAINER (button), image); +- z_tooltip_set (button, _("Reset")); ++ gtk_widget_set_tooltip_text (button, _("Reset")); + } + else + { +--- zapping.orig/src/zspinslider.h ++++ zapping/src/zspinslider.h +@@ -50,7 +50,7 @@ + GtkAdjustment * spin_adj; + GtkAdjustment * hscale_adj; + +- gfloat history[3]; ++ gdouble history[3]; + guint reset_state; + gboolean in_reset; + }; +@@ -66,13 +66,13 @@ + z_spinslider_new (GtkAdjustment * spin_adj, + GtkAdjustment * hscale_adj, + const gchar * unit, +- gfloat reset_value, ++ gdouble reset_value, + gint digits); +-gfloat ++gdouble + z_spinslider_get_value (ZSpinSlider * sp); + void + z_spinslider_set_value (ZSpinSlider * sp, +- gfloat value); ++ gdouble value); + gint + z_spinslider_get_int_value (ZSpinSlider * sp); + void +@@ -80,7 +80,7 @@ + gint value); + void + z_spinslider_set_reset_value (ZSpinSlider * sp, +- gfloat value); ++ gdouble value); + void + z_spinslider_adjustment_changed (ZSpinSlider * sp); + +--- zapping.orig/src/zstack.h ++++ zapping/src/zstack.h +@@ -40,7 +40,7 @@ + #ifndef __Z_STACK_H__ + #define __Z_STACK_H__ + +-#include ++#include + + G_BEGIN_DECLS + +--- zapping.orig/src/zstack.c ++++ zapping/src/zstack.c +@@ -38,14 +38,14 @@ + gboolean has_window) + { + g_return_if_fail (Z_IS_STACK (stack)); +- g_return_if_fail (!GTK_WIDGET_REALIZED (stack)); ++ g_return_if_fail (!gtk_widget_get_realized (GTK_WIDGET (stack))); + +- if (!has_window != GTK_WIDGET_NO_WINDOW (stack)) ++ if (has_window != gtk_widget_get_has_window (GTK_WIDGET (stack))) + { + if (has_window) +- GTK_WIDGET_UNSET_FLAGS (stack, GTK_NO_WINDOW); ++ gtk_widget_set_has_window (GTK_WIDGET (stack), TRUE); + else +- GTK_WIDGET_SET_FLAGS (stack, GTK_NO_WINDOW); ++ gtk_widget_set_has_window (GTK_WIDGET (stack), FALSE); + } + } + +@@ -123,6 +123,7 @@ + ZStack *stack = Z_STACK (user_data); + ZStackChild *child; + ZStackChild *below; ++ GdkWindow *window = NULL; + + child = get_child (stack, widget); + g_assert (NULL != child); +@@ -131,14 +132,15 @@ + { + g_assert (child != below); + +- if (!GTK_WIDGET_REALIZED (below->widget)) ++ if (!gtk_widget_get_realized (below->widget)) + { + gtk_widget_realize (below->widget); + } + +- g_assert (NULL != below->widget->window); ++ window = gtk_widget_get_window (below->widget); ++ g_assert (NULL != window); + +- gtk_widget_set_parent_window (widget, below->widget->window); ++ gtk_widget_set_parent_window (widget, window); + } + + /* Now realize it. */ +@@ -163,23 +165,23 @@ + + g_assert (child != above); + +- child_window = above->widget->window; ++ child_window = gtk_widget_get_window (above->widget); + + if ((below = get_child_below (stack, child))) + { + g_assert (child != below); + g_assert (above != below); + +- parent_window = below->widget->window; ++ parent_window = gtk_widget_get_window (below->widget); + } + else + { + GtkWidget *stack_widget = GTK_WIDGET (stack); + +- if (GTK_WIDGET_NO_WINDOW (stack_widget)) ++ if (!gtk_widget_get_has_window (stack_widget)) + parent_window = gtk_widget_get_parent_window (stack_widget); + else +- parent_window = stack_widget->window; ++ parent_window = gtk_widget_get_window (stack_widget); + } + + g_assert (NULL != parent_window); +@@ -279,7 +281,7 @@ + + if (child->widget == widget) + { +- gboolean was_visible = GTK_WIDGET_VISIBLE (widget); ++ gboolean was_visible = gtk_widget_get_visible (widget); + + gtk_widget_unparent (widget); + +@@ -287,7 +289,7 @@ + g_list_free (children); + g_free (child); + +- if (was_visible && GTK_WIDGET_VISIBLE (container)) ++ if (was_visible && gtk_widget_get_visible (GTK_WIDGET (container))) + gtk_widget_queue_resize (GTK_WIDGET (container)); + + break; +@@ -312,19 +314,19 @@ + GList *children; + guint border_width; + +- widget->allocation = *allocation; ++ gtk_widget_set_allocation (widget, allocation); + +- if (!GTK_WIDGET_NO_WINDOW (widget)) ++ if (gtk_widget_get_has_window (widget)) + { +- if (GTK_WIDGET_REALIZED (widget)) +- gdk_window_move_resize (widget->window, ++ if (gtk_widget_get_realized (widget)) ++ gdk_window_move_resize (gtk_widget_get_window (widget), + allocation->x, + allocation->y, + allocation->width, + allocation->height); + } + +- border_width = GTK_CONTAINER (stack)->border_width; ++ border_width = gtk_container_get_border_width (GTK_CONTAINER (stack)); + + children = stack->children; + while (children) +@@ -334,23 +336,25 @@ + child = children->data; + children = children->next; + +- if (GTK_WIDGET_VISIBLE (child->widget)) ++ if (gtk_widget_get_visible (child->widget)) + { + GtkAllocation child_allocation; ++ GtkAllocation widget_allocation; + ++ gtk_widget_get_allocation (widget, &widget_allocation); + child_allocation.x = border_width; + child_allocation.y = border_width; + +- if (GTK_WIDGET_NO_WINDOW (widget)) ++ if (!gtk_widget_get_has_window (widget)) + { +- child_allocation.x += widget->allocation.x; +- child_allocation.y += widget->allocation.y; ++ child_allocation.x += widget_allocation.x; ++ child_allocation.y += widget_allocation.y; + } + + child_allocation.width = +- widget->allocation.width - border_width * 2; ++ widget_allocation.width - border_width * 2; + child_allocation.height = +- widget->allocation.height - border_width * 2; ++ widget_allocation.height - border_width * 2; + + gtk_widget_size_allocate (child->widget, &child_allocation); + } +@@ -376,11 +380,12 @@ + child = children->data; + children = children->next; + +- if (GTK_WIDGET_VISIBLE (child->widget)) ++ if (gtk_widget_get_visible (child->widget)) + { + GtkRequisition child_requisition; + +- gtk_widget_size_request (child->widget, &child_requisition); ++ gtk_widget_get_preferred_size (child->widget, NULL, ++ &child_requisition); + + requisition->height = MAX (requisition->height, + child_requisition.height); +@@ -389,55 +394,73 @@ + } + } + +- border_width = GTK_CONTAINER (stack)->border_width; ++ border_width = gtk_container_get_border_width (GTK_CONTAINER (stack)); + requisition->height += border_width * 2; + requisition->width += border_width * 2; + } + + static void ++z_stack_get_preferred_width (GtkWidget *widget, gint *min, gint *nat) ++{ ++ GtkRequisition requisition; ++ ++ z_stack_size_request (widget, &requisition); ++ ++ *min = *nat = requisition.width; ++} ++ ++static void ++z_stack_get_preferred_height (GtkWidget *widget, gint *min, gint *nat) ++{ ++ GtkRequisition requisition; ++ ++ z_stack_size_request (widget, &requisition); ++ ++ *min = *nat = requisition.height; ++} ++ ++static void + z_stack_realize (GtkWidget * widget) + { ++ GdkWindow *window; + GdkWindowAttr attributes; ++ GtkAllocation allocation; + gint attributes_mask; + +- if (GTK_WIDGET_NO_WINDOW (widget)) ++ if (!gtk_widget_get_has_window (widget)) + GTK_WIDGET_CLASS (parent_class)->realize (widget); + else + { +- GTK_WIDGET_SET_FLAGS (widget, GTK_REALIZED); ++ gtk_widget_set_realized (widget, TRUE); ++ gtk_widget_get_allocation (widget, &allocation); + + attributes.window_type = GDK_WINDOW_CHILD; +- attributes.x = widget->allocation.x; +- attributes.y = widget->allocation.y; +- attributes.width = widget->allocation.width; +- attributes.height = widget->allocation.height; ++ attributes.x = allocation.x; ++ attributes.y = allocation.y; ++ attributes.width = allocation.width; ++ attributes.height = allocation.height; + attributes.wclass = GDK_INPUT_OUTPUT; + attributes.visual = gtk_widget_get_visual (widget); +- attributes.colormap = gtk_widget_get_colormap (widget); + attributes.event_mask = gtk_widget_get_events (widget); + attributes.event_mask |= GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK; + +- attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP; ++ attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL; + +- widget->window = ++ gtk_widget_set_window (widget, + gdk_window_new (gtk_widget_get_parent_window (widget), + &attributes, +- attributes_mask); +- +- gdk_window_set_user_data (widget->window, widget); +- +- widget->style = gtk_style_attach (widget->style, widget->window); ++ attributes_mask)); + +- gtk_style_set_background (widget->style, +- widget->window, +- GTK_STATE_NORMAL); ++ window = gtk_widget_get_window (widget); ++ gdk_window_set_user_data (window, widget); + } + } + + static void +-z_stack_init (ZStack * stack) ++z_stack_init (ZStack * stack, ++ ZStackClass * class) + { +- GTK_WIDGET_SET_FLAGS (stack, GTK_NO_WINDOW); ++ gtk_widget_set_has_window (GTK_WIDGET (stack), FALSE); + + stack->children = NULL; + } +@@ -449,7 +472,8 @@ + } + + static void +-z_stack_class_init (ZStackClass * class) ++z_stack_class_init (ZStackClass * class, ++ gpointer data) + { + GtkWidgetClass *widget_class = (GtkWidgetClass *) class; + GtkContainerClass *container_class = (GtkContainerClass *) class; +@@ -457,7 +481,8 @@ + parent_class = g_type_class_peek_parent (class); + + widget_class->realize = z_stack_realize; +- widget_class->size_request = z_stack_size_request; ++ widget_class->get_preferred_width = z_stack_get_preferred_width; ++ widget_class->get_preferred_height = z_stack_get_preferred_height; + widget_class->size_allocate = z_stack_size_allocate; + + container_class->add = z_stack_add; +--- zapping.orig/src/zvbi.c ++++ zapping/src/zvbi.c +@@ -22,7 +22,7 @@ + # include "config.h" + #endif + +-#include ++#include + #include + #include + #include +@@ -319,7 +319,7 @@ + break; + } + +- if (!check->active) ++ if (!gtk_check_menu_item_get_active (check)) + gtk_check_menu_item_set_active (check, TRUE); + } + +@@ -405,7 +405,20 @@ + + g_assert (NULL != xot); + +- keyword = (gchar *) g_object_get_data (G_OBJECT (widget), "key"); ++ if (!GTK_IS_COMBO_BOX_TEXT (widget)) ++ keyword = (gchar *) g_object_get_data (G_OBJECT (widget), "key"); ++ else ++ { ++ GtkTreeModel *model; ++ GtkTreeIter iter; ++ gint id; ++ ++ id = gtk_combo_box_get_id_column (GTK_COMBO_BOX (widget)); ++ model = gtk_combo_box_get_model (GTK_COMBO_BOX (widget)); ++ gtk_combo_box_get_active_iter (GTK_COMBO_BOX (widget), &iter); ++ gtk_tree_model_get (model, &iter, id, &keyword, -1); ++ } ++ + oi = vbi3_export_option_info_by_keyword (xot->context, keyword); + + g_assert (NULL != oi); +@@ -414,7 +427,7 @@ + + if (oi->menu.str) + { +- val.num = z_object_get_int_data (G_OBJECT (widget), "index"); ++ val.num = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + if (vbi3_export_option_menu_set (xot->context, keyword, val.num)) + zconf_set_int (val.num, zcname); + } +@@ -429,13 +442,15 @@ + break; + + case VBI3_OPTION_INT: +- val.num = (int) GTK_ADJUSTMENT (widget)->value; ++ val.num = (int) gtk_adjustment_get_value (gtk_range_get_adjustment ++ (GTK_RANGE (widget))); + if (vbi3_export_option_set (xot->context, keyword, val)) + zconf_set_int (val.num, zcname); + break; + + case VBI3_OPTION_REAL: +- val.dbl = GTK_ADJUSTMENT (widget)->value; ++ val.dbl = gtk_adjustment_get_value (gtk_range_get_adjustment ++ (GTK_RANGE (widget))); + if (vbi3_export_option_set (xot->context, keyword, val)) + zconf_set_float (val.dbl, zcname); + break; +@@ -453,6 +468,9 @@ + } + } + ++ if (GTK_IS_COMBO_BOX_TEXT (widget)) ++ g_free (keyword); ++ + g_free (zcname); + } + +@@ -463,13 +481,11 @@ + unsigned int index) + { + GtkWidget *option_menu; +- GtkWidget *menu; + gchar *zcname; + guint saved; + unsigned int i; + +- option_menu = gtk_option_menu_new (); +- menu = gtk_menu_new (); ++ option_menu = gtk_combo_box_text_new (); + + zcname = xot->zconf_name (xot->context, oi, xot->user_data); + zconf_create_int (oi->def.num, oi->tooltip, zcname); +@@ -479,27 +495,26 @@ + for (i = 0; i <= (unsigned int) oi->max.num; ++i) + { + gchar buf[32]; +- GtkWidget *menu_item; + + switch (oi->type) + { + case VBI3_OPTION_BOOL: + case VBI3_OPTION_INT: + g_snprintf (buf, sizeof (buf), "%d", oi->menu.num[i]); +- menu_item = gtk_menu_item_new_with_label (buf); ++ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (option_menu), ++ oi->keyword, buf); + break; + + case VBI3_OPTION_REAL: + g_snprintf (buf, sizeof (buf), "%f", oi->menu.dbl[i]); +- menu_item = gtk_menu_item_new_with_label (buf); ++ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (option_menu), ++ oi->keyword, buf); + break; + + case VBI3_OPTION_STRING: +- menu_item = gtk_menu_item_new_with_label (oi->menu.str[i]); +- break; +- + case VBI3_OPTION_MENU: +- menu_item = gtk_menu_item_new_with_label (oi->menu.str[i]); ++ gtk_combo_box_text_append (GTK_COMBO_BOX_TEXT (option_menu), ++ oi->keyword, oi->menu.str[i]); + break; + + default: +@@ -508,23 +523,17 @@ + continue; + } + +- z_object_set_const_data (G_OBJECT (menu_item), "key", oi->keyword); +- g_object_set_data (G_OBJECT (menu_item), "index", GINT_TO_POINTER (i)); +- +- g_signal_connect (G_OBJECT (menu_item), "activate", ++ g_signal_connect (G_OBJECT (option_menu), "changed", + G_CALLBACK (on_control_changed), xot); + +- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item); +- + if (i == saved) + { +- on_control_changed (menu_item, xot); ++ on_control_changed (option_menu, xot); + } + } + +- gtk_option_menu_set_menu (GTK_OPTION_MENU (option_menu), menu); +- gtk_option_menu_set_history (GTK_OPTION_MENU (option_menu), saved); +- z_tooltip_set (option_menu, oi->tooltip); ++ gtk_combo_box_set_active (GTK_COMBO_BOX (option_menu), saved); ++ gtk_widget_set_tooltip_text (option_menu, oi->tooltip); + + g_free (zcname); + +@@ -557,7 +566,7 @@ + gtk_widget_show (check_button); + gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (check_button), + /* indicator */ FALSE); +- z_tooltip_set (check_button, oi->tooltip); ++ gtk_widget_set_tooltip_text (check_button, oi->tooltip); + z_object_set_const_data (G_OBJECT (check_button), "key", oi->keyword); + g_signal_connect (G_OBJECT (check_button), "toggled", + G_CALLBACK (on_control_changed), xot); +@@ -581,7 +590,7 @@ + const vbi3_option_info *oi, + unsigned int index) + { +- GtkObject *adj; ++ GtkAdjustment *adj; + GtkWidget *hscale; + gchar *zcname; + +@@ -610,11 +619,11 @@ + g_signal_connect (adj, "value-changed", + G_CALLBACK (on_control_changed), xot); + +- hscale = gtk_hscale_new (GTK_ADJUSTMENT (adj)); ++ hscale = gtk_scale_new (GTK_ORIENTATION_HORIZONTAL, adj); + gtk_widget_show (hscale); + gtk_scale_set_value_pos (GTK_SCALE (hscale), GTK_POS_LEFT); + gtk_scale_set_digits (GTK_SCALE (hscale), 0); +- z_tooltip_set (hscale, oi->tooltip); ++ gtk_widget_set_tooltip_text (hscale, oi->tooltip); + + on_control_changed ((GtkWidget *) adj, xot); + +@@ -643,7 +652,7 @@ + + entry = gtk_entry_new (); + gtk_widget_show (entry); +- z_tooltip_set (entry, oi->tooltip); ++ gtk_widget_set_tooltip_text (entry, oi->tooltip); + + z_object_set_const_data (G_OBJECT (entry), "key", oi->keyword); + g_signal_connect (G_OBJECT (entry), "changed", +@@ -2450,8 +2459,8 @@ + vbi_source = "pes"; + + widget = lookup_widget (page, "devices-vbi-pes-fileentry"); +- path = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (widget), +- /* file_must_exit */ FALSE); ++ path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); ++ + if (NULL != path) + { + s = zcg_char (NULL, "vbi_pes_file"); +@@ -2471,8 +2480,8 @@ + vbi_source = "kernel"; + + widget = lookup_widget (page, "devices-vbi-kernel-fileentry"); +- path = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (widget), +- /* file_must_exit */ FALSE); ++ path = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (widget)); ++ + if (NULL != path) + { + s = zcg_char (NULL, "vbi_device"); +@@ -2523,8 +2532,8 @@ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); + + widget = lookup_widget (page, "devices-vbi-pes-fileentry"); +- widget = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (widget)); +- gtk_entry_set_text (GTK_ENTRY (widget), zcg_char (NULL, "vbi_pes_file")); ++ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (widget), ++ zcg_char (NULL, "vbi_pes_file")); + } + + { +@@ -2534,8 +2543,8 @@ + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (widget), TRUE); + + widget = lookup_widget (page, "devices-vbi-kernel-fileentry"); +- widget = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (widget)); +- gtk_entry_set_text (GTK_ENTRY (widget), zcg_char (NULL, "vbi_device")); ++ gtk_file_chooser_set_current_name (GTK_FILE_CHOOSER (widget), ++ zcg_char (NULL, "vbi_device")); + } + + #else /* !HAVE_LIBZVBI */ +@@ -2556,7 +2565,7 @@ + }; + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "zapping.glade2"); ++ "zapping.ui"); + } + + void +--- zapping.orig/src/zvideo.c ++++ zapping/src/zvideo.c +@@ -25,6 +25,7 @@ + #define ZVIDEO_EXPOSE_TEST 0 + #endif + ++#include + #include "zmisc.h" + #include "zvideo.h" + #include "zmarshalers.h" +@@ -44,7 +45,7 @@ + static void + cursor_blanked (ZVideo * video) + { +- gdk_window_set_cursor (GTK_WIDGET (video)->window, ++ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (video)), + Z_VIDEO_GET_CLASS (video)->blank_cursor); + } + +@@ -53,6 +54,7 @@ + { + ZVideo *video = (ZVideo *) p; + GtkWidget *widget; ++ GdkWindow *window; + GdkEventMask mask; + + g_assert (video->blank_cursor_timeout > 0); +@@ -62,13 +64,14 @@ + video->blank_cursor_timeout_id = NO_SOURCE_ID; + + widget = GTK_WIDGET (video); ++ window = gtk_widget_get_window (widget); + +- mask = gdk_window_get_events (widget->window); ++ mask = gdk_window_get_events (window); + mask |= GDK_POINTER_MOTION_MASK; + /* Something outside Zapping seems to request motion hint, + suppressing motion events. */ + mask &= ~GDK_POINTER_MOTION_HINT_MASK; +- gdk_window_set_events (widget->window, mask); ++ gdk_window_set_events (window, mask); + + return FALSE; /* don't call again */ + } +@@ -89,10 +92,12 @@ + + cursor_type = MIN (cursor_type, GDK_LAST_CURSOR - 2) & ~1; + +- if ((cursor = gdk_cursor_new (cursor_type))) ++ if ((cursor ++ = gdk_cursor_new_for_display (gdk_display_get_default (), cursor_type))) + { +- gdk_window_set_cursor (GTK_WIDGET (video)->window, cursor); +- gdk_cursor_unref (cursor); ++ gdk_window_set_cursor (gtk_widget_get_window (GTK_WIDGET (video)), ++ cursor); ++ g_object_unref (cursor); + + video->blanked_cursor_type = cursor_type; + +@@ -143,15 +148,17 @@ + else + { + GtkWidget *widget; ++ GdkWindow *window; + GdkEventMask mask; + + z_video_set_cursor (video, video->blanked_cursor_type); + + widget = GTK_WIDGET (video); ++ window = gtk_widget_get_window (widget); + +- mask = gdk_window_get_events (widget->window); ++ mask = gdk_window_get_events (window); + mask &= ~GDK_POINTER_MOTION_MASK; +- gdk_window_set_events (widget->window, mask); ++ gdk_window_set_events (window, mask); + } + } + +@@ -170,7 +177,7 @@ + GtkWidget *toplevel; + + if ((toplevel = gtk_widget_get_toplevel (GTK_WIDGET (video)))) +- if (!GTK_WIDGET_TOPLEVEL (toplevel) ++ if (!gtk_widget_is_toplevel (toplevel) + || !GTK_IS_WINDOW (toplevel)) + return NULL; + +@@ -184,6 +191,7 @@ + ZVideo *video = (ZVideo *) widget; + GtkWidget *toplevel; + GtkAllocation darea_alloc; ++ gint width, height, top_width, top_height; + + g_return_if_fail (Z_IS_VIDEO (widget)); + g_return_if_fail (allocation != NULL); +@@ -201,7 +209,12 @@ + /* g_assert (allocation->width >= video->min_width);*/ + /* g_assert (allocation->height >= video->min_height);*/ + ++ width = gtk_widget_get_allocated_width (widget); ++ height = gtk_widget_get_allocated_height (widget); ++ + toplevel = get_toplevel_window (video); ++ top_width = gtk_widget_get_allocated_width (toplevel); ++ top_height = gtk_widget_get_allocated_height (toplevel); + + /* Our objective is to automatically resize the drawing area as the + user resizes the window, and to keep the size fixed otherwise. +@@ -221,16 +234,14 @@ + case and resize the window instead of adjusting the widget. */ + + if (toplevel +- && video->window_alloc.width == toplevel->allocation.width +- && video->window_alloc.height == toplevel->allocation.height +- && (allocation->width != widget->allocation.width +- || allocation->height != widget->allocation.height)) ++ && video->window_alloc.width == top_width ++ && video->window_alloc.height == top_height ++ && (allocation->width != width ++ || allocation->height != height)) + { +- gdk_window_resize (toplevel->window, +- toplevel->allocation.width - allocation->width +- + widget->allocation.width, +- toplevel->allocation.height - allocation->height +- + widget->allocation.height); ++ gdk_window_resize (gtk_widget_get_window (toplevel), ++ top_width - allocation->width + width, ++ top_height - allocation->height + height); + return; + } + +@@ -313,27 +324,27 @@ + GtkRequisition curr; + guint changed; + +- hints.base_width = toplevel->allocation.width - allocation->width; +- hints.base_height = toplevel->allocation.height - allocation->height; ++ hints.base_width = top_width - allocation->width; ++ hints.base_height = top_height - allocation->height; + + changed = hints.base_width ^ video->old_hints.base_width; + changed |= hints.base_height ^ video->old_hints.base_height; + +- curr = widget->requisition; +- widget->requisition.width = video->min_width; +- widget->requisition.height = video->min_height; ++ gtk_widget_get_preferred_size (widget, NULL, &curr); ++ gtk_widget_set_size_request (widget, video->min_width, ++ video->min_height); + + /* Probably there's a better way but I'm tired of this crap. */ +- gtk_widget_size_request (toplevel, &min); ++ gtk_widget_get_preferred_size (toplevel, NULL, &min); + + hints.min_width = hints.base_width + + CEIL (min.width - hints.base_width, video->mod_x); + hints.min_height = hints.base_height + + CEIL (min.height - hints.base_height, video->mod_y); + +- widget->requisition = curr; ++ gtk_widget_set_size_request (widget, curr.width, curr.height); + +- gtk_widget_size_request (toplevel, &min); ++ gtk_widget_get_preferred_size (toplevel, NULL, &min); + + /* video->min* should have the correct aspect, but to fit + all widgets the minimum window size can be larger than +@@ -418,19 +429,30 @@ + } + + static void +-size_request (GtkWidget * widget, +- GtkRequisition * requisition) ++get_preferred_width (GtkWidget *widget, gint *min, gint *nat) + { + ZVideo *video = (ZVideo *) widget; + +- GTK_WIDGET_CLASS (parent_class)->size_request (widget, requisition); ++ GTK_WIDGET_CLASS (parent_class)->get_preferred_width (widget, min, nat); + + if (video->size_magic) + { +- requisition->width = CLAMP ((guint) requisition->width, +- video->min_width, video->max_width); +- requisition->height = CLAMP ((guint) requisition->height, +- video->min_height, video->max_height); ++ *min = CLAMP (*min, video->min_width, video->max_width); ++ *nat = CLAMP (*nat, video->min_width, video->max_width); ++ } ++} ++ ++static void ++get_preferred_height (GtkWidget *widget, gint *min, gint *nat) ++{ ++ ZVideo *video = (ZVideo *) widget; ++ ++ GTK_WIDGET_CLASS (parent_class)->get_preferred_height (widget, min, nat); ++ ++ if (video->size_magic) ++ { ++ *min = CLAMP (*min, video->min_height, video->max_height); ++ *nat = CLAMP (*nat, video->min_height, video->max_height); + } + } + +@@ -569,13 +591,24 @@ + case GDK_EXPOSE: + if (ZVIDEO_EXPOSE_TEST) + { ++ cairo_t *cr; ++ cairo_region_t *region; ++ GdkDrawingContext *ctxt; ++ GdkWindow *window; ++ gint width, height; ++ + fprintf (stderr, "z_video expose\n"); +- gdk_draw_arc (widget->window, +- widget->style->fg_gc[GTK_WIDGET_STATE (widget)], +- TRUE, 0, 0, +- widget->allocation.width, +- widget->allocation.height, +- 0, 64 * 360); ++ width = gtk_widget_get_allocated_width (widget); ++ height = gtk_widget_get_allocated_height (widget); ++ window = gtk_widget_get_window (widget); ++ region = gdk_window_get_visible_region (window); ++ ctxt = gdk_window_begin_draw_frame (window, region); ++ cr = gdk_drawing_context_get_cairo_context (ctxt); ++ cairo_arc (cr, width / 2, height / 2, MIN (width, height) / 2, ++ 0, 2 * M_PI); ++ cairo_fill (cr); ++ gdk_window_end_draw_frame (window, ctxt); ++ cairo_region_destroy (region); + } + + break; +@@ -619,7 +652,7 @@ + } + + static void +-destroy (GtkObject * object) ++destroy (GObject * object) + { + ZVideo *video = (ZVideo *) object; + GtkWidget *toplevel; +@@ -631,7 +664,7 @@ + g_signal_handlers_disconnect_by_func + (toplevel, window_size_allocate, video); + +- GTK_OBJECT_CLASS (parent_class)->destroy (object); ++ G_OBJECT_CLASS (parent_class)->finalize (object); + } + + static void +@@ -697,34 +730,25 @@ + gpointer class_data _unused_) + { + ZVideoClass *class = g_class; +- GtkObjectClass *object_class; ++ GObjectClass *object_class; + GtkWidgetClass *widget_class; + +- object_class = GTK_OBJECT_CLASS (g_class); ++ object_class = G_OBJECT_CLASS (g_class); + widget_class = GTK_WIDGET_CLASS (g_class); + parent_class = g_type_class_peek_parent (g_class); + +- object_class->destroy = destroy; ++ object_class->finalize = destroy; + + widget_class->realize = realize; + widget_class->size_allocate = size_allocate; +- widget_class->size_request = size_request; ++ widget_class->get_preferred_width = get_preferred_width; ++ widget_class->get_preferred_height = get_preferred_height; + + { +- char empty_cursor [16 * 16 / 8]; +- GdkColor fg = { 0, 0, 0, 0 }; +- GdkPixmap *pixmap; +- +- CLEAR (empty_cursor); +- pixmap = gdk_bitmap_create_from_data (NULL, empty_cursor, 16, 16); +- + /* XXX unref? */ + class->blank_cursor = +- gdk_cursor_new_from_pixmap (/* source */ pixmap, +- /* mask */ pixmap, +- &fg, &fg, 8, 8); +- +- g_object_unref (G_OBJECT (pixmap)); ++ gdk_cursor_new_for_display (gdk_display_get_default (), ++ GDK_BLANK_CURSOR); + } + + class->cursor_blanked = cursor_blanked; +--- zapping.orig/plugins/mpeg/mpeg.c ++++ zapping/plugins/mpeg/mpeg.c +@@ -28,7 +28,6 @@ + + #ifdef HAVE_LIBRTE + +-#include + #include + #include + +@@ -2502,7 +2501,7 @@ + GtkWidget *menu; + guint i; + +- menu = build_widget ("menu1", "mpeg_properties.glade2"); ++ menu = build_widget ("menu1", "mpeg_properties.ui"); + + gtk_widget_set_sensitive (lookup_widget (menu, "record_this"), FALSE); + gtk_widget_set_sensitive (lookup_widget (menu, "record_next"), FALSE); +@@ -2578,7 +2577,7 @@ + if (saving_dialog) + gtk_widget_destroy (saving_dialog); + +- saving_dialog = build_widget ("window3", "mpeg_properties.glade2"); ++ saving_dialog = build_widget ("window3", "mpeg_properties.ui"); + + saving_dialog_new_pixmap_table (&time_png, "table4"); + saving_dialog_new_pixmap_table (&drop_png, "table5"); +@@ -2960,7 +2959,7 @@ + }; + + standard_properties_add (dialog, groups, G_N_ELEMENTS (groups), +- "mpeg_properties.glade2"); ++ "mpeg_properties.ui"); + } + + static gboolean +--- zapping.orig/plugins/mpeg/options.c ++++ zapping/plugins/mpeg/options.c +@@ -30,8 +30,6 @@ + + #include + +-#include +- + #include "mpeg.h" + #include "src/properties.h" + #include "src/zspinslider.h" +--- zapping.orig/plugins/screenshot/Makefile.am ++++ zapping/plugins/screenshot/Makefile.am +@@ -4,8 +4,8 @@ + + plugin_LTLIBRARIES = libscreenshot.zapping.la + +-EXTRA_DIST = screenshot.glade2 +-pkgdata_DATA = screenshot.glade2 ++EXTRA_DIST = screenshot.ui ++pkgdata_DATA = screenshot.ui + + AM_CFLAGS = \ + @PLUGIN_DEFAULT_FLAGS@ \ +--- zapping.orig/plugins/screenshot/screenshot.glade2 ++++ /dev/null +@@ -1,638 +0,0 @@ +- +- +- +- +- +- +- +- True +- +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- +- +- +- 6 +- True +- 5 +- 2 +- False +- 3 +- 12 +- +- +- +- True +- _Completion command: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- screenshot_command +- +- +- 0 +- 1 +- 0 +- 1 +- fill +- +- +- +- +- +- +- True +- screenshot_command_history +- 10 +- +- +- +- True +- Command to execute after the image has been saved +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- 1 +- 2 +- 0 +- 1 +- +- +- +- +- +- +- True +- True +- _Grab on clicking OK +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- 2 +- 2 +- 3 +- fill +- +- +- +- +- +- +- True +- True +- _Add toolbar button +- True +- GTK_RELIEF_NORMAL +- True +- True +- False +- True +- +- +- 0 +- 2 +- 4 +- 5 +- fill +- +- +- +- +- +- +- True +- False +- 12 +- +- +- +- True +- _Skip +- True +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- screenshot_skip +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 1 +- 0 +- True +- GTK_UPDATE_ALWAYS +- False +- False +- 0 0 9 1 1 1 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- pictures before grabbing +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- 0 +- 2 +- 1 +- 2 +- fill +- fill +- +- +- +- +- +- True +- True +- Grab full size image +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- 2 +- 3 +- 4 +- fill +- +- +- +- +- +- +- +- +- 6 +- True +- Save Screenshot +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_DIALOG +- GDK_GRAVITY_NORTH_WEST +- True +- +- +- +- True +- False +- 8 +- +- +- +- True +- GTK_BUTTONBOX_END +- +- +- +- True +- True +- True +- gtk-preferences +- True +- GTK_RELIEF_NORMAL +- True +- 0 +- +- +- +- +- +- True +- True +- True +- gtk-cancel +- True +- GTK_RELIEF_NORMAL +- True +- -6 +- +- +- +- +- +- True +- True +- True +- gtk-ok +- True +- GTK_RELIEF_NORMAL +- True +- -5 +- +- +- +- +- 0 +- False +- True +- GTK_PACK_END +- +- +- +- +- +- True +- 7 +- 2 +- False +- 3 +- 12 +- +- +- +- True +- _Save as: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- entry +- +- +- 0 +- 1 +- 1 +- 2 +- fill +- +- +- +- +- +- +- True +- screenshot_dest_file_history +- 10 +- Destination file +- False +- True +- True +- GTK_FILE_CHOOSER_ACTION_OPEN +- +- +- +- True +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- 1 +- 2 +- 1 +- 2 +- +- +- +- +- +- +- True +- _Quality: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- hscale1 +- +- +- 0 +- 1 +- 4 +- 5 +- fill +- +- +- +- +- +- +- True +- True +- True +- GTK_POS_TOP +- 0 +- GTK_UPDATE_CONTINUOUS +- False +- 0 0 100 1 10 0 +- +- +- 1 +- 2 +- 4 +- 5 +- fill +- fill +- +- +- +- +- +- True +- _Format: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- optionmenu1 +- +- +- 0 +- 1 +- 0 +- 1 +- fill +- +- +- +- +- +- +- True +- True +- -1 +- +- +- +- True +- +- +- +- +- 1 +- 2 +- 0 +- 1 +- fill +- +- +- +- +- +- +- True +- Preview +- +- +- 1 +- 2 +- 2 +- 3 +- +- +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 1 +- 2 +- 3 +- 4 +- fill +- +- +- +- +- +- +- True +- _Deinterlace: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- radiobutton4 +- +- +- 0 +- 1 +- 5 +- 6 +- fill +- +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- True +- Off +- True +- GTK_RELIEF_NORMAL +- True +- True +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- Forward +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- radiobutton4 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- Backward +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- radiobutton4 +- +- +- 0 +- False +- False +- +- +- +- +- 1 +- 2 +- 5 +- 6 +- +- +- +- +- +- +- True +- True +- S_ubtitles +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 1 +- 2 +- 6 +- 7 +- fill +- +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- +- +--- /dev/null ++++ zapping/plugins/screenshot/screenshot.ui +@@ -0,0 +1,510 @@ ++ ++ ++ ++ ++ ++ 9 ++ 1 ++ 1 ++ ++ ++ True ++ False ++ ++ ++ ++ ++ ++ True ++ False ++ 6 ++ 5 ++ 2 ++ 12 ++ 3 ++ ++ ++ True ++ False ++ _Completion command: ++ True ++ center ++ 0 ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ _Grab on clicking OK ++ True ++ True ++ False ++ True ++ True ++ ++ ++ 2 ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ _Add toolbar button ++ True ++ True ++ False ++ True ++ True ++ True ++ ++ ++ 2 ++ 4 ++ 5 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 12 ++ ++ ++ True ++ False ++ _Skip ++ True ++ screenshot_skip ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ True ++ False ++ False ++ adjustment1 ++ 1 ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ False ++ pictures before grabbing ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ 2 ++ 1 ++ 2 ++ GTK_FILL ++ GTK_FILL ++ ++ ++ ++ ++ Grab full size image ++ True ++ True ++ False ++ True ++ True ++ ++ ++ 2 ++ 3 ++ 4 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ Command to execute after the image has been saved ++ ++ False ++ False ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ ++ ++ 100 ++ 1 ++ 10 ++ ++ ++ True ++ False ++ 6 ++ Save Screenshot ++ dialog ++ ++ ++ ++ ++ ++ True ++ False ++ 8 ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-preferences ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ gtk-ok ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 7 ++ 2 ++ 12 ++ 3 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ True ++ False ++ _Save as: ++ True ++ center ++ 0 ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ _Quality: ++ True ++ center ++ hscale1 ++ 0 ++ ++ ++ 4 ++ 5 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ adjustment2 ++ 0 ++ ++ ++ 1 ++ 2 ++ 4 ++ 5 ++ GTK_FILL ++ GTK_FILL ++ ++ ++ ++ ++ True ++ False ++ _Format: ++ True ++ center ++ 0 ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ Preview ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ center ++ ++ ++ 1 ++ 2 ++ 3 ++ 4 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ _Deinterlace: ++ True ++ center ++ radiobutton4 ++ 0 ++ ++ ++ 5 ++ 6 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ True ++ ++ ++ Off ++ True ++ True ++ False ++ True ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ Forward ++ True ++ True ++ False ++ True ++ True ++ radiobutton4 ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ Backward ++ True ++ True ++ False ++ True ++ True ++ radiobutton4 ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ 1 ++ 2 ++ 5 ++ 6 ++ ++ ++ ++ ++ ++ S_ubtitles ++ True ++ True ++ False ++ True ++ True ++ ++ ++ 1 ++ 2 ++ 6 ++ 7 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ True ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ Browse... ++ True ++ True ++ True ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ button4 ++ button5 ++ button6 ++ ++ ++ +--- zapping.orig/glade/Makefile.am ++++ zapping/glade/Makefile.am +@@ -1,4 +1,4 @@ + ## Process this file with automake to produce Makefile.in + +-EXTRA_DIST = zapping.glade2 +-pkgdata_DATA = zapping.glade2 ++EXTRA_DIST = zapping.ui ++pkgdata_DATA = zapping.ui +--- zapping.orig/glade/zapping.glade2 ++++ /dev/null +@@ -1,3155 +0,0 @@ +- +- +- +- +- +- +- +- Zapping Preferences +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- +- +- +- True +- True +- True +- True +- GTK_POS_TOP +- False +- False +- +- +- +- True +- True +- True +- True +- GTK_POS_TOP +- False +- False +- +- +- +- 6 +- True +- False +- 12 +- +- +- +- True +- False +- 0 +- +- +- +- True +- True +- True +- True +- GTK_POS_TOP +- True +- False +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- 0 +- 0.5 +- GTK_SHADOW_ETCHED_IN +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- +- +- +- True +- Video device capabilities +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 3 +- 3 +- +- +- label_item +- +- +- +- +- 0 +- True +- True +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- 5 +- 2 +- False +- 3 +- 0 +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 1 +- 2 +- 0 +- 1 +- +- +- +- +- +- +- +- True +- zapping_v4l_device +- 10 +- Select the V4L device +- False +- False +- True +- GTK_FILE_CHOOSER_ACTION_OPEN +- +- +- +- True +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- 1 +- 2 +- 2 +- 3 +- +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 1 +- 2 +- 1 +- 2 +- +- +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 1 +- 2 +- 3 +- 4 +- +- +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 1 +- 2 +- 4 +- 5 +- +- +- +- +- +- +- +- True +- Device name: +- False +- False +- GTK_JUSTIFY_RIGHT +- False +- False +- 0 +- 0.5 +- 0 +- 3 +- +- +- 0 +- 1 +- 0 +- 1 +- expand|shrink|fill +- +- +- +- +- +- +- True +- Current controller: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 3 +- +- +- 0 +- 1 +- 1 +- 2 +- expand|shrink|fill +- +- +- +- +- +- +- True +- _Device file: +- True +- False +- GTK_JUSTIFY_RIGHT +- False +- False +- 0 +- 0.5 +- 0 +- 3 +- combo-entry1 +- +- +- 0 +- 1 +- 2 +- 3 +- expand|shrink|fill +- +- +- +- +- +- +- True +- Minimum capture size: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 3 +- +- +- 0 +- 1 +- 3 +- 4 +- expand|shrink|fill +- +- +- +- +- +- +- True +- Maximum capture size: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 3 +- +- +- 0 +- 1 +- 4 +- 5 +- expand|shrink|fill +- +- +- +- +- +- 0 +- True +- True +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Video +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 3 +- True +- False +- 0 +- +- +- +- 3 +- True +- True +- _No audio recording +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- _Gnome sound daemon (ESD) +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- devices-audio-none +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- _KDE sound daemon (ARTS) +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- devices-audio-none +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- Kernel _device +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- devices-audio-none +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 0 +- 0 +- 1 +- 1 +- 0 +- 0 +- 12 +- 0 +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- 6 +- True +- False +- 0 +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- _Control volume with soundcard mixer +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 0 +- 0 +- 1 +- 1 +- 0 +- 0 +- 12 +- 0 +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- False +- False +- +- +- +- +- +- True +- Audio +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 3 +- True +- False +- 0 +- +- +- +- 3 +- True +- True +- _No VBI services +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- DVB _PES File +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- devices-vbi-none +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 0 +- 0 +- 1 +- 1 +- 0 +- 0 +- 12 +- 0 +- +- +- +- True +- devices-vbi-pes-fileentry +- 10 +- DVB PES File +- False +- False +- True +- GTK_FILE_CHOOSER_ACTION_OPEN +- +- +- +- True +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- Kernel _device +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- devices-vbi-none +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 0 +- 0 +- 1 +- 1 +- 0 +- 0 +- 12 +- 0 +- +- +- +- True +- devices-vbi-kernel-fileentry +- 10 +- Kernel VBI device +- False +- False +- True +- GTK_FILE_CHOOSER_ACTION_OPEN +- +- +- +- True +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 0 +- 0 +- 1 +- 1 +- 0 +- 0 +- 12 +- 0 +- +- +- +- True +- True +- _Use VBI Proxy if available +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- False +- True +- +- +- +- +- +- True +- VBI +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Devices +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- True +- True +- True +- True +- GTK_POS_TOP +- False +- False +- +- +- +- 6 +- True +- False +- 0 +- +- +- +- 3 +- True +- True +- Show _tooltips +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- Disable _screensaver +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- 4 +- 2 +- False +- 3 +- 6 +- +- +- +- True +- _Enter channels by: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 3 +- 0 +- channel_number_translation +- +- +- 0 +- 1 +- 2 +- 3 +- fill +- +- +- +- +- +- +- True +- Title _bar contents: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 3 +- 0 +- combo-entry5 +- +- +- 0 +- 1 +- 3 +- 4 +- fill +- +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- +- +- +- True +- Channel list number +- True +- +- +- +- +- +- True +- RF channel number +- True +- +- +- +- +- +- +- 1 +- 2 +- 2 +- 3 +- fill +- +- +- +- +- +- +- True +- title_format +- 10 +- +- +- +- True +- A format string describing the main window title when changing channels: $(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted by the respective values. +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- 1 +- 2 +- 3 +- 4 +- +- +- +- +- +- +- 3 +- True +- True +- Save _control values per channel +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- 2 +- 0 +- 1 +- fill +- +- +- +- +- +- +- True +- S_how toolbar as: +- True +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0 +- 0.5 +- 3 +- 0 +- toolbar_style +- +- +- 0 +- 1 +- 1 +- 2 +- fill +- +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- +- +- +- True +- Channel list number +- True +- +- +- +- +- +- True +- RF channel number +- True +- +- +- +- +- +- +- 1 +- 2 +- 1 +- 2 +- fill +- +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Window +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 6 +- True +- 5 +- 2 +- False +- 3 +- 12 +- +- +- +- True +- _Fullscreen video resolution: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- optionmenu2 +- +- +- 0 +- 1 +- 0 +- 1 +- fill +- +- +- +- +- +- +- True +- _Capture size under XVideo: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- optionmenu20 +- +- +- 0 +- 1 +- 1 +- 2 +- fill +- +- +- +- +- +- +- True +- Favorite _picture sizes: +- True +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0 +- 0 +- 0 +- 0 +- +- +- 0 +- 1 +- 3 +- 4 +- 6 +- fill +- +- +- +- +- +- True +- True +- -1 +- +- +- +- True +- +- +- +- +- 1 +- 2 +- 0 +- 1 +- expand|shrink|fill +- +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- +- +- +- True +- Biggest noninterlaced (autodetect) +- True +- +- +- +- +- +- True +- 320x240 +- True +- +- +- +- +- +- True +- Interlaced (window size) +- True +- +- +- +- +- +- +- 1 +- 2 +- 1 +- 2 +- expand|shrink|fill +- +- +- +- +- +- +- True +- False +- 3 +- +- +- +- True +- True +- GTK_POLICY_AUTOMATIC +- GTK_POLICY_AUTOMATIC +- GTK_SHADOW_NONE +- GTK_CORNER_TOP_LEFT +- +- +- +- True +- True +- True +- False +- False +- True +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- True +- gtk-add +- True +- GTK_RELIEF_NORMAL +- True +- +- +- 0 +- False +- True +- +- +- +- +- +- True +- True +- gtk-remove +- True +- GTK_RELIEF_NORMAL +- True +- +- +- 0 +- False +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- 1 +- 2 +- 3 +- 4 +- expand|shrink|fill +- expand|shrink|fill +- +- +- +- +- +- True +- True +- _Resize using fixed increments +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- 2 +- 4 +- 5 +- fill +- +- +- +- +- +- +- True +- Chroma _key: +- True +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- colorbutton1 +- +- +- 0 +- 1 +- 2 +- 3 +- fill +- +- +- +- +- +- +- True +- True +- False +- True +- +- +- 1 +- 2 +- 2 +- 3 +- fill +- +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Video +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 6 +- True +- False +- 3 +- +- +- +- 3 +- True +- True +- _Start Zapping muted +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- 3 +- True +- True +- _Mute on exit +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- +- +- +- +- +- 3 +- True +- True +- Mute while ch_anging channels +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Audio +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 6 +- True +- 7 +- 2 +- False +- 3 +- 12 +- +- +- +- True +- _Remove after: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- +- +- 0 +- 1 +- 2 +- 3 +- fill +- +- +- +- +- +- +- True +- F_ont: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- general-osd-font-selector +- +- +- 0 +- 1 +- 4 +- 5 +- fill +- +- +- +- +- +- +- True +- _Foreground color: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- general-osd-foreground-selector +- +- +- 0 +- 1 +- 5 +- 6 +- fill +- +- +- +- +- +- +- True +- _Background color: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- general-osd-background-selector +- +- +- 0 +- 1 +- 6 +- 7 +- fill +- +- +- +- +- +- +- True +- False +- 6 +- +- +- +- True +- True +- 1 +- 1 +- True +- GTK_UPDATE_IF_VALID +- False +- False +- 0 0 100 0.1 10 10 +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- seconds +- False +- False +- GTK_JUSTIFY_LEFT +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- 1 +- 2 +- 2 +- 3 +- fill +- fill +- +- +- +- +- +- True +- True +- 0 +- +- +- +- True +- +- +- +- True +- On Screen Display (OSD) +- True +- +- +- +- +- +- True +- Status Bar +- True +- +- +- +- +- +- True +- Console +- True +- +- +- +- +- +- True +- No Display +- True +- +- +- +- +- +- +- 1 +- 2 +- 0 +- 1 +- expand|shrink|fill +- +- +- +- +- +- +- True +- True +- Select OSD font +- GNOME_FONT_PICKER_MODE_FONT_INFO +- True +- False +- 14 +- True +- +- +- 1 +- 2 +- 4 +- 5 +- expand|shrink|fill +- +- +- +- +- +- +- True +- True +- True +- False +- Choose a color +- True +- +- +- 1 +- 2 +- 5 +- 6 +- expand|shrink|fill +- +- +- +- +- +- +- True +- True +- True +- False +- Choose a color +- True +- +- +- 1 +- 2 +- 6 +- 7 +- expand|shrink|fill +- +- +- +- +- +- +- True +- _Display mode: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- optionmenu22 +- +- +- 0 +- 1 +- 0 +- 1 +- fill +- +- +- +- +- +- +- 3 +- True +- False +- 0 +- +- +- +- +- +- +- 0 +- 1 +- 1 +- 2 +- fill +- fill +- +- +- +- +- +- 3 +- True +- False +- 0 +- +- +- +- +- +- +- 0 +- 1 +- 3 +- 4 +- fill +- fill +- +- +- +- +- False +- True +- +- +- +- +- +- True +- OSD +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- 6 +- True +- 3 +- 2 +- False +- 6 +- 12 +- +- +- +- True +- _Command: +- True +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 1 +- 0.5 +- 0 +- 3 +- combo-entry6 +- +- +- 0 +- 1 +- 1 +- 2 +- fill +- +- +- +- +- +- +- True +- False +- 0 +- +- +- +- True +- True +- gtk-add +- True +- GTK_RELIEF_NORMAL +- True +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- True +- gtk-remove +- True +- GTK_RELIEF_NORMAL +- True +- +- +- 0 +- True +- True +- +- +- +- +- 0 +- 2 +- 2 +- 3 +- +- +- +- +- +- +- True +- True +- GTK_POLICY_AUTOMATIC +- GTK_POLICY_AUTOMATIC +- GTK_SHADOW_ETCHED_IN +- GTK_CORNER_TOP_LEFT +- +- +- +- True +- True +- True +- False +- False +- True +- +- +- +- +- 0 +- 2 +- 0 +- 1 +- fill +- +- +- +- +- +- True +- False +- True +- False +- True +- False +- +- +- +- True +- True +- True +- True +- 0 +- +- True +- * +- False +- +- +- +- +- +- True +- GTK_SELECTION_BROWSE +- +- +- +- +- 1 +- 2 +- 1 +- 2 +- expand|shrink|fill +- +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Keyboard +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- False +- True +- +- +- +- +- +- True +- General options +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- Plugin properties +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- True +- +- +- +- True +- False +- 0 +- +- +- +- True +- GTK_BUTTONBOX_END +- +- +- +- True +- Run the plugin +- True +- True +- gtk-execute +- True +- GTK_RELIEF_NORMAL +- True +- 0 +- +- +- +- +- +- True +- Stop this plugin +- True +- True +- gtk-stop +- True +- GTK_RELIEF_NORMAL +- True +- 0 +- +- +- +- +- +- True +- Click here when you are done +- True +- True +- gtk-ok +- True +- GTK_RELIEF_NORMAL +- True +- -5 +- +- +- +- +- 0 +- False +- True +- GTK_PACK_END +- +- +- +- +- +- True +- True +- 1 +- +- +- +- True +- True +- True +- False +- False +- True +- +- +- False +- False +- +- +- +- +- +- True +- True +- True +- True +- GTK_POS_TOP +- False +- False +- +- +- +- True +- False +- 9 +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 8 +- +- +- +- True +- Canonical name: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 1 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 8 +- +- +- +- True +- Author: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 1 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 8 +- +- +- +- True +- Plugin version: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 1 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 8 +- +- +- +- True +- Plugin priority: +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 1 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0 +- 0.5 +- 0 +- 0 +- +- +- 0 +- True +- True +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- label945 +- False +- False +- GTK_JUSTIFY_FILL +- True +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 20 +- False +- False +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Properties +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- +- True +- False +- 0 +- +- +- +- True +- Plugin location +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- label946 +- False +- False +- GTK_JUSTIFY_LEFT +- False +- True +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- False +- 0 +- +- +- +- True +- +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- GTK_POLICY_AUTOMATIC +- GTK_POLICY_AUTOMATIC +- GTK_SHADOW_IN +- GTK_CORNER_TOP_LEFT +- +- +- +- True +- True +- True +- False +- False +- True +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- label947 +- False +- False +- GTK_JUSTIFY_FILL +- True +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- 0 +- True +- True +- +- +- +- +- False +- True +- +- +- +- +- +- True +- Advanced +- False +- False +- GTK_JUSTIFY_CENTER +- False +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- tab +- +- +- +- +- False +- False +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- +- +- True +- Zapping error console +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- True +- +- +- +- True +- False +- 8 +- +- +- +- True +- GTK_BUTTONBOX_END +- +- +- +- True +- OK, let's go on +- True +- True +- True +- gtk-ok +- True +- GTK_RELIEF_NORMAL +- True +- 0 +- +- +- +- +- +- True +- Remove all this mess +- True +- True +- Clean console +- True +- GTK_RELIEF_NORMAL +- True +- 0 +- +- +- +- +- 0 +- False +- True +- GTK_PACK_END +- +- +- +- +- +- True +- GTK_POLICY_NEVER +- GTK_POLICY_AUTOMATIC +- GTK_SHADOW_IN +- GTK_CORNER_TOP_LEFT +- +- +- 0 +- True +- True +- +- +- +- +- +- +- +- Known key names +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- True +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- True +- +- +- +- True +- False +- 8 +- +- +- +- True +- GTK_BUTTONBOX_END +- +- +- +- True +- True +- True +- gtk-ok +- True +- GTK_RELIEF_NORMAL +- True +- -5 +- +- +- +- +- +- True +- True +- True +- gtk-cancel +- True +- GTK_RELIEF_NORMAL +- True +- -6 +- +- +- +- +- 0 +- False +- True +- GTK_PACK_END +- +- +- +- +- +- True +- False +- 5 +- +- +- +- True +- GTK_POLICY_AUTOMATIC +- GTK_POLICY_AUTOMATIC +- GTK_SHADOW_IN +- GTK_CORNER_TOP_LEFT +- +- +- +- True +- True +- True +- False +- False +- True +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- True +- True +- Enter key +- True +- GTK_RELIEF_NORMAL +- True +- False +- False +- +- +- 0 +- False +- False +- +- +- +- +- 0 +- True +- True +- +- +- +- +- +- +- +- 5 +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- Copyright (C) 2000-2005 the contributors +- +- TV viewer for the Gnome environment +- Michael H. Schimek +-Iñaki García Etxebarria +- Guus Bonnema +-Iñaki García Etxebarria +-Joseba García Etxebarria +-Hiroshi Hasebe +-Henrik Isacsson +-Arkadiusz Lipiec +-Christian Marillat +-Pavel Mlcoch +-Morten Brix Pedersen +-Paweł Sakowski +-Michael H. Schimek +-Reinout van Schouwen +-Ime Smits +-Pino Toscano +- +- +- +- 4 +- True +- Video Standard +- GTK_WINDOW_TOPLEVEL +- GTK_WIN_POS_NONE +- False +- True +- False +- True +- False +- False +- GDK_WINDOW_TYPE_HINT_NORMAL +- GDK_GRAVITY_NORTH_WEST +- True +- +- +- +- True +- False +- 0 +- +- +- +- True +- GTK_BUTTONBOX_END +- +- +- +- True +- True +- True +- gtk-cancel +- True +- GTK_RELIEF_NORMAL +- True +- -6 +- +- +- +- +- +- True +- True +- True +- gtk-ok +- True +- GTK_RELIEF_NORMAL +- True +- -5 +- +- +- +- +- 0 +- False +- True +- GTK_PACK_END +- +- +- +- +- +- 3 +- True +- False +- 6 +- +- +- +- True +- The video capture device does not report the correct video standard, please select manually: +- False +- False +- GTK_JUSTIFY_LEFT +- True +- False +- 0.5 +- 0.5 +- 0 +- 0 +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- 0 +- +- +- +- +- +- +- True +- NTSC +- True +- +- +- +- +- +- +- True +- PAL +- True +- +- +- +- +- +- +- True +- SECAM +- True +- +- +- +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- True +- True +- Remember this video standard +- True +- GTK_RELIEF_NORMAL +- True +- True +- False +- True +- +- +- 0 +- False +- False +- +- +- +- +- 0 +- False +- False +- +- +- +- +- +- +- +--- /dev/null ++++ zapping/glade/zapping.ui +@@ -0,0 +1,2209 @@ ++ ++ ++ ++ ++ ++ True ++ False ++ 5 ++ dialog ++ Zapping ++ Copyright (C) 2000-2005 the contributors ++ TV viewer for the Gnome environment ++ Michael H. Schimek ++Iñaki García Etxebarria ++ Guus Bonnema ++Iñaki García Etxebarria ++Joseba García Etxebarria ++Hiroshi Hasebe ++Henrik Isacsson ++Arkadiusz Lipiec ++Christian Marillat ++Pavel Mlcoch ++Morten Brix Pedersen ++Paweł Sakowski ++Michael H. Schimek ++Reinout van Schouwen ++Ime Smits ++Pino Toscano ++ image-missing ++ gpl-2-0 ++ ++ ++ ++ ++ ++ True ++ False ++ 2 ++ ++ ++ True ++ False ++ end ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 100 ++ 0.10000000000000001 ++ 10 ++ ++ ++ False ++ ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ ++ ++ True ++ False ++ 6 ++ 12 ++ ++ ++ True ++ False ++ ++ ++ True ++ True ++ True ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ ++ ++ True ++ False ++ ++ ++ ++ ++ True ++ False ++ 3 ++ 3 ++ Video device capabilities ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 5 ++ 2 ++ 3 ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ center ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ center ++ ++ ++ 1 ++ 2 ++ 3 ++ 4 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ center ++ ++ ++ 1 ++ 2 ++ 4 ++ 5 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ Device name: ++ right ++ 0 ++ ++ ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ Current controller: ++ center ++ 0 ++ ++ ++ 1 ++ 2 ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ _Device file: ++ True ++ right ++ 0 ++ ++ ++ 2 ++ 3 ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ Minimum capture size: ++ center ++ 0 ++ ++ ++ 3 ++ 4 ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ Maximum capture size: ++ center ++ 0 ++ ++ ++ 4 ++ 5 ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ Select the V4L device ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Video ++ ++ ++ False ++ ++ ++ ++ ++ True ++ False ++ 3 ++ ++ ++ _No audio recording ++ True ++ True ++ False ++ 3 ++ True ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ _Gnome sound daemon (ESD) ++ True ++ True ++ False ++ 3 ++ True ++ True ++ devices-audio-none ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ _KDE sound daemon (ARTS) ++ True ++ True ++ False ++ 3 ++ True ++ True ++ devices-audio-none ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ Kernel _device ++ True ++ True ++ False ++ 3 ++ True ++ True ++ devices-audio-none ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ 12 ++ ++ ++ ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ ++ ++ ++ False ++ False ++ 5 ++ ++ ++ ++ ++ _Control volume with soundcard mixer ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 6 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ 12 ++ ++ ++ ++ ++ ++ False ++ False ++ 7 ++ ++ ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ True ++ False ++ Audio ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ True ++ False ++ 3 ++ ++ ++ _No VBI services ++ True ++ True ++ False ++ 3 ++ True ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ DVB _PES File ++ True ++ True ++ False ++ 3 ++ True ++ True ++ devices-vbi-none ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ 12 ++ ++ ++ True ++ False ++ DVB PES File ++ ++ ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ Kernel _device ++ True ++ True ++ False ++ 3 ++ True ++ True ++ devices-vbi-none ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ 12 ++ ++ ++ True ++ False ++ Kernel VBI device ++ ++ ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ True ++ False ++ 0 ++ 0 ++ 12 ++ ++ ++ _Use VBI Proxy if available ++ True ++ True ++ False ++ True ++ True ++ ++ ++ ++ ++ False ++ False ++ 5 ++ ++ ++ ++ ++ 2 ++ ++ ++ ++ ++ True ++ False ++ VBI ++ ++ ++ 2 ++ False ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Devices ++ center ++ ++ ++ False ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ False ++ 6 ++ ++ ++ Show _tooltips ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ Disable _screensaver ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 4 ++ 2 ++ 6 ++ 3 ++ ++ ++ True ++ False ++ 3 ++ _Enter channels by: ++ True ++ center ++ 0 ++ ++ ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ Title _bar contents: ++ True ++ center ++ 0 ++ ++ ++ 3 ++ 4 ++ GTK_FILL ++ ++ ++ ++ ++ ++ Save _control values per channel ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ S_how toolbar as: ++ True ++ 0 ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ ++ ++ ++ ++ True ++ True ++ A format string describing the main window title when changing channels: $(alias), $(index), $(id), $(freq), $(standard) and $(input) are substituted by the respective values. ++ ++ False ++ False ++ ++ ++ 1 ++ 2 ++ 3 ++ 4 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Window ++ center ++ ++ ++ False ++ ++ ++ ++ ++ True ++ False ++ 6 ++ 5 ++ 2 ++ 12 ++ 3 ++ ++ ++ True ++ False ++ _Fullscreen video resolution: ++ True ++ center ++ 0 ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ _Capture size under XVideo: ++ True ++ center ++ 0 ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ Favorite _picture sizes: ++ True ++ 0 ++ 0 ++ ++ ++ 3 ++ 4 ++ GTK_FILL ++ 6 ++ ++ ++ ++ ++ True ++ False ++ 3 ++ ++ ++ True ++ True ++ ++ ++ True ++ True ++ ++ ++ ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ True ++ ++ ++ gtk-add ++ True ++ True ++ False ++ True ++ ++ ++ False ++ True ++ 0 ++ ++ ++ ++ ++ gtk-remove ++ True ++ True ++ False ++ True ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ 1 ++ 2 ++ 3 ++ 4 ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ GTK_EXPAND | GTK_SHRINK | GTK_FILL ++ ++ ++ ++ ++ _Resize using fixed increments ++ True ++ True ++ False ++ True ++ True ++ ++ ++ 2 ++ 4 ++ 5 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ Chroma _key: ++ True ++ colorbutton1 ++ 0 ++ ++ ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ True ++ False ++ #000000000000 ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ 1 ++ ++ ++ ++ ++ True ++ False ++ Video ++ center ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ True ++ False ++ 6 ++ 3 ++ ++ ++ _Start Zapping muted ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ _Mute on exit ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ ++ ++ ++ Mute while ch_anging channels ++ True ++ True ++ False ++ 3 ++ True ++ True ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ 2 ++ ++ ++ ++ ++ True ++ False ++ Audio ++ center ++ ++ ++ 2 ++ False ++ ++ ++ ++ ++ True ++ False ++ 6 ++ 7 ++ 2 ++ 12 ++ 3 ++ ++ ++ ++ ++ ++ ++ ++ ++ True ++ False ++ _Remove after: ++ True ++ center ++ 0 ++ ++ ++ 2 ++ 3 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ F_ont: ++ True ++ center ++ 0 ++ ++ ++ 4 ++ 5 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ _Foreground color: ++ True ++ center ++ 0 ++ ++ ++ 5 ++ 6 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ _Background color: ++ True ++ center ++ 0 ++ ++ ++ 6 ++ 7 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 6 ++ ++ ++ True ++ True ++ ++ False ++ False ++ adjustment1 ++ 1 ++ 1 ++ True ++ if-valid ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ seconds ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ 1 ++ 2 ++ 2 ++ 3 ++ GTK_FILL ++ GTK_FILL ++ ++ ++ ++ ++ True ++ False ++ _Display mode: ++ True ++ center ++ 0 ++ ++ ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ 3 ++ ++ ++ ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ GTK_FILL ++ ++ ++ ++ ++ True ++ False ++ 3 ++ ++ ++ ++ ++ ++ 3 ++ 4 ++ GTK_FILL ++ GTK_FILL ++ ++ ++ ++ ++ True ++ False ++ ++ ++ 1 ++ 2 ++ ++ ++ ++ ++ True ++ True ++ True ++ Sans 12 ++ Select OSD font ++ ++ ++ 1 ++ 2 ++ 4 ++ 5 ++ ++ ++ ++ ++ True ++ True ++ True ++ Choose a color ++ #000000000000 ++ ++ ++ 1 ++ 2 ++ 5 ++ 6 ++ ++ ++ ++ ++ True ++ True ++ True ++ Choose a color ++ #000000000000 ++ ++ ++ 1 ++ 2 ++ 6 ++ 7 ++ ++ ++ ++ ++ 3 ++ ++ ++ ++ ++ True ++ False ++ OSD ++ center ++ ++ ++ 3 ++ False ++ ++ ++ ++ ++ True ++ False ++ 6 ++ 3 ++ 2 ++ 12 ++ 6 ++ ++ ++ True ++ False ++ 3 ++ _Command: ++ True ++ center ++ 1 ++ ++ ++ 1 ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ gtk-add ++ True ++ True ++ False ++ True ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ gtk-remove ++ True ++ True ++ False ++ True ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ 2 ++ 2 ++ 3 ++ ++ ++ ++ ++ ++ True ++ True ++ etched-in ++ ++ ++ True ++ True ++ ++ ++ ++ ++ ++ ++ ++ 2 ++ GTK_FILL ++ ++ ++ ++ ++ True ++ False ++ True ++ ++ ++ False ++ ++ ++ ++ ++ 1 ++ 2 ++ 1 ++ 2 ++ ++ ++ ++ ++ 4 ++ ++ ++ ++ ++ True ++ False ++ Keyboard ++ center ++ ++ ++ 4 ++ False ++ ++ ++ ++ ++ 1 ++ ++ ++ ++ ++ True ++ False ++ General options ++ center ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ ++ ++ False ++ Known key names ++ True ++ normal ++ ++ ++ ++ ++ ++ True ++ False ++ 8 ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-ok ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 5 ++ ++ ++ True ++ False ++ in ++ ++ ++ True ++ True ++ ++ ++ ++ ++ ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ Enter key ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ button29 ++ button31 ++ ++ ++ ++ True ++ False ++ Zapping error console ++ normal ++ ++ ++ ++ ++ ++ True ++ False ++ 8 ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-ok ++ True ++ True ++ True ++ True ++ False ++ OK, let's go on ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ Clean console ++ True ++ True ++ True ++ False ++ Remove all this mess ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ False ++ never ++ in ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ button24 ++ button26 ++ ++ ++ ++ True ++ False ++ Plugin properties ++ normal ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-execute ++ True ++ True ++ True ++ False ++ Run the plugin ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-stop ++ True ++ True ++ True ++ False ++ Stop this plugin ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ gtk-ok ++ True ++ True ++ True ++ False ++ Click here when you are done ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ True ++ True ++ ++ ++ ++ ++ ++ False ++ False ++ ++ ++ ++ ++ True ++ True ++ ++ ++ True ++ False ++ 9 ++ ++ ++ True ++ False ++ center ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ center ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ False ++ 8 ++ True ++ ++ ++ True ++ False ++ Canonical name: ++ center ++ 1 ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ center ++ 0 ++ ++ ++ False ++ True ++ 1 ++ ++ ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ True ++ False ++ 8 ++ True ++ ++ ++ True ++ False ++ Author: ++ center ++ 1 ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ center ++ 0 ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ False ++ 3 ++ ++ ++ ++ ++ True ++ False ++ 8 ++ True ++ ++ ++ True ++ False ++ Plugin version: ++ center ++ 1 ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ center ++ 0 ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ False ++ 4 ++ ++ ++ ++ ++ True ++ False ++ 8 ++ True ++ ++ ++ True ++ False ++ Plugin priority: ++ center ++ 1 ++ ++ ++ True ++ True ++ 0 ++ ++ ++ ++ ++ True ++ False ++ center ++ 0 ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ False ++ False ++ 5 ++ ++ ++ ++ ++ True ++ False ++ label945 ++ fill ++ True ++ ++ ++ False ++ False ++ 20 ++ 6 ++ ++ ++ ++ ++ ++ ++ True ++ False ++ Properties ++ center ++ ++ ++ False ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ Plugin location ++ center ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ True ++ label946 ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ center ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ in ++ ++ ++ True ++ True ++ ++ ++ ++ ++ ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ True ++ False ++ label947 ++ fill ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ 1 ++ ++ ++ ++ ++ True ++ False ++ Advanced ++ center ++ ++ ++ 1 ++ False ++ ++ ++ ++ ++ False ++ False ++ ++ ++ ++ ++ True ++ True ++ 2 ++ ++ ++ ++ ++ ++ plugin_start ++ plugin_stop ++ plugin_properties_done ++ ++ ++ ++ True ++ False ++ 4 ++ Video Standard ++ normal ++ ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ False ++ end ++ ++ ++ gtk-cancel ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ gtk-ok ++ True ++ True ++ True ++ False ++ True ++ ++ ++ False ++ False ++ 1 ++ ++ ++ ++ ++ False ++ True ++ end ++ 0 ++ ++ ++ ++ ++ True ++ False ++ 3 ++ 6 ++ ++ ++ True ++ False ++ The video capture device does not report the correct video standard, please select manually: ++ True ++ ++ ++ False ++ False ++ 0 ++ ++ ++ ++ ++ True ++ False ++ ++ ++ True ++ True ++ 1 ++ ++ ++ ++ ++ Remember this video standard ++ True ++ True ++ False ++ True ++ True ++ True ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ False ++ False ++ 2 ++ ++ ++ ++ ++ ++ cancelbutton1 ++ okbutton1 ++ ++ ++ +--- zapping.orig/po/POTFILES.in ++++ zapping/po/POTFILES.in +@@ -1,6 +1,6 @@ + # List of source files containing translatable strings. + +-glade/zapping.glade2 ++glade/zapping.ui + libvbi/exp-gfx.c + libvbi/exp-html.c + libvbi/export.c +@@ -31,7 +31,7 @@ + plugins/mpeg/mpeg_properties.glade2 + plugins/mpeg/options.c + plugins/screenshot/screenshot.c +-plugins/screenshot/screenshot.glade2 ++plugins/screenshot/screenshot.ui + plugins/subtitle/main.c + plugins/subtitle/preferences.c + plugins/subtitle/view.c diff -Nru zapping-0.10~cvs6/debian/patches/24-GConf-to-GSettings.patch zapping-0.10~cvs6/debian/patches/24-GConf-to-GSettings.patch --- zapping-0.10~cvs6/debian/patches/24-GConf-to-GSettings.patch 1970-01-01 00:00:00.000000000 +0000 +++ zapping-0.10~cvs6/debian/patches/24-GConf-to-GSettings.patch 2018-09-25 07:39:01.000000000 +0000 @@ -0,0 +1,5119 @@ +Description: Port to GSettings. + Not actually tested as I don't have a TV card. +Bug-Debian: https://bugs.debian.org/886188 +Author: Yavor Doganov +Forwarded: no +Last-Upodate: 2018-09-24 +--- + +--- zapping.orig/configure.in ++++ zapping/configure.in +@@ -625,12 +625,11 @@ + dnl --------------------------------------------------------------------------- + + AX_COMPILER_FLAGS +-AM_GCONF_SOURCE_2 ++GLIB_GSETTINGS + + PKG_CHECK_MODULES(PACKAGE, [ + gtk+-3.0 >= 3.22 +- gmodule-2.0 +- gconf-2.0]) ++ gmodule-2.0]) + AC_SUBST(PACKAGE_CFLAGS) + AC_SUBST(PACKAGE_LIBS) + +--- zapping.orig/Makefile.am ++++ zapping/Makefile.am +@@ -33,27 +33,18 @@ + README.plugins \ + THANKS \ + zapping.desktop.in \ +- zapping.schemas.in ++ $(gsettings_SCHEMAS) + + desktopdir = $(datadir)/applications + desktop_DATA = zapping.desktop + @INTLTOOL_DESKTOP_RULE@ + +-schemadir = @GCONF_SCHEMA_FILE_DIR@ +-schema_DATA = zapping.schemas +-@INTLTOOL_SCHEMAS_RULE@ ++gsettings_SCHEMAS = net.sf.Zapping.gschema.xml + +-if GCONF_SCHEMAS_INSTALL +-install-data-local: +- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +- gconftool-2 --makefile-install-rule $(top_builddir)/zapping.schemas +-uninstall-local: +- GCONF_CONFIG_SOURCE=$(GCONF_SCHEMA_CONFIG_SOURCE) \ +- gconftool-2 --makefile-uninstall-rule $(top_builddir)/zapping.schemas +-else +-install-data-local: +-uninstall-local: +-endif ++@GSETTINGS_RULES@ ++ ++data_convertdir = $(datadir)/GConf/gsettings ++dist_data_convert_DATA = zapping.convert + + DISTCLEANFILES = \ + intltool-extract \ +--- zapping.orig/src/globals.h ++++ zapping/src/globals.h +@@ -5,7 +5,6 @@ + # include "config.h" + #endif + +-#include + #include "tveng.h" + #include "frequencies.h" + #include "x11stuff.h" +@@ -25,7 +24,8 @@ + extern GList *plugin_list; + /* Whether the device can be attached as XV */ + extern gboolean xv_present; +-extern GConfClient * gconf_client; ++GSettings * gsettings; ++GSettings * window_settings; + + /* XVideo should be disabled */ + extern gint disable_xv; +--- zapping.orig/src/zgconf.h ++++ zapping/src/zgconf.h +@@ -24,71 +24,76 @@ + #define Z_GCONF_H + + #include +-#include + + #include "zmisc.h" /* _unused_ */ + + extern const gchar * +-z_gconf_value_type_name (GConfValueType type); ++z_settings_value_type_name (const GVariantType * type); + extern gboolean +-z_gconf_get (gpointer result, ++z_settings_get (gpointer result, ++ GSettings * settings, + const gchar * key, +- GConfValueType type); ++ const GVariantType * type); + extern gboolean +-z_gconf_auto_update (gpointer var, ++z_settings_auto_update (gpointer var, ++ GSettings * settings, + const gchar * key, +- GConfValueType type); ++ const GVariantType * type); + +-#define Z_GCONF_SET_GET_NOTIFY(T1, T2, type) \ ++#define Z_SETTINGS_SET_GET_NOTIFY(T1, T2, type) \ + extern gboolean \ +-z_gconf_set_##T1 (const gchar *key, T2 value); \ ++ z_settings_set_##T1 (GSettings *settings, const gchar *key, T2 value); \ + static __inline__ gboolean \ +-z_gconf_get_##T1 (T2 *result, const gchar *key) \ +-{ return z_gconf_get (result, key, GCONF_VALUE_##type); } \ ++ z_settings_get_##T1 (T2 *result, GSettings *settings, const gchar *key) \ ++{ return z_settings_get (result, settings, key, G_VARIANT_TYPE_##type); } \ + static __inline__ gboolean \ +-z_gconf_auto_update_##T1 (T2 *var, const gchar *key) \ +-{ return z_gconf_auto_update (var, key, GCONF_VALUE_##type); } ++ z_settings_auto_update_##T1 (T2 *var, GSettings *settings, const gchar *key) \ ++{ return z_settings_auto_update (var, settings, key, G_VARIANT_TYPE_##type); } + +-Z_GCONF_SET_GET_NOTIFY (bool, gboolean, BOOL) +-Z_GCONF_SET_GET_NOTIFY (int, gint, INT) +-Z_GCONF_SET_GET_NOTIFY (float, gdouble, FLOAT) ++Z_SETTINGS_SET_GET_NOTIFY (boolean, gboolean, BOOLEAN) ++Z_SETTINGS_SET_GET_NOTIFY (int, gint, INT32) ++Z_SETTINGS_SET_GET_NOTIFY (double, gdouble, DOUBLE) + + extern gboolean +-z_gconf_set_string (const gchar * key, ++z_settings_set_string (GSettings * settings, ++ const gchar * key, + const gchar * string); + static __inline__ gboolean +-z_gconf_get_string (gchar ** result, ++z_settings_get_string (gchar ** result, ++ GSettings * settings, + const gchar * key) + { +- return z_gconf_get (result, key, GCONF_VALUE_STRING); ++ return z_settings_get (result, settings, key, G_VARIANT_TYPE_STRING); + } + + extern gboolean + z_gconf_get_string_enum (gint * enum_value, + const gchar * gconf_key, +- const GConfEnumStringPair *lookup_table); +-extern void +-z_gconf_notify_remove (guint cnxn_id); +-extern gboolean +-z_gconf_notify_add (const gchar * key, +- GConfClientNotifyFunc func, ++ const gchar *lookup_table); ++extern gulong ++z_settings_signal_connect (GSettings * settings, ++ const gchar * key, ++ GCallback func, + gpointer user_data); + extern void +-z_toggle_action_connect_gconf_key ++z_toggle_action_connect_key + (GtkToggleAction * toggle_action, ++ GSettings * settings, + const gchar * key); + extern GtkWidget * +-z_gconf_check_button_new (const gchar * label, ++z_settings_check_button_new (const gchar * label, ++ GSettings * settings, + const gchar * key, + gboolean * var, + gboolean active); + extern GtkWidget * +-z_gconf_int_spinslider_new (gint def_value, ++z_settings_int_spinslider_new (gint def_value, + gint min_value, + gint max_value, + gint step_incr, + gint page_incr, + gint page_size, ++ GSettings * settings, + const gchar * key, + gint * var); + GtkWidget * +@@ -99,20 +104,12 @@ + gdouble page_incr, + gdouble page_size, + gint digits, ++ GSettings * settings, + const gchar * key, + gdouble * var); + extern GtkWidget * +-z_gconf_combo_box_new (const gchar ** menu, +- const gchar * key, +- const GConfEnumStringPair *lookup_table); +-extern gboolean +-string_to_color (GdkColor * color, +- const gchar * string); +-extern gboolean +-z_gconf_set_color (const gchar * key, +- const GdkColor * color); +-extern gboolean +-z_gconf_get_color (GdkColor * color, +- const gchar * string); ++z_settings_combo_box_new (const gchar ** menu, ++ GSettings * settings, ++ const gchar * key); + + #endif /* Z_GCONF_H */ +--- zapping.orig/plugins/deinterlace/main.c ++++ zapping/plugins/deinterlace/main.c +@@ -35,7 +35,7 @@ + #include "preferences.h" + #include "main.h" + +-#define GCONF_DIR "/apps/zapping/plugins/deinterlace" ++#define SCHEMA "net.sf.Zapping.plugins.deinterlace" + + #ifndef DI_MAIN_HEIGHT_DIV + /* For tests. My CPU is too slow to run +@@ -272,7 +272,7 @@ + fprintf (stderr, "Start deinterlace thread\n"); + + s = NULL; +- z_gconf_get_string (&s, GCONF_DIR "/method"); ++ z_settings_get_string (&s, plugin_settings, "method"); + + if (!s) + return FALSE; +@@ -288,7 +288,7 @@ + assert (NULL != method->pfnAlgorithm); + + s = NULL; +- z_gconf_get_string (&s, GCONF_DIR "/resolution"); ++ z_settings_get_string (&s, plugin_settings, "resolution"); + + resolution = 4; + +@@ -296,8 +296,7 @@ + { + gint i; + +- /* Error ignored. */ +- gconf_string_to_enum (resolution_enum, s, &i); ++ i = g_settings_get_enum (plugin_settings, "resolution"); + resolution = SATURATE (i, 1, 4); + } + +@@ -417,9 +416,8 @@ + } + + static void +-notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry _unused_, ++on_prefs_changed (GSettings * settings, ++ gchar * key, + gpointer user_data _unused_) + { + if (0) +@@ -437,6 +435,9 @@ + static void + plugin_close (void) + { ++ g_object_unref (plugin_settings); ++ g_object_unref (deinterlace_settings); ++ g_object_unref (di_settings); + } + + static void +@@ -446,6 +447,7 @@ + .label = N_("Deinterlace"), + .icon_name = "interlace48.png", + .create = deinterlace_prefs_new, ++ .apply = (void (*)(GtkWidget *)) deinterlace_prefs_apply, + .cancel = (void (*)(GtkWidget *)) deinterlace_prefs_cancel, + .help_link_id = "zapping-settings-deinterlace", + }; +@@ -498,12 +500,19 @@ + + D(); + +- z_gconf_notify_add (GCONF_DIR "/method", notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/resolution", notify, NULL); +- +- z_gconf_auto_update_bool (&reverse_fields, GCONF_DIR "/reverse_fields"); +- z_gconf_auto_update_bool (&GreedyTestMode, +- GCONF_DIR "/options/Deinterlace/GreedyTestMode"); ++ plugin_settings = g_settings_new (SCHEMA); ++ deinterlace_settings = g_settings_new (SCHEMA ".options.Deinterlace"); ++ di_settings = g_settings_new (SCHEMA ".options.DI-OldGame"); ++ ++ z_settings_signal_connect (plugin_settings, "method", ++ G_CALLBACK (on_prefs_changed), NULL); ++ z_settings_signal_connect (plugin_settings, "resolution", ++ G_CALLBACK (on_prefs_changed), NULL); ++ ++ z_settings_auto_update_boolean (&reverse_fields, plugin_settings, ++ "reverse-fields"); ++ z_settings_auto_update_boolean (&GreedyTestMode, deinterlace_settings, ++ "greedytestmode"); + + return TRUE; + } +--- zapping.orig/plugins/deinterlace/main.h ++++ zapping/plugins/deinterlace/main.h +@@ -26,6 +26,9 @@ + #include "windows.h" + #include "DS_Deinterlace.h" + ++GSettings * plugin_settings; ++GSettings * deinterlace_settings; ++GSettings * di_settings; + extern DEINTERLACE_METHOD * deinterlace_methods[30]; + + extern DEINTERLACE_METHOD * +--- zapping.orig/plugins/deinterlace/preferences.h ++++ zapping/plugins/deinterlace/preferences.h +@@ -24,7 +24,6 @@ + #define PREFERENCES_H + + #include +-#include + + G_BEGIN_DECLS + +@@ -48,7 +47,6 @@ + GtkTable table; + + GtkWidget * option_table; +- GConfChangeSet * change_set; + }; + + struct _DeinterlacePrefsClass +@@ -56,8 +54,8 @@ + GtkTableClass parent_class; + }; + +-extern GConfEnumStringPair resolution_enum []; +- ++extern void ++deinterlace_prefs_apply (DeinterlacePrefs * prefs); + extern void + deinterlace_prefs_cancel (DeinterlacePrefs * prefs); + extern GType +--- zapping.orig/src/zgconf.c ++++ zapping/src/zgconf.c +@@ -31,94 +31,50 @@ + #include "zgconf.h" + + const gchar * +-z_gconf_value_type_name (GConfValueType type) ++z_settings_value_type_name (const GVariantType * type) + { +- switch (type) +- { +- +-#undef CASE +-#define CASE(s) case GCONF_VALUE_##s : return #s +- +- CASE (INVALID); +- CASE (STRING); +- CASE (INT); +- CASE (FLOAT); +- CASE (BOOL); +- CASE (SCHEMA); +- CASE (LIST); +- CASE (PAIR); +- +- default: +- break; +- } +- +- return NULL; ++ return g_variant_type_peek_string (type); + } + + static gboolean +-z_gconf_value_get (gpointer result, +- GConfValue * value, ++z_settings_value_get (gpointer result, ++ GSettings * settings, + const gchar * key, +- GConfValueType type) ++ const GVariantType * type) + { +- if (type == value->type) +- { +- switch (type) +- { +- case GCONF_VALUE_STRING: +- *(const gchar **) result = gconf_value_get_string (value); +- break; +- +- case GCONF_VALUE_INT: +- *(gint *) result = gconf_value_get_int (value); +- break; +- +- case GCONF_VALUE_FLOAT: +- *(gdouble *) result = gconf_value_get_float (value); +- break; +- +- case GCONF_VALUE_BOOL: +- *(gboolean *) result = gconf_value_get_bool (value); +- break; +- +- default: +- g_assert_not_reached (); +- break; +- } ++ GVariant *value; ++ const GVariantType *actual; ++ gboolean success = FALSE; ++ ++ value = g_settings_get_value (settings, key); ++ actual = g_variant_get_type (value); ++ ++ if (g_variant_is_of_type (value, type)) ++ { ++ if (g_variant_type_equal (type, G_VARIANT_TYPE_STRING)) ++ *(const gchar **) result = g_settings_get_string (settings, key); ++ else if (g_variant_type_equal (type, G_VARIANT_TYPE_INT32)) ++ *(gint *) result = g_settings_get_int (settings, key); ++ else if (g_variant_type_equal (type, G_VARIANT_TYPE_DOUBLE)) ++ *(gdouble *) result = g_settings_get_double (settings, key); ++ else if (g_variant_type_equal (type, G_VARIANT_TYPE_BOOLEAN)) ++ *(gboolean *) result = g_settings_get_boolean (settings, key); ++ else ++ g_assert_not_reached (); + +- return TRUE; ++ success = TRUE; + } + else + { +- g_warning ("GConf key '%s' has wrong type %s, expected %s.\n", ++ g_warning ("GSettings key '%s' has wrong type '%s', expected '%s'.\n", + key ? key : "", +- z_gconf_value_type_name (value->type), +- z_gconf_value_type_name (type)); +- +- return FALSE; ++ z_settings_value_type_name (actual), ++ z_settings_value_type_name (type)); + } +-} +- +-static void +-z_gconf_handle_get_error (const gchar * key, +- GError ** error) +-{ +- static gboolean warned = FALSE; + +- if (*error) +- { +- g_warning ("GConf get '%s' error:\n%s\n", key, (*error)->message); +- g_error_free (*error); +- *error = NULL; +- } +- else if (!warned) +- { +- g_warning ("GConf key '%s' is unset and has no default. " +- "Zapping schemas incomplete or not installed?\n", +- key); ++ g_variant_unref (value); + +- warned = TRUE; +- } ++ return success; + } + + /* Like gconf_client_get(), but uses our default GConfClient and handles +@@ -131,71 +87,32 @@ + isn't really supposed to fail) set *result to some default before + calling. (Schemes should provide defaults but may fail too.) */ + gboolean +-z_gconf_get (gpointer result, ++z_settings_get (gpointer result, ++ GSettings * settings, + const gchar * key, +- GConfValueType type) ++ const GVariantType * type) + { +- GError *error = NULL; +- GConfValue *value; ++ GVariant *value; + +- if ((value = gconf_client_get (gconf_client, key, &error))) ++ if ((value = g_settings_get_value (settings, key))) + { + gboolean success; + +- g_assert (!error); ++ success = z_settings_value_get (result, settings, key, type); + +- success = z_gconf_value_get (result, value, key, type); +- +- if (GCONF_VALUE_STRING == type) ++ if (g_variant_type_equal (G_VARIANT_TYPE_STRING, type)) + { + gchar **string = result; + + *string = g_strdup (*string); + } + +- gconf_value_free (value); ++ g_variant_unref (value); + + return success; + } + else +- { +- z_gconf_handle_get_error (key, &error); +- return FALSE; +- } +-} +- +-/* Convenient contraction of z_gconf_get_string() +- and gconf_string_to_enum(). */ +-gboolean +-z_gconf_get_string_enum (gint * enum_value, +- const gchar * key, +- const GConfEnumStringPair *lookup_table) +-{ +- gchar *s; +- gboolean r; +- +- r = FALSE; +- +- if (z_gconf_get_string (&s, key)) +- { +- r = gconf_string_to_enum ((GConfEnumStringPair *) lookup_table, +- s, enum_value); +- g_free (s); +- } +- +- return r; +-} +- +-static void +-z_gconf_handle_set_error (const gchar * key, +- GError ** error) +-{ +- if (*error) +- { +- g_warning ("GConf set '%s' error:\n%s\n", key, (*error)->message); +- g_error_free (*error); +- *error = NULL; +- } ++ return FALSE; + } + + /* Like gconf_client_set_(), but uses our default GConfClient +@@ -203,89 +120,56 @@ + supposed to fail). Returns success. */ + #define Z_GCONF_SET(T1, T2) \ + gboolean \ +-z_gconf_set_##T1 (const gchar * key, \ ++z_settings_set_##T1 (GSettings * settings, \ ++ const gchar * key, \ + T2 value) \ + { \ +- GError *error = NULL; \ + gboolean success; \ + \ +- success = gconf_client_set_##T1 (gconf_client, key, value, &error); \ +- z_gconf_handle_set_error (key, &error); \ ++ success = g_settings_set_##T1 (settings, key, value); \ + \ + return success; \ + } + +-Z_GCONF_SET (bool, gboolean) ++Z_GCONF_SET (boolean, gboolean) + Z_GCONF_SET (int, gint) +-Z_GCONF_SET (float, gdouble) ++Z_GCONF_SET (double, gdouble) + Z_GCONF_SET (string, const gchar *) + +-void +-z_gconf_notify_remove (guint cnxn_id) +-{ +- gconf_client_notify_remove (gconf_client, cnxn_id); +-} +- +-/* Like gconf_client_notify_add(), but uses our default GConfClient +- and prints diagnostic messages on failure (the function is not really +- supposed to fail). On success it calls func once with the current +- value of key for initialization, and returns TRUE. */ +-gboolean +-z_gconf_notify_add (const gchar * key, +- GConfClientNotifyFunc func, ++/* Establishes a detailed connection and reads the key once so that ++ the signal is emitted on subsequent changes. ++ Returns the handler ID. */ ++gulong ++z_settings_signal_connect (GSettings * settings, ++ const gchar * key, ++ GCallback func, + gpointer user_data) + { +- GError *error = NULL; +- GConfEntry entry; +- guint cnxn_id; +- +- cnxn_id = gconf_client_notify_add (gconf_client, +- key, +- func, user_data, +- /* destroy */ NULL, +- &error); ++ GVariant *value; ++ gchar *buf; ++ gulong id; + +- if (error) +- { +- g_warning ("GConf notification '%s' error:\n%s\n", key, error->message); +- g_error_free (error); +- error = NULL; ++ buf = g_strdup_printf ("changed::%s", key); ++ id = g_signal_connect (settings, buf, func, user_data); ++ g_free (buf); ++ value = g_settings_get_value (settings, key); ++ g_variant_unref (value); + +- return FALSE; +- } +- +- /* Initial value. */ +- +- entry.key = (gchar *) key; +- +- if ((entry.value = gconf_client_get (gconf_client, key, &error))) +- { +- func (gconf_client, cnxn_id, &entry, user_data); +- gconf_value_free (entry.value); +- return TRUE; +- } +- else +- { +- z_gconf_handle_get_error (key, &error); +- gconf_client_notify_remove (gconf_client, cnxn_id); +- return FALSE; +- } ++ return id; + } + +-#define Z_GCONF_AUTO(T1, type) \ ++#define Z_SETTINGS_AUTO(T1, type) \ + static void \ +-auto_##T1 (GConfClient * client _unused_, \ +- guint cnxn_id _unused_, \ +- GConfEntry * entry, \ ++auto_##T1 (GSettings * settings, \ ++ gchar * key, \ + gpointer var) \ + { \ +- if (entry->value) \ +- z_gconf_value_get (var, entry->value, NULL, GCONF_VALUE_##type); \ ++ z_settings_value_get (var, settings, key, G_VARIANT_TYPE_##type); \ + } + +-Z_GCONF_AUTO (bool, BOOL) +-Z_GCONF_AUTO (int, INT) +-Z_GCONF_AUTO (float, FLOAT) ++Z_SETTINGS_AUTO (boolean, BOOLEAN) ++Z_SETTINGS_AUTO (int, INT32) ++Z_SETTINGS_AUTO (double, DOUBLE) + + /* This is a combination of z_gconf_get() and z_gconf_notify_add(). + The function stores the current value of the key in var, and updates +@@ -295,49 +179,42 @@ + You shouldn't call this directly but z_gconf_auto_update_bool, -int, + -float etc for proper type checking. */ + gboolean +-z_gconf_auto_update (gpointer var, ++z_settings_auto_update (gpointer var, ++ GSettings * settings, + const gchar * key, +- GConfValueType type) ++ const GVariantType * type) + { +- GConfClientNotifyFunc func; ++ GCallback func; + +- switch (type) +- { +- case GCONF_VALUE_BOOL: +- func = auto_bool; +- break; +- +- case GCONF_VALUE_INT: +- func = auto_int; +- break; +- +- case GCONF_VALUE_FLOAT: +- func = auto_float; +- break; +- +- default: +- g_assert_not_reached (); +- break; +- } ++ if (g_variant_type_equal (type, G_VARIANT_TYPE_BOOLEAN)) ++ func = G_CALLBACK (auto_boolean); ++ else if (g_variant_type_equal (type, G_VARIANT_TYPE_INT32)) ++ func = G_CALLBACK (auto_int); ++ else if (g_variant_type_equal (type, G_VARIANT_TYPE_DOUBLE)) ++ func = G_CALLBACK (auto_double); ++ else ++ g_assert_not_reached (); + +- return z_gconf_notify_add (key, func, var); ++ return (gboolean) z_settings_signal_connect (settings, key, func, var); + } + + typedef struct { ++ GSettings * settings; + gchar * key; /* the key we monitor (copy) */ +- GConfValueType type; ++ const GVariantType * type; + +- guint cnxn; /* GConf connection ID */ ++ gulong cnxn; /* GConf connection ID */ + + gpointer var; /* optional auto-update */ + GObject * object; /* connected Widget */ + } notify; + + static void +-notify_destroy (notify * n) ++notify_destroy (notify * n, ++ GClosure *closure) + { + if (0 != n->cnxn) +- gconf_client_notify_remove (gconf_client, n->cnxn); ++ g_signal_handler_disconnect (n->settings, n->cnxn); + + g_free (n->key); + +@@ -345,39 +222,14 @@ + } + + static void +-notify_add (notify * n, +- const char * key, +- GConfClientNotifyFunc func) +-{ +- GError *error = NULL; +- +- n->key = g_strdup (key); +- +- n->cnxn = gconf_client_notify_add (gconf_client, key, +- func, n, +- /* destroy */ NULL, +- &error); +- if (error) +- { +- /* This is fatal, will not return. */ +- g_error ("GConf notification '%s' error:\n%s\n", +- key, error->message); +- } +-} +- +-static void +-toggle_action_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++toggle_action_notify (GSettings * settings, ++ gchar * key, + notify * n) + { + GtkToggleAction *action; + gboolean active; + +- if (!entry->value) +- return; /* unset */ +- +- active = gconf_value_get_bool (entry->value); ++ active = g_settings_get_boolean (settings, key); + action = GTK_TOGGLE_ACTION (n->object); + + /* Breaks recursion. */ +@@ -399,7 +251,7 @@ + active = gtk_toggle_action_get_active (toggle_action); + + /* Error ignored. */ +- z_gconf_set_bool (n->key, active); ++ z_settings_set_boolean (n->settings, n->key, active); + + if (n->var) + *((gboolean *) n->var) = active; +@@ -411,37 +263,25 @@ + vice versa (think gconf-editor). The connection remains until the + action is destroyed. */ + void +-z_toggle_action_connect_gconf_key ++z_toggle_action_connect_key + (GtkToggleAction * toggle_action, ++ GSettings * settings, + const gchar * key) + { +- GError *error = NULL; + notify *n; +- GConfValue *value; +- +- if ((value = gconf_client_get (gconf_client, key, &error))) +- { +- gboolean active; +- +- /* No error and value is set. Synchronize action with gconf. */ +- +- active = gconf_value_get_bool (value); +- gconf_value_free (value); ++ gboolean active; + +- gtk_toggle_action_set_active (toggle_action, active); +- } +- else +- { +- /* Error ignored. */ +- z_gconf_handle_get_error (key, &error); +- } ++ active = g_settings_get_boolean (settings, key); ++ gtk_toggle_action_set_active (toggle_action, active); + + n = g_malloc0 (sizeof (*n)); + + n->var = NULL; + n->object = G_OBJECT (toggle_action); ++ n->key = g_strdup (key); + +- notify_add (n, key, (GConfClientNotifyFunc) toggle_action_notify); ++ n->cnxn = z_settings_signal_connect (settings, key, ++ G_CALLBACK (toggle_action_notify), n); + + g_signal_connect_data (G_OBJECT (toggle_action), "toggled", + G_CALLBACK (toggle_action_toggled), n, +@@ -450,18 +290,14 @@ + } + + static void +-toggle_button_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++toggle_button_notify (GSettings * settings, ++ gchar * key, + notify * n) + { + GtkToggleButton *button; + gboolean active; + +- if (!entry->value) +- return; /* unset */ +- +- active = gconf_value_get_bool (entry->value); ++ active = g_settings_get_boolean (settings, key); + button = GTK_TOGGLE_BUTTON (n->object); + + /* Breaks recursion. */ +@@ -483,7 +319,7 @@ + active = gtk_toggle_button_get_active (toggle_button); + + /* Error ignored. */ +- z_gconf_set_bool (n->key, active); ++ z_settings_set_boolean (n->settings, n->key, active); + + if (n->var) + *((gboolean *) n->var) = active; +@@ -496,7 +332,8 @@ + when var is not NULL the value of the key will be stored here + as with z_gconf_auto_update_bool(). */ + GtkWidget * +-z_gconf_check_button_new (const gchar * label, ++z_settings_check_button_new (const gchar * label, ++ GSettings * settings, + const gchar * key, + gboolean * var, + gboolean active) +@@ -506,17 +343,20 @@ + n = g_malloc0 (sizeof (*n)); + + n->var = var; ++ n->settings = settings; ++ n->key = g_strdup (key); + n->object = G_OBJECT (gtk_check_button_new_with_mnemonic (label)); + + if (!var) + var = &active; + + /* Error ignored. */ +- z_gconf_get_bool (var, key); ++ z_settings_get_boolean (var, settings, key); + + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (n->object), *var); + +- notify_add (n, key, (GConfClientNotifyFunc) toggle_button_notify); ++ n->cnxn = z_settings_signal_connect (settings, key, ++ G_CALLBACK (toggle_button_notify), n); + + g_signal_connect_data (n->object, "toggled", + G_CALLBACK (toggle_button_toggled), n, +@@ -527,19 +367,15 @@ + } + + static void +-int_slider_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++int_slider_notify (GSettings * settings, ++ gchar * key, + notify * n) + { + ZSpinSlider *spinslider; + gint gvalue; + gint svalue; + +- if (!entry->value) +- return; /* unset */ +- +- gvalue = gconf_value_get_int (entry->value); ++ gvalue = g_settings_get_int (settings, key); + + spinslider = Z_SPINSLIDER (n->object); + svalue = z_spinslider_get_int_value (spinslider); +@@ -565,7 +401,7 @@ + value = z_spinslider_get_int_value (spinslider); + + /* Error ignored. */ +- z_gconf_set_int (n->key, value); ++ z_settings_set_int (n->settings, n->key, value); + + if (n->var) + *((gint *) n->var) = value; +@@ -578,12 +414,13 @@ + when var is not NULL the value of the key will be stored here + as with z_gconf_auto_update_int(). */ + GtkWidget * +-z_gconf_int_spinslider_new (gint def_value, ++z_settings_int_spinslider_new (gint def_value, + gint min_value, + gint max_value, + gint step_incr, + gint page_incr, + gint page_size, ++ GSettings * settings, + const gchar * key, + gint * var) + { +@@ -593,13 +430,15 @@ + + n = g_malloc0 (sizeof (*n)); + ++ n->settings = settings; ++ n->key = g_strdup (key); + n->var = var; + + if (!var) + var = &def_value; + + /* Error ignored. */ +- z_gconf_get_int (var, key); ++ z_settings_get_int (var, settings, key); + + adj = gtk_adjustment_new ((gdouble) *var, + (gdouble) min_value, +@@ -612,7 +451,8 @@ + + n->object = G_OBJECT (spinslider); + +- notify_add (n, key, (GConfClientNotifyFunc) int_slider_notify); ++ n->cnxn = z_settings_signal_connect (settings, key, ++ G_CALLBACK (int_slider_notify), n); + + g_signal_connect_data (G_OBJECT (adj), "value-changed", + G_CALLBACK (int_slider_changed), n, +@@ -623,19 +463,15 @@ + } + + static void +-float_slider_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++float_slider_notify (GSettings * settings, ++ gchar * key, + notify * n) + { + ZSpinSlider *spinslider; + gdouble gvalue; + gdouble svalue; + +- if (!entry->value) +- return; /* unset */ +- +- gvalue = gconf_value_get_float (entry->value); ++ gvalue = g_settings_get_double (settings, key); + + spinslider = Z_SPINSLIDER (n->object); + svalue = z_spinslider_get_value (spinslider); +@@ -661,7 +497,7 @@ + value = z_spinslider_get_value (spinslider); + + /* Error ignored. */ +- z_gconf_set_float (n->key, value); ++ z_settings_set_double (n->settings, n->key, value); + + if (n->var) + *((gdouble *) n->var) = value; +@@ -675,6 +511,7 @@ + gdouble page_incr, + gdouble page_size, + gint digits, ++ GSettings * settings, + const gchar * key, + gdouble * var) + { +@@ -684,13 +521,15 @@ + + n = g_malloc0 (sizeof (*n)); + ++ n->settings = settings; ++ n->key = g_strdup (key); + n->var = var; + + if (!var) + var = &def_value; + + /* Error ignored. */ +- z_gconf_get_float (var, key); ++ z_settings_get_double (var, settings, key); + + adj = gtk_adjustment_new (*var, + min_value, +@@ -704,7 +543,8 @@ + + n->object = G_OBJECT (spinslider); + +- notify_add (n, key, (GConfClientNotifyFunc) float_slider_notify); ++ n->cnxn = z_settings_signal_connect (settings, key, ++ G_CALLBACK (float_slider_notify), n); + + g_signal_connect_data (G_OBJECT (adj), "value-changed", + G_CALLBACK (float_slider_changed), n, +@@ -714,47 +554,32 @@ + return spinslider; + } + +-typedef struct { +- notify n; +- const GConfEnumStringPair *lookup_table; +-} notify_combo_box; +- + static void +-combo_box_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, +- notify_combo_box * n) ++combo_box_notify (GSettings * settings, ++ gchar * key, ++ notify * n) + { + GtkComboBox *combo_box; ++ gchar *s = NULL; + +- combo_box = GTK_COMBO_BOX (n->n.object); ++ combo_box = GTK_COMBO_BOX (n->object); + +- if (entry->value) ++ if ((s = g_settings_get_string (settings, key))) + { +- const gchar *s; +- +- if ((s = gconf_value_get_string (entry->value))) +- { +- guint i; ++ gint i, index; + +- if (n->n.var) +- *((const gchar **) n->n.var) = s; ++ if (n->var) ++ *((const gchar **) n->var) = s; + +- for (i = 0; n->lookup_table[i].str; ++i) +- { +- if (0 == strcmp (s, n->lookup_table[i].str)) +- { +- gint index; ++ i = g_settings_get_enum (settings, key); ++ index = gtk_combo_box_get_active (combo_box); + +- index = gtk_combo_box_get_active (combo_box); ++ if (i != index) ++ gtk_combo_box_set_active (combo_box, i); + +- if ((gint) i != index) +- gtk_combo_box_set_active (combo_box, (gint) i); ++ g_free (s); + +- return; +- } +- } +- } ++ return; + } + + gtk_combo_box_set_active (combo_box, -1 /* unset */); +@@ -762,17 +587,23 @@ + + static void + combo_box_changed (GtkComboBox * combo_box, +- notify_combo_box * n) ++ notify * n) + { + gint index; + + index = gtk_combo_box_get_active (combo_box); + + /* Error ignored. */ +- z_gconf_set_string (n->n.key, n->lookup_table[index].str); ++ g_settings_set_enum (n->settings, n->key, index); + +- if (n->n.var) +- *((const gchar **) n->n.var) = n->lookup_table[index].str; ++ if (n->var) ++ { ++ gchar *s; ++ ++ z_settings_get_string (&s, n->settings, n->key); ++ *((const gchar **) n->var) = s; ++ g_free (s); ++ } + } + + /* Creates a new GtkComboBox connected to a GConf string key. The combo +@@ -784,149 +615,37 @@ + lookup_table will be used until the combo box is destroyed, should + be statically allocated. */ + GtkWidget * +-z_gconf_combo_box_new (const gchar ** menu, +- const gchar * key, +- const GConfEnumStringPair *lookup_table) ++z_settings_combo_box_new (const gchar ** menu, ++ GSettings * settings, ++ const gchar * key) + { +- GError *error = NULL; +- notify_combo_box *n; ++ notify *n; + GtkComboBoxText *combo_box; + guint i; +- gchar *s; + + n = g_malloc0 (sizeof (*n)); + +- n->n.var = NULL; +- n->n.object = G_OBJECT (gtk_combo_box_text_new ()); ++ n->var = NULL; ++ n->object = G_OBJECT (gtk_combo_box_text_new ()); ++ n->settings = settings; ++ n->key = g_strdup (key); + +- combo_box = GTK_COMBO_BOX_TEXT (n->n.object); ++ combo_box = GTK_COMBO_BOX_TEXT (n->object); + + for (i = 0; menu[i]; ++i) + gtk_combo_box_text_append_text (combo_box, _(menu[i])); + +- if ((s = gconf_client_get_string (gconf_client, key, &error))) +- { +- for (i = 0; lookup_table[i].str; ++i) +- { +- if (0 == strcmp (s, lookup_table[i].str)) +- { +- gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), (int) i); +- break; +- } +- } +- } +- else +- { +- gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), 0); +- z_gconf_handle_get_error (key, &error); +- } ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combo_box), ++ g_settings_get_enum (settings, key)); + +- n->lookup_table = lookup_table; /* NOTE */ ++ n->cnxn = z_settings_signal_connect (settings, key, ++ G_CALLBACK (combo_box_notify), n); + +- notify_add (&n->n, key, (GConfClientNotifyFunc) combo_box_notify); +- +- g_signal_connect (n->n.object, "changed", ++ g_signal_connect (n->object, "changed", + G_CALLBACK (combo_box_changed), n); + +- g_signal_connect_swapped (n->n.object, "destroy", ++ g_signal_connect_swapped (n->object, "destroy", + G_CALLBACK (notify_destroy), n); + +- return GTK_WIDGET (n->n.object); +-} +- +-gboolean +-string_to_color (GdkColor * color, +- const gchar * string) +-{ +- gchar *s; +- gboolean r; +- guint value; +- guint i; +- +- g_return_val_if_fail (NULL != color, FALSE); +- g_return_val_if_fail (NULL != string, FALSE); +- +- s = (gchar *) string; +- r = FALSE; +- +- while (g_ascii_isspace (*s)) +- ++s; +- +- if ('#' != *s++) +- goto failure; +- +- while (g_ascii_isspace (*s)) +- ++s; +- +- value = 0; +- +- for (i = 0; i < 6; ++i) +- { +- if (g_ascii_isdigit (*s)) +- value = value * 16 + (*s - '0'); +- else if (g_ascii_isxdigit (*s)) +- value = value * 16 + ((*s - ('A' - 0xA)) & 0xF); +- else +- goto failure; +- +- ++s; +- } +- +- while (g_ascii_isspace (*s)) +- ++s; +- +- if (0 != *s) +- goto failure; +- +- r = TRUE; +- +- color->pixel = 0; +- color->red = (value & 0xFF0000) >> 8; +- color->red |= color->red >> 8; +- color->green = value & 0xFF00; +- color->green |= color->green >> 8; +- color->blue = value & 0xFF; +- color->blue |= color->blue << 8; +- +- failure: +- return r; +-} +- +-extern gboolean +-z_gconf_set_color (const gchar * key, +- const GdkColor * color) +-{ +- gchar *str; +- gboolean success; +- +- g_return_val_if_fail (key != NULL, FALSE); +- g_return_val_if_fail (color != NULL, FALSE); +- +- str = g_strdup_printf ("#%02X%02X%02X", +- color->red >> 8, +- color->green >> 8, +- color->blue >> 8); +- +- success = z_gconf_set_string (key, str); +- +- g_free (str); +- +- return success; +-} +- +-extern gboolean +-z_gconf_get_color (GdkColor * color, +- const gchar * key) +-{ +- gchar *str; +- gboolean success; +- +- if (!z_gconf_get_string (&str, key)) +- return FALSE; +- +- success = string_to_color (color, str); +- +- g_free (str); +- +- return success; ++ return GTK_WIDGET (n->object); + } +--- zapping.orig/plugins/deinterlace/preferences.c ++++ zapping/plugins/deinterlace/preferences.c +@@ -32,17 +32,6 @@ + #define INDENT_COL 0 + #define N_COLUMNS 2 + +-#define GCONF_DIR "/apps/zapping/plugins/deinterlace" +- +-/* n/4 */ +-GConfEnumStringPair +-resolution_enum [] = { +- { 2, "low" }, +- { 3, "medium" }, +- { 4, "high" }, +- { 0, NULL } +-}; +- + static const gchar * + resolution_menu [] = { + N_("Low"), +@@ -77,13 +66,13 @@ + attach_combo_box (GtkTable * table, + guint row, + const gchar ** option_menu, +- const gchar * gconf_key, +- const GConfEnumStringPair *lookup_table, ++ GSettings * settings, ++ const gchar * key, + const gchar * tooltip) + { + GtkWidget *widget; + +- widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); ++ widget = z_settings_combo_box_new (option_menu, settings, key); + gtk_widget_show (widget); + + if (tooltip) +@@ -97,22 +86,33 @@ + /* padding */ 0, 0); + } + +-static gchar * ++/* Returns an array containing the GSettings object and the key ++ associated with the setting. */ ++static GPtrArray * + key_from_setting (const SETTING * setting) + { ++ GPtrArray *array; + gchar *key; + + g_return_val_if_fail (NULL != setting, NULL); + g_return_val_if_fail (NULL != setting->szIniEntry, NULL); + g_return_val_if_fail (NULL != setting->szIniSection, NULL); + +- key = g_strconcat (GCONF_DIR "/options/", +- setting->szIniSection, +- "/", +- setting->szIniEntry, +- NULL); ++ array = g_ptr_array_sized_new (2); ++ ++ key = g_strdup (setting->szIniSection); ++ if (!g_ascii_strcasecmp (key, "Deinterlace")) ++ g_ptr_array_add (array, deinterlace_settings); ++ else if (!g_ascii_strcasecmp (key, "DI-OldGame")) ++ g_ptr_array_add (array, di_settings); ++ else ++ g_assert_not_reached (); ++ g_free (key); ++ ++ key = g_ascii_strdown (setting->szIniEntry, -1); ++ g_ptr_array_add (array, (gpointer) key); + +- return key; ++ return array; + } + + static void +@@ -120,9 +120,10 @@ + gpointer user_data) + { + const SETTING *setting = user_data; ++ GPtrArray *arr = key_from_setting (setting); + gchar *key; + +- if (!(key = key_from_setting (setting))) ++ if (!(key = g_ptr_array_index (arr, 1))) + return; + + switch (setting->Type) +@@ -135,10 +136,14 @@ + + if (index >= 0 && NULL != setting->pszList[index]) + { ++ gchar *str; ++ ++ str = g_ascii_strdown (setting->pszList[index], -1); + /* Error ignored. */ +- z_gconf_set_string (key, setting->pszList[index]); ++ z_settings_set_string (g_ptr_array_index (arr, 0), key, str); + + *setting->pValue = index; ++ g_free (str); + } + + break; +@@ -151,12 +156,14 @@ + + g_free (key); + key = NULL; ++ g_ptr_array_free (arr, TRUE); + } + + static void + create_menu (GtkTable * table, + guint row, + const SETTING * setting, ++ GSettings * settings, + const gchar * key) + { + GtkWidget *widget; +@@ -176,11 +183,7 @@ + item_name = NULL; + + /* Error ignored. */ +- z_gconf_get_string (&item_name, key); +- +- if (!item_name) +- if (NULL != setting->pszList[0]) +- item_name = g_strdup (setting->pszList[0]); ++ z_settings_get_string (&item_name, settings, key); + + value = 0; + +@@ -221,16 +224,18 @@ + create_slider (GtkTable * table, + guint row, + const SETTING * setting, ++ GSettings * settings, + const gchar * key) + { + GtkWidget *spinslider; + +- spinslider = z_gconf_int_spinslider_new (setting->Default, ++ spinslider = z_settings_int_spinslider_new (setting->Default, + setting->MinValue, + setting->MaxValue, + /* step_incr */ setting->StepValue, + /* page_incr */ setting->StepValue, + /* page_size */ setting->StepValue, ++ settings, + key, + (gint *) setting->pValue); + gtk_widget_show (spinslider); +@@ -249,11 +254,13 @@ + create_checkbutton (GtkTable * table, + guint row, + const SETTING * setting, ++ GSettings * settings, + const gchar * key) + { + GtkWidget *widget; + +- widget = z_gconf_check_button_new (_(setting->szDisplayName), ++ widget = z_settings_check_button_new (_(setting->szDisplayName), ++ settings, + key, + (gboolean *) setting->pValue, + !!setting->Default); +@@ -286,8 +293,7 @@ + + attach_label (table, row, _("_Resolution:")); + attach_combo_box (table, row++, resolution_menu, +- GCONF_DIR "/resolution", +- resolution_enum, ++ plugin_settings, "resolution", + /* tooltip */ NULL); + + #if 0 +@@ -305,43 +311,40 @@ + for (i = 0; i < (guint) method->nSettings; ++i) + { + const SETTING *setting; ++ GPtrArray *arr; ++ GSettings *settings; + gchar *key; + + if (!(setting = method->pSettings + i)) + continue; + +- key = NULL; +- + if (!setting->szDisplayName) + { + /* Hidden option. */ + continue; + } + ++ arr = key_from_setting (setting); ++ settings = g_ptr_array_index (arr, 0); ++ key = g_ptr_array_index (arr, 1); ++ g_assert_nonnull (settings); ++ g_assert_nonnull (key); ++ + switch (setting->Type) + { + case ONOFF: + case YESNO: +- if (!(key = key_from_setting (setting))) +- break; +- +- create_checkbutton (table, row++, setting, key); ++ create_checkbutton (table, row++, setting, settings, key); + + break; + + case ITEMFROMLIST: +- if (!(key = key_from_setting (setting))) +- break; +- +- create_menu (table, row++, setting, key); ++ create_menu (table, row++, setting, settings, key); + + break; + + case SLIDER: +- if (!(key = key_from_setting (setting))) +- break; +- +- create_slider (table, row++, setting, key); ++ create_slider (table, row++, setting, settings, key); + + break; + +@@ -352,156 +355,35 @@ + + g_free (key); + key = NULL; ++ g_ptr_array_free (arr, TRUE); + } + + return widget; + } + +-static gboolean +-load_options (const DEINTERLACE_METHOD *method) ++void ++deinterlace_prefs_apply (DeinterlacePrefs * prefs) + { +- guint i; +- +- g_return_val_if_fail (NULL != method, FALSE); +- +- for (i = 0; i < (guint) method->nSettings; ++i) +- { +- const SETTING *setting; +- gchar *key; +- +- if (!(setting = method->pSettings + i)) +- continue; +- +- key = NULL; +- +- switch (setting->Type) +- { +- case ONOFF: +- case YESNO: +- { +- gboolean active; +- +- if (!(key = key_from_setting (setting))) +- break; +- +- active = setting->Default; +- +- /* Error ignored. */ +- z_gconf_get_bool (&active, key); +- +- *setting->pValue = active; +- +- break; +- } +- +- case ITEMFROMLIST: +- { +- gchar *item; +- guint index; +- guint i; +- +- if (!(key = key_from_setting (setting))) +- break; +- +- item = NULL; +- +- /* Error ignored. */ +- z_gconf_get_string (&item, key); +- +- if (!item) +- if (setting->pszList[0]) +- item = g_strdup (setting->pszList[0]); +- +- index = 0; +- +- for (i = setting->MinValue; i <= (guint) setting->MaxValue; ++i) +- { +- const gchar *name; +- +- if (!(name = setting->pszList[i])) +- break; +- +- if (item) +- if (0 == g_ascii_strcasecmp (item, name)) +- index = i; +- } +- +- g_free (item); +- +- *setting->pValue = index; +- +- break; +- } +- +- case SLIDER: +- { +- gint value; +- +- if (!(key = key_from_setting (setting))) +- break; +- +- value = setting->Default; +- +- /* Error ignored. */ +- z_gconf_get_bool (&value, key); +- +- *setting->pValue = value; +- +- break; +- } +- +- default: +- /* Ignored. */ +- break; +- } +- +- g_free (key); +- key = NULL; +- } +- +- return TRUE; ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_apply (plugin_settings); ++ if (g_settings_get_has_unapplied (deinterlace_settings)) ++ g_settings_apply (deinterlace_settings); ++ if (g_settings_get_has_unapplied (di_settings)) ++ g_settings_apply (di_settings); + } + + void + deinterlace_prefs_cancel (DeinterlacePrefs * prefs) + { +- GError *error = NULL; +- gboolean success; +- gchar *item; +- DEINTERLACE_METHOD *method; +- + g_return_if_fail (IS_DEINTERLACE_PREFS (prefs)); + +- if (!prefs->change_set) +- return; +- + /* Revert to old values. */ +- success = gconf_client_commit_change_set (gconf_client, +- prefs->change_set, +- /* remove_committed */ FALSE, +- &error); +- if (!success || error) +- { +- /* Error ignored. */ +- +- if (error) +- { +- printv ("Cannot revert deinterlace prefs: %s\n", error->message); +- g_error_free (error); +- error = NULL; +- } +- } +- +- item = NULL; +- +- /* Error ignored. */ +- z_gconf_get_string (&item, GCONF_DIR "/method"); +- +- /* Apply reverted gconf values. */ +- if ((method = deinterlace_find_method (item))) +- load_options (method); +- +- g_free (item); ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_revert (plugin_settings); ++ if (g_settings_get_has_unapplied (deinterlace_settings)) ++ g_settings_revert (deinterlace_settings); ++ if (g_settings_get_has_unapplied (di_settings)) ++ g_settings_revert (di_settings); + + gtk_widget_destroy (GTK_WIDGET (prefs)); + } +@@ -526,7 +408,7 @@ + if (active_item <= 0) + { + /* Error ignored. */ +- z_gconf_set_string (GCONF_DIR "/method", "disabled"); ++ z_settings_set_string (plugin_settings, "method", "disabled"); + } + else + { +@@ -551,7 +433,7 @@ + && NULL != method->szName) + { + /* Error ignored. */ +- z_gconf_set_string (GCONF_DIR "/method", method->szName); ++ z_settings_set_string (plugin_settings, "method", method->szName); + + prefs->option_table = create_option_table (method); + gtk_widget_show (prefs->option_table); +@@ -566,7 +448,7 @@ + else + { + /* Error ignored. */ +- z_gconf_set_string (GCONF_DIR "/method", "disabled"); ++ z_settings_set_string (plugin_settings, "method", "disabled"); + } + } + } +@@ -574,113 +456,9 @@ + static void + instance_finalize (GObject * object) + { +- DeinterlacePrefs *prefs = DEINTERLACE_PREFS (object); +- +- if (prefs->change_set) +- { +- gconf_change_set_unref (prefs->change_set); +- prefs->change_set = NULL; +- } +- + parent_class->finalize (object); + } + +-static GConfChangeSet * +-create_change_set (void) +-{ +- GError *error = NULL; +- GConfChangeSet *change_set; +- gchar **keys; +- guint keys_capacity; +- guint keys_size; +- guint i; +- +- keys_capacity = 16; +- keys_size = 0; +- +- keys = g_new (char *, keys_capacity); +- keys[0] = NULL; +- +- for (i = 0; i < N_ELEMENTS (deinterlace_methods); ++i) +- { +- const DEINTERLACE_METHOD *method; +- guint j; +- +- if (!(method = deinterlace_methods[i])) +- continue; +- +- for (j = 0; j < (guint) method->nSettings; ++j) +- { +- const SETTING *setting; +- +- if (!(setting = method->pSettings + j)) +- continue; +- +- switch (setting->Type) +- { +- case ONOFF: +- case YESNO: +- case ITEMFROMLIST: +- case SLIDER: +- { +- gchar *key; +- +- if (!(key = key_from_setting (setting))) +- break; +- +- if (0) +- fprintf (stderr, +- " \n" +- " /schemas%s\n" +- " %s\n" +- " Zapping\n" +- " %u\n" +- " %ld\n" +- " \n", +- key, key, setting->Type, (long) setting->Default); +- +- if (keys_size + 1 >= keys_capacity) +- { +- keys_capacity *= 2; +- keys = g_renew (char *, keys, keys_capacity); +- } +- +- keys[keys_size++] = key; +- key = NULL; +- +- keys[keys_size] = NULL; +- +- break; +- } +- +- default: +- /* Ignored. */ +- break; +- } +- } +- } +- +- change_set = gconf_client_change_set_from_currentv (gconf_client, +- (const gchar**) keys, +- &error); +- if (!change_set || error) +- { +- g_assert (NULL == change_set); +- +- if (error) +- { +- g_warning ("Cannot create deinterlace prefs change set:\n%s", +- error->message); +- g_error_free (error); +- error = NULL; +- } +- } +- +- g_strfreev (keys); +- +- return change_set; +-} +- + static GtkWidget * + attach_method_combo (DeinterlacePrefs * prefs, + guint row) +@@ -703,7 +481,7 @@ + item_name = NULL; + + /* Error ignored. */ +- z_gconf_get_string (&item_name, GCONF_DIR "/method"); ++ z_settings_get_string (&item_name, plugin_settings, "method"); + + gtk_combo_box_text_append_text (combo_box, _("Disabled")); + +@@ -763,7 +541,9 @@ + /* Add options of current method. */ + on_method_changed (GTK_COMBO_BOX (method_combo), prefs); + +- prefs->change_set = create_change_set (); ++ g_settings_delay (plugin_settings); ++ g_settings_delay (deinterlace_settings); ++ g_settings_delay (di_settings); + } + + GtkWidget * +--- zapping.orig/plugins/subtitle/main.h ++++ zapping/plugins/subtitle/main.h +@@ -29,6 +29,7 @@ + #endif + + extern GList * subtitle_views; ++GSettings * plugin_settings; + + extern gboolean + plugin_get_symbol (const gchar * name, +--- zapping.orig/plugins/subtitle/preferences.h ++++ zapping/plugins/subtitle/preferences.h +@@ -25,7 +25,6 @@ + #define SUBTITLE_PREFERENCES_H + + #include +-#include + + G_BEGIN_DECLS + +@@ -47,8 +46,6 @@ + struct _SubtitlePrefs + { + GtkTable table; +- +- GConfChangeSet * change_set; + }; + + struct _SubtitlePrefsClass +@@ -56,10 +53,6 @@ + GtkTableClass parent_class; + }; + +-extern GConfEnumStringPair subtitle_charset_enum []; +-extern GConfEnumStringPair subtitle_level_enum []; +-extern GConfEnumStringPair subtitle_interp_enum []; +- + extern void + subtitle_prefs_cancel (SubtitlePrefs * prefs); + extern void +--- zapping.orig/plugins/subtitle/main.c ++++ zapping/plugins/subtitle/main.c +@@ -38,6 +38,8 @@ + { + while (subtitle_views) + gtk_widget_destroy (GTK_WIDGET (subtitle_views->data)); ++ ++ g_object_unref (plugin_settings); + } + + static void +@@ -72,6 +74,8 @@ + + D(); + ++ plugin_settings = g_settings_new ("net.sf.Zapping.plugins.subtitle"); ++ + return TRUE; + } + +--- zapping.orig/plugins/subtitle/view.c ++++ zapping/plugins/subtitle/view.c +@@ -1400,103 +1400,98 @@ + view->load_page (view, pg->pgno); + } + +-static void +-interp_type_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, +- gpointer user_data) ++static GdkInterpType ++interp_enum_to_type (gint value) + { +- client = client; +- cnxn_id = cnxn_id; +- user_data = user_data; ++ GdkInterpType type; + +- if (entry->value) ++ switch (value) + { +- const gchar *s; +- gint enum_value; +- +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (subtitle_interp_enum, s, &enum_value)) +- { +- GList *p; +- +- interp_type = (GdkInterpType) enum_value; ++ case 0: ++ type = GDK_INTERP_NEAREST; ++ break; + +- for (p = g_list_first (subtitle_views); p; p = p->next) +- { +- SubtitleView *view = p->data; ++ case 1: ++ type = GDK_INTERP_TILES; ++ break; + +- if (!view->pg) +- continue; ++ case 2: ++ type = GDK_INTERP_BILINEAR; ++ break; + +- if (view->moving | view->scaling) +- { +- view->redraw_display_scaled = TRUE; +- continue; +- } ++ case 3: ++ type = GDK_INTERP_HYPER; ++ break; + +- update_window (view, +- /* reposition */ FALSE, +- /* reshape */ FALSE, +- /* rescale */ TRUE, +- /* first_row */ 0, +- /* last_row */ view->pg->rows - 1); +- } +- } ++ default: ++ g_assert_not_reached (); ++ break; + } ++ ++ return type; + } + + static void +-default_charset_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++interp_type_notify (GSettings * settings, ++ gchar * key, + gpointer user_data) + { +- client = client; +- cnxn_id = cnxn_id; +- user_data = user_data; ++ GList *p; ++ gint enum_value; ++ ++ enum_value = g_settings_get_enum (settings, key); ++ interp_type = interp_enum_to_type (enum_value); + +- if (entry->value) ++ for (p = g_list_first (subtitle_views); p; p = p->next) + { +- const gchar *s; +- gint enum_value; ++ SubtitleView *view = p->data; + +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (subtitle_charset_enum, s, &enum_value)) +- { +- GList *p; ++ if (!view->pg) ++ continue; + +- default_charset = enum_value; ++ if (view->moving | view->scaling) ++ { ++ view->redraw_display_scaled = TRUE; ++ continue; ++ } + +- for (p = g_list_first (subtitle_views); p; p = p->next) +- { +- SubtitleView *view = p->data; +- vbi3_page *pg; ++ update_window (view, ++ /* reposition */ FALSE, ++ /* reshape */ FALSE, ++ /* rescale */ TRUE, ++ /* first_row */ 0, ++ /* last_row */ view->pg->rows - 1); ++ } ++} + +- if ((pg = view->pg) && IS_TELETEXT_PAGE (pg)) +- { +- view->load_page (view, pg->pgno); +- } +- } +- } ++static void ++default_charset_notify (GSettings * settings, ++ gchar * key, ++ gpointer user_data) ++{ ++ GList *p; ++ ++ default_charset = g_settings_get_enum (settings, key); ++ ++ for (p = g_list_first (subtitle_views); p; p = p->next) ++ { ++ SubtitleView *view = p->data; ++ vbi3_page *pg; ++ ++ if ((pg = view->pg) && IS_TELETEXT_PAGE (pg)) ++ view->load_page (view, pg->pgno); + } + } + + static void +-redraw_unscaled_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++redraw_unscaled_notify (GSettings * settings, ++ gchar * key, + gpointer user_data) + { + gboolean success = FALSE; + +- client = client; +- cnxn_id = cnxn_id; +- entry = entry; +- user_data = user_data; +- +- success |= z_gconf_get_int (&brightness, GCONF_DIR "/brightness"); +- success |= z_gconf_get_int (&contrast, GCONF_DIR "/contrast"); ++ success |= z_settings_get_int (&brightness, settings, "brightness"); ++ success |= z_settings_get_int (&contrast, settings, "contrast"); + + if (success) + { +@@ -1518,7 +1513,7 @@ + gchar *color; + GdkRGBA rgb; + +- if (!z_gconf_get_string (&color, key)) ++ if (!z_settings_get_string (&color, plugin_settings, key)) + return FALSE; + + if (!gdk_rgba_parse (&rgb, color)) +@@ -1534,21 +1529,15 @@ + } + + static void +-caption_reload_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++caption_reload_notify (GSettings * settings, ++ gchar * key, + gpointer user_data) + { + gboolean success = FALSE; + +- client = client; +- cnxn_id = cnxn_id; +- entry = entry; +- user_data = user_data; +- +- success |= z_gconf_get_bool (&padding, GCONF_DIR "/pad"); +- success |= get_color (&default_foreground, GCONF_DIR "/foreground"); +- success |= get_color (&default_background, GCONF_DIR "/background"); ++ success |= z_settings_get_boolean (&padding, settings, "pad"); ++ success |= get_color (&default_foreground, "foreground"); ++ success |= get_color (&default_background, "background"); + + if (success) + { +@@ -1568,17 +1557,11 @@ + } + + static void +-show_dheight_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++show_dheight_notify (GSettings * settings, ++ gchar * key, + gpointer user_data) + { +- client = client; +- cnxn_id = cnxn_id; +- entry = entry; +- user_data = user_data; +- +- if (z_gconf_get_bool (&show_dheight, GCONF_DIR "/show_dheight")) ++ if (z_settings_get_boolean (&show_dheight, settings, "show_dheight")) + { + GList *p; + +@@ -1596,17 +1579,11 @@ + } + + static void +-roll_notify (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++roll_notify (GSettings * settings, ++ gchar * key, + gpointer user_data) + { +- client = client; +- cnxn_id = cnxn_id; +- entry = entry; +- user_data = user_data; +- +- if (z_gconf_get_bool (&roll, GCONF_DIR "/roll")) ++ if (z_settings_get_boolean (&roll, settings, "roll")) + { + GList *p; + +@@ -2406,22 +2383,29 @@ + cursor_link = gdk_cursor_new_for_display (disp, GDK_HAND2); + + /* Error ignored */ +- z_gconf_notify_add (GCONF_DIR "/default_charset", +- default_charset_notify, NULL); +- +- z_gconf_notify_add (GCONF_DIR "/interp_type", interp_type_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "default-charset", ++ G_CALLBACK (default_charset_notify), NULL); + +- z_gconf_notify_add (GCONF_DIR "/brightness", redraw_unscaled_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/contrast", redraw_unscaled_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "interp_type", ++ G_CALLBACK (interp_type_notify), NULL); + +- z_gconf_notify_add (GCONF_DIR "/pad", caption_reload_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/foreground", caption_reload_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/background", caption_reload_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "brightness", ++ G_CALLBACK (redraw_unscaled_notify), NULL); ++ z_settings_signal_connect (plugin_settings, "contrast", ++ G_CALLBACK (redraw_unscaled_notify), NULL); ++ ++ z_settings_signal_connect (plugin_settings, "pad", ++ G_CALLBACK (caption_reload_notify), NULL); ++ z_settings_signal_connect (plugin_settings, "foreground", ++ G_CALLBACK (caption_reload_notify), NULL); ++ z_settings_signal_connect (plugin_settings, "background", ++ G_CALLBACK (caption_reload_notify), NULL); + +- z_gconf_notify_add (GCONF_DIR "/roll", roll_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "roll", ++ G_CALLBACK (roll_notify), NULL); + +- z_gconf_notify_add (GCONF_DIR "/show_dheight", +- show_dheight_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "show-dheight", ++ G_CALLBACK (show_dheight_notify), NULL); + } + + GType +--- zapping.orig/plugins/subtitle/preferences.c ++++ zapping/plugins/subtitle/preferences.c +@@ -31,25 +31,10 @@ + #include "main.h" + #include "preferences.h" + +-#define GCONF_DIR "/apps/zapping/plugins/subtitle" +- + #define INDENT_COL 2 + + static GObjectClass * parent_class; + +-GConfEnumStringPair +-subtitle_charset_enum [] = { +- { 0, "western_and_central_europe" }, +- { 8, "eastern_europe" }, +- { 16, "western_europe_and_turkey" }, +- { 24, "central_and_southeast_europe" }, +- { 32, "cyrillic" }, +- { 48, "greek_and_turkish" }, +- { 64, "arabic" }, +- { 80, "hebrew_and_arabic" }, +- { 0, NULL } +-}; +- + static const gchar * + charset_menu [] = { + N_("Western and Central Europe"), +@@ -63,15 +48,6 @@ + NULL, + }; + +-GConfEnumStringPair +-subtitle_interp_enum [] = { +- { GDK_INTERP_NEAREST, "nearest" }, +- { GDK_INTERP_TILES, "tiles" }, +- { GDK_INTERP_BILINEAR, "bilinear" }, +- { GDK_INTERP_HYPER, "hyper" }, +- { 0, NULL } +-}; +- + static const gchar * + interp_menu [] = { + N_("Nearest (fast, low quality)"), +@@ -126,13 +102,14 @@ + attach_check_button (GtkTable * table, + guint row, + const gchar * label, +- const gchar * gconf_key, ++ const gchar * key, + gboolean def_value, + const gchar * tooltip) + { + GtkWidget *widget; + +- widget = z_gconf_check_button_new (label, gconf_key, NULL, def_value); ++ widget = z_settings_check_button_new (label, plugin_settings, key, ++ NULL, def_value); + gtk_widget_show (widget); + + if (tooltip) +@@ -150,13 +127,12 @@ + attach_combo_box (GtkTable * table, + guint row, + const gchar ** option_menu, +- const gchar * gconf_key, +- const GConfEnumStringPair *lookup_table, ++ const gchar * key, + const gchar * tooltip) + { + GtkWidget *widget; + +- widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); ++ widget = z_settings_combo_box_new (option_menu, plugin_settings, key); + gtk_widget_show (widget); + + if (tooltip) +@@ -177,7 +153,7 @@ + gchar *color; + GdkRGBA rgb; + +- if (!z_gconf_get_string (&color, key)) ++ if (!z_settings_get_string (&color, plugin_settings, key)) + return FALSE; + + if (!gdk_rgba_parse (&rgb, color)) +@@ -197,16 +173,16 @@ + gpointer user_data) + { + char *buffer; +- const gchar *gconf_key; ++ const gchar *key; + GdkRGBA rgba; + +- gconf_key = user_data; ++ key = user_data; + + gtk_color_chooser_get_rgba (GTK_COLOR_CHOOSER (colorpicker), &rgba); + buffer = gdk_rgba_to_string (&rgba); + + /* Error ignored. */ +- z_gconf_set_string (gconf_key, buffer); ++ z_settings_set_string (plugin_settings, key, buffer); + g_free (buffer); + } + +@@ -214,7 +190,7 @@ + attach_color_picker (GtkTable * table, + guint row, + const gchar * title, +- const gchar * gconf_key, ++ const gchar * key, + vbi3_rgba def_value, + const gchar * tooltip) + { +@@ -223,7 +199,7 @@ + GdkRGBA color; + + /* Error ignored. */ +- get_color (&def_value, gconf_key); ++ get_color (&def_value, key); + color.red = VBI3_R (def_value) / 255.; + color.green = VBI3_G (def_value) / 255.0; + color.blue = VBI3_B (def_value) / 255.0; +@@ -238,7 +214,7 @@ + gtk_color_button_set_title (color_picker, title); + + z_signal_connect_const (G_OBJECT (color_picker), "color-set", +- G_CALLBACK (on_color_set), gconf_key); ++ G_CALLBACK (on_color_set), key); + + if (tooltip) + gtk_widget_set_tooltip_text (widget, tooltip); +@@ -255,35 +231,17 @@ + subtitle_prefs_apply (SubtitlePrefs * prefs) + { + prefs = prefs; ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_apply (plugin_settings); + } + + void + subtitle_prefs_cancel (SubtitlePrefs * prefs) + { +- GError *error = NULL; +- gboolean success; +- + g_return_if_fail (IS_SUBTITLE_PREFS (prefs)); + +- if (prefs->change_set) +- { +- /* Revert to old values. */ +- success = gconf_client_commit_change_set (gconf_client, +- prefs->change_set, +- /* remove_committed */ FALSE, +- &error); +- if (!success || error) +- { +- /* Error ignored. */ +- +- if (error) +- { +- printv ("Cannot revert Subtitle prefs: %s\n", error->message); +- g_error_free (error); +- error = NULL; +- } +- } +- } ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_revert (plugin_settings); + + gtk_widget_destroy (GTK_WIDGET (prefs)); + } +@@ -299,14 +257,15 @@ + case 0: + value = gtk_adjustment_get_value (GTK_ADJUSTMENT (adj)); + /* Error ignored. */ +- z_gconf_set_int (GCONF_DIR "/brightness", SATURATE (value, 0, 255)); ++ z_settings_set_int (plugin_settings, "brightness", ++ SATURATE (value, 0, 255)); + break; + + case 1: + value = gtk_adjustment_get_value (GTK_ADJUSTMENT (adj)); + /* Error ignored. */ +- z_gconf_set_int (GCONF_DIR "/contrast", +- SATURATE (value, -128, +127)); ++ z_settings_set_int (plugin_settings, "contrast", ++ SATURATE (value, -128, +127)); + break; + } + } +@@ -314,14 +273,6 @@ + static void + instance_finalize (GObject * object) + { +- SubtitlePrefs *prefs = SUBTITLE_PREFS (object); +- +- if (prefs->change_set) +- { +- gconf_change_set_unref (prefs->change_set); +- prefs->change_set = NULL; +- } +- + parent_class->finalize (object); + } + +@@ -330,7 +281,6 @@ + gpointer g_class _unused_) + { + SubtitlePrefs *prefs = (SubtitlePrefs *) instance; +- GError *error = NULL; + GtkWidget *widget; + GtkAdjustment *adj; + guint row; +@@ -348,8 +298,7 @@ + + attach_label (&prefs->table, row, _("_Default encoding:")); + attach_combo_box (&prefs->table, row++, charset_menu, +- GCONF_DIR "/default_charset", +- subtitle_charset_enum, ++ "default-charset", + _("Some stations fail to transmit a complete language " + "identifier, so the Subtitle viewer may not display " + "the correct font or national characters. You can " +@@ -358,7 +307,7 @@ + + attach_check_button (&prefs->table, row++, + _("_Show double height characters"), +- GCONF_DIR "/show_dheight", TRUE, NULL); ++ "show-dheight", TRUE, NULL); + + /* TRANSLATORS: + Closed Caption is a captioning system used mainly in the USA, +@@ -369,12 +318,12 @@ + attach_label (&prefs->table, row, _("_Foreground:")); + attach_color_picker (&prefs->table, row++, + _("Closed Caption foreground color"), +- GCONF_DIR "/foreground", 0xFFFFFF, NULL); ++ "foreground", 0xFFFFFF, NULL); + + attach_label (&prefs->table, row, _("_Background:")); + attach_color_picker (&prefs->table, row++, + _("Closed Caption background color"), +- GCONF_DIR "/background", 0x000000, NULL); ++ "background", 0x000000, NULL); + + #if 0 + attach_check_button (&prefs->table, row++, +@@ -383,13 +332,13 @@ + #endif + attach_check_button (&prefs->table, row++, + _("_Roll live caption"), +- GCONF_DIR "/roll", FALSE, NULL); ++ "roll", FALSE, NULL); + + attach_header (&prefs->table, row++, _("Display")); + + attach_label (&prefs->table, row, _("_Brightness:")); + value = 128; +- z_gconf_get_int (&value, GCONF_DIR "/brightness"); ++ z_settings_get_int (&value, plugin_settings, "brightness"); + adj = gtk_adjustment_new (value, + /* min, max */ 0.0, 255.0, + /* step */ 1, +@@ -411,7 +360,7 @@ + + attach_label (&prefs->table, row, _("_Contrast:")); + value = 64; +- z_gconf_get_int (&value, GCONF_DIR "/contrast"); ++ z_settings_get_int (&value, plugin_settings, "contrast"); + adj = gtk_adjustment_new (value, + /* min, max */ -128, +127, + /* step */ 1, +@@ -433,36 +382,11 @@ + + attach_label (&prefs->table, row, _("S_caling:")); + attach_combo_box (&prefs->table, row++, interp_menu, +- GCONF_DIR "/interp_type", +- subtitle_interp_enum, ++ "interp-type", + _("Quality/speed trade-off when scaling and " + "anti-aliasing the page.")); + +- prefs->change_set = +- gconf_client_change_set_from_current (gconf_client, +- &error, +- GCONF_DIR "/default_charset", +- GCONF_DIR "/interp_type", +- GCONF_DIR "/brightness", +- GCONF_DIR "/contrast", +- GCONF_DIR "/foreground", +- GCONF_DIR "/background", +- GCONF_DIR "/pad", +- GCONF_DIR "/roll", +- GCONF_DIR "/show_dheight", +- NULL); +- if (!prefs->change_set || error) +- { +- g_assert (!prefs->change_set); +- +- if (error) +- { +- g_warning ("Cannot create Subtitle prefs change set:\n%s", +- error->message); +- g_error_free (error); +- error = NULL; +- } +- } ++ g_settings_delay (plugin_settings); + } + + GtkWidget * +--- zapping.orig/plugins/screenshot/screenshot.c ++++ zapping/plugins/screenshot/screenshot.c +@@ -277,6 +277,8 @@ + py_return_true; + } + ++static GSettings *plugin_settings; ++ + static gboolean + plugin_init ( PluginBridge bridge _unused_, tveng_device_info * info ) + { +@@ -306,6 +308,8 @@ + ("PPM Screenshot"), "zapping.quickshot('ppm')", + ("JPEG Screenshot"), "zapping.quickshot('jpeg')"); + ++ plugin_settings = g_settings_new ("net.sf.Zapping.plugins.screenshot"); ++ + return TRUE; + } + +@@ -333,6 +337,8 @@ + + usleep(5000); + } ++ ++ g_object_unref (plugin_settings); + } + + static gboolean +@@ -466,7 +472,7 @@ + gtk_entry_set_text (GTK_ENTRY (w), screenshot_option_command); + + full_size = FALSE; +- z_gconf_get_bool (&full_size, "/apps/zapping/plugins/screenshot/full_size"); ++ z_settings_get_boolean (&full_size, plugin_settings, "full-size"); + w = lookup_widget (page, "screenshot_full_size"); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (w), full_size); + +@@ -496,8 +502,8 @@ + g_strdup (gtk_entry_get_text (GTK_ENTRY (w))); + + w = lookup_widget (page, "screenshot_full_size"); +- z_gconf_set_bool ("/apps/zapping/plugins/screenshot/full_size", +- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))); ++ z_settings_set_boolean (plugin_settings, "full-size", ++ gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (w))); + + GET_BOOL (grab_on_ok); + +@@ -1727,8 +1733,7 @@ + height = 0; + + full_size = FALSE; +- z_gconf_get_bool (&full_size, +- "/apps/zapping/plugins/screenshot/full_size"); ++ z_settings_get_boolean (&full_size, plugin_settings, "full-size"); + if (full_size) + { + const tv_video_standard *std; +--- zapping.orig/plugins/teletext/preferences.h ++++ zapping/plugins/teletext/preferences.h +@@ -25,7 +25,6 @@ + #define TELETEXT_PREFERENCES_H + + #include +-#include + + G_BEGIN_DECLS + +@@ -50,8 +49,6 @@ + + GtkAdjustment * cache_size; + GtkAdjustment * cache_networks; +- +- GConfChangeSet * change_set; + }; + + struct _TeletextPrefsClass +@@ -59,10 +56,6 @@ + GtkTableClass parent_class; + }; + +-extern GConfEnumStringPair teletext_charset_enum []; +-extern GConfEnumStringPair teletext_level_enum []; +-extern GConfEnumStringPair teletext_interp_enum []; +- + extern void + teletext_prefs_cancel (TeletextPrefs * prefs); + extern void +--- zapping.orig/plugins/teletext/main.c ++++ zapping/plugins/teletext/main.c +@@ -36,7 +36,7 @@ + #include "preferences.h" + #include "main.h" + +-#define GCONF_DIR "/apps/zapping/plugins/teletext" ++#define SCHEMA "net.sf.Zapping.plugins.teletext" + + vbi3_network anonymous_network; + +@@ -107,7 +107,7 @@ + gint value; + + value = 100; +- if (z_gconf_get_int (&value, GCONF_DIR "/home_page")) ++ if (z_settings_get_int (&value, plugin_settings, "/home-page")) + value = SATURATE (value, 100, 899); + + page = value; +@@ -194,6 +194,11 @@ + bookmark_list_destroy (&bookmarks); + + vbi3_network_destroy (&anonymous_network); ++ ++ g_object_unref (plugin_settings); ++ g_object_unref (view_settings); ++ g_object_unref (win_settings); ++ g_object_unref (search_settings); + } + + static void +@@ -259,6 +264,11 @@ + + D(); + ++ plugin_settings = g_settings_new (SCHEMA); ++ view_settings = g_settings_get_child (plugin_settings, "view"); ++ win_settings = g_settings_get_child (plugin_settings, "window"); ++ search_settings = g_settings_get_child (plugin_settings, "search"); ++ + return TRUE; + } + +--- zapping.orig/plugins/teletext/main.h ++++ zapping/plugins/teletext/main.h +@@ -38,5 +38,9 @@ + extern GtkActionGroup * teletext_action_group; + extern GList * teletext_windows; + extern GList * teletext_views; ++GSettings * plugin_settings; ++GSettings * view_settings; ++GSettings * win_settings; ++GSettings * search_settings; + + #endif /* TELETEXT_MAIN_H */ +--- zapping.orig/plugins/teletext/preferences.c ++++ zapping/plugins/teletext/preferences.c +@@ -33,25 +33,10 @@ + #include "main.h" + #include "preferences.h" + +-#define GCONF_DIR "/apps/zapping/plugins/teletext" +- + #define INDENT_COL 2 + + static GObjectClass * parent_class; + +-GConfEnumStringPair +-teletext_charset_enum [] = { +- { 0, "western_and_central_europe" }, +- { 8, "eastern_europe" }, +- { 16, "western_europe_and_turkey" }, +- { 24, "central_and_southeast_europe" }, +- { 32, "cyrillic" }, +- { 48, "greek_and_turkish" }, +- { 64, "arabic" }, +- { 80, "hebrew_and_arabic" }, +- { 0, NULL } +-}; +- + static const gchar * + charset_menu [] = { + N_("Western and Central Europe"), +@@ -65,15 +50,6 @@ + NULL, + }; + +-GConfEnumStringPair +-teletext_level_enum [] = { +- { VBI3_WST_LEVEL_1, "1" }, +- { VBI3_WST_LEVEL_1p5, "1.5" }, +- { VBI3_WST_LEVEL_2p5, "2.5" }, +- { VBI3_WST_LEVEL_3p5, "3.5" }, +- { 0, NULL } +-}; +- + static const gchar * + level_menu [] = { + N_("Level 1"), +@@ -83,15 +59,6 @@ + NULL, + }; + +-GConfEnumStringPair +-teletext_interp_enum [] = { +- { GDK_INTERP_NEAREST, "nearest" }, +- { GDK_INTERP_TILES, "tiles" }, +- { GDK_INTERP_BILINEAR, "bilinear" }, +- { GDK_INTERP_HYPER, "hyper" }, +- { 0, NULL } +-}; +- + static const gchar * + interp_menu [] = { + N_("Nearest (fast, low quality)"), +@@ -146,13 +113,13 @@ + attach_combo_box (GtkTable * table, + guint row, + const gchar ** option_menu, +- const gchar * gconf_key, +- const GConfEnumStringPair *lookup_table, ++ GSettings * settings, ++ const gchar * key, + const gchar * tooltip) + { + GtkWidget *widget; + +- widget = z_gconf_combo_box_new (option_menu, gconf_key, lookup_table); ++ widget = z_settings_combo_box_new (option_menu, settings, key); + gtk_widget_show (widget); + + if (tooltip) +@@ -188,49 +155,35 @@ + + value = gtk_adjustment_get_value (prefs->cache_size); + value *= 1 << 10; +- z_gconf_set_int (GCONF_DIR "/cache_size", value); ++ z_settings_set_int (plugin_settings, "cache-size", value); + + if (ca) + vbi3_cache_set_memory_limit (ca, (unsigned int) value); + + value = gtk_adjustment_get_value (prefs->cache_networks); +- z_gconf_set_int (GCONF_DIR "/cache_networks", value); ++ z_settings_set_int (plugin_settings, "cache-networks", value); + + if (ca) + { + vbi3_cache_set_network_limit (ca, (unsigned int) value); + vbi3_cache_unref (ca); + } ++ ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_apply (plugin_settings); ++ if (g_settings_get_has_unapplied (view_settings)) ++ g_settings_apply (view_settings); + } + + void + teletext_prefs_cancel (TeletextPrefs * prefs) + { +- GError *error = NULL; +- gboolean success; +- + g_return_if_fail (IS_TELETEXT_PREFS (prefs)); + +- if (prefs->change_set) +- { +- +- /* Revert to old values. */ +- success = gconf_client_commit_change_set (gconf_client, +- prefs->change_set, +- /* remove_committed */ FALSE, +- &error); +- if (!success || error) +- { +- /* Error ignored. */ +- +- if (error) +- { +- printv ("Cannot revert Teletext prefs: %s\n", error->message); +- g_error_free (error); +- error = NULL; +- } +- } +- } ++ if (g_settings_get_has_unapplied (plugin_settings)) ++ g_settings_revert (plugin_settings); ++ if (g_settings_get_has_unapplied (view_settings)) ++ g_settings_revert (view_settings); + + gtk_widget_destroy (GTK_WIDGET (prefs)); + } +@@ -246,14 +199,15 @@ + case 0: + value = gtk_adjustment_get_value (adj); + /* Error ignored. */ +- z_gconf_set_int (GCONF_DIR "/view/brightness", SATURATE (value, 0, 255)); ++ z_settings_set_int (view_settings, "brightness", ++ SATURATE (value, 0, 255)); + break; + + case 1: + value = gtk_adjustment_get_value (adj); + /* Error ignored. */ +- z_gconf_set_int (GCONF_DIR "/view/contrast", +- SATURATE (value, -128, +127)); ++ z_settings_set_int (view_settings, "contrast", ++ SATURATE (value, -128, +127)); + break; + } + } +@@ -261,14 +215,6 @@ + static void + instance_finalize (GObject * object) + { +- TeletextPrefs *prefs = TELETEXT_PREFS (object); +- +- if (prefs->change_set) +- { +- gconf_change_set_unref (prefs->change_set); +- prefs->change_set = NULL; +- } +- + parent_class->finalize (object); + } + +@@ -277,7 +223,6 @@ + gpointer g_class _unused_) + { + TeletextPrefs *prefs = (TeletextPrefs *) instance; +- GError *error = NULL; + GtkWidget *hbox; + GtkWidget *widget; + GtkAdjustment *adj; +@@ -296,14 +241,12 @@ + + attach_label (&prefs->table, row, _("_Teletext implementation:")); + attach_combo_box (&prefs->table, row++, level_menu, +- GCONF_DIR "/level", +- teletext_level_enum, ++ plugin_settings, "level", + NULL); + + attach_label (&prefs->table, row, _("_Default encoding:")); + attach_combo_box (&prefs->table, row++, charset_menu, +- GCONF_DIR "/default_charset", +- teletext_charset_enum, ++ plugin_settings, "default-charset", + _("Some stations fail to transmit a complete language " + "identifier, so the Teletext viewer may not display " + "the correct font or national characters. You can " +@@ -325,7 +268,7 @@ + /* padding */ 0, 0); + + value = 1000 << 10; /* bytes */ +- z_gconf_get_int (&value, GCONF_DIR "/cache_size"); ++ z_settings_get_int (&value, plugin_settings, "cache-size"); + adj = gtk_adjustment_new ((value + 1023) >> 10, /* kbytes */ + /* min, max */ 1, 1 << 20, + /* step */ 10, +@@ -348,7 +291,7 @@ + attach_label (&prefs->table, 5, _("_Channels:")); + + value = 1; +- z_gconf_get_int (&value, GCONF_DIR "/cache_networks"); ++ z_settings_get_int (&value, plugin_settings, "cache-networks"); + adj = gtk_adjustment_new (value, + /* min, max */ 1, 300, + /* step */ 1, +@@ -369,7 +312,7 @@ + + attach_label (&prefs->table, row, _("_Brightness:")); + value = 128; +- z_gconf_get_int (&value, GCONF_DIR "/view/brightness"); ++ z_settings_get_int (&value, view_settings, "brightness"); + adj = gtk_adjustment_new (value, + /* min, max */ 0.0, 255.0, + /* step */ 1, +@@ -391,7 +334,7 @@ + + attach_label (&prefs->table, row, _("_Contrast:")); + value = 64; +- z_gconf_get_int (&value, GCONF_DIR "/view/contrast"); ++ z_settings_get_int (&value, view_settings, "contrast"); + adj = gtk_adjustment_new (value, + /* min, max */ -128, +127, + /* step */ 1, +@@ -413,30 +356,12 @@ + + attach_label (&prefs->table, row, _("S_caling:")); + attach_combo_box (&prefs->table, row++, interp_menu, +- GCONF_DIR "/view/interp_type", +- teletext_interp_enum, ++ view_settings, "interp-type", + _("Quality/speed trade-off when scaling and " + "anti-aliasing the page.")); + +- prefs->change_set = +- gconf_client_change_set_from_current (gconf_client, +- &error, +- GCONF_DIR "/default_charset", +- GCONF_DIR "/level", +- GCONF_DIR "/view/interp_type", +- NULL); +- if (!prefs->change_set || error) +- { +- g_assert (!prefs->change_set); +- +- if (error) +- { +- g_warning ("Cannot create Teletext prefs change set:\n%s", +- error->message); +- g_error_free (error); +- error = NULL; +- } +- } ++ g_settings_delay (plugin_settings); ++ g_settings_delay (view_settings); + } + + GtkWidget * +--- zapping.orig/plugins/teletext/search.c ++++ zapping/plugins/teletext/search.c +@@ -30,8 +30,6 @@ + SEARCH_RESPONSE_FORWARD, + }; + +-#define GCONF_DIR "/apps/zapping/plugins/teletext" +- + static GObjectClass * parent_class; + + static GdkCursor * cursor_normal; +@@ -254,9 +252,9 @@ + text = g_strdup (ctext); + + /* Error ignored. */ +- z_gconf_get_bool (®exp, GCONF_DIR "/search/regexp"); +- z_gconf_get_bool (&casefold, GCONF_DIR "/search/casefold"); +- z_gconf_get_bool (&all_channels, GCONF_DIR "/search/all_channels"); ++ z_settings_get_boolean (®exp, search_settings, "regexp"); ++ z_settings_get_boolean (&casefold, search_settings, "casefold"); ++ z_settings_get_boolean (&all_channels, search_settings, "all-channels"); + + if (!sp->text || 0 != strcmp (sp->text, text)) + { +@@ -359,19 +357,19 @@ + t->label = GTK_LABEL (widget); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + +- widget = z_gconf_check_button_new (_("_Regular expression"), +- GCONF_DIR "/search/regexp", +- NULL, TRUE); ++ widget = z_settings_check_button_new (_("_Regular expression"), ++ search_settings, "regexp", ++ NULL, TRUE); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + +- widget = z_gconf_check_button_new (_("Search case _insensitive"), +- GCONF_DIR "/search/casefold", +- NULL, FALSE); ++ widget = z_settings_check_button_new (_("Search case _insensitive"), ++ search_settings, "casefold", ++ NULL, FALSE); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); + + /* Future stuff. */ +- widget = z_gconf_check_button_new (_("_All channels"), +- GCONF_DIR "/search/all_channels", ++ widget = z_settings_check_button_new (_("_All channels"), ++ search_settings, "all-channels", + NULL, FALSE); + gtk_widget_set_sensitive (widget, FALSE); + gtk_box_pack_start (vbox, widget, FALSE, FALSE, 3); +--- zapping.orig/plugins/teletext/view.c ++++ zapping/plugins/teletext/view.c +@@ -54,8 +54,6 @@ + + #define BLINK_CYCLE 300 /* ms */ + +-#define GCONF_DIR "/apps/zapping/plugins/teletext" +- + enum { + REQUEST_CHANGED, + CHARSET_CHANGED, +@@ -1370,11 +1368,11 @@ + g_assert (NULL != ca); + + value = 1 << 30; +- z_gconf_get_int (&value, GCONF_DIR "/cache_size"); ++ z_settings_get_int (&value, plugin_settings, "cache-size"); + vbi3_cache_set_memory_limit (ca, (unsigned int) value); + + value = 1; +- z_gconf_get_int (&value, GCONF_DIR "/cache_networks"); ++ z_settings_get_int (&value, plugin_settings, "cache-networks"); + vbi3_cache_set_network_limit (ca, (unsigned int) value); + + vbi3_cache_unref (ca); +@@ -1794,7 +1792,7 @@ + gint value; + + value = 100; +- if (z_gconf_get_int (&value, GCONF_DIR "/home_page")) ++ if (z_settings_get_int (&value, plugin_settings, "home-page")) + value = SATURATE (value, 100, 899); + + return vbi3_bin2bcd (value); +@@ -3345,107 +3343,122 @@ + return GTK_WIDGET (g_object_new (TYPE_TELETEXT_VIEW, NULL)); + } + +-static void +-teletext_level_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, +- gpointer user_data _unused_) ++static vbi3_wst_level ++level_enum_to_type (gint value) + { +- if (entry->value) ++ vbi3_wst_level type; ++ ++ switch (value) + { +- const gchar *s; +- gint enum_value; ++ case 0: ++ type = VBI3_WST_LEVEL_1; ++ break; + +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (teletext_level_enum, s, &enum_value)) +- { +- teletext_level = (vbi3_wst_level) enum_value; +- reformat_all_views (); +- } ++ case 1: ++ type = VBI3_WST_LEVEL_1p5; ++ break; ++ ++ case 2: ++ type = VBI3_WST_LEVEL_2p5; ++ break; ++ ++ case 3: ++ type = VBI3_WST_LEVEL_3p5; ++ break; ++ ++ default: ++ g_assert_not_reached (); ++ break; + } ++ ++ return type; + } + + static void +-default_charset_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++teletext_level_notify (GSettings * settings, ++ gchar * key, + gpointer user_data _unused_) + { +- if (entry->value) +- { +- const gchar *s; +- gint enum_value; ++ gint enum_value; + +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (teletext_charset_enum, s, &enum_value)) +- { +- default_charset = enum_value; +- reformat_all_views (); +- } +- } ++ enum_value = g_settings_get_enum (settings, key); ++ teletext_level = level_enum_to_type (enum_value); ++ reformat_all_views (); + } + + static void +-interp_type_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++default_charset_notify (GSettings * settings, ++ gchar * key, + gpointer user_data _unused_) + { +- if (entry->value) ++ default_charset = g_settings_get_enum (settings, key); ++ reformat_all_views (); ++} ++ ++static GdkInterpType ++interp_enum_to_type (gint value) ++{ ++ GdkInterpType type; ++ ++ switch (value) + { +- const gchar *s; +- gint enum_value; ++ case 0: ++ type = GDK_INTERP_NEAREST; ++ break; + +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (teletext_interp_enum, s, &enum_value)) +- { +- interp_type = (GdkInterpType) enum_value; +- redraw_all_views (); +- } ++ case 1: ++ type = GDK_INTERP_TILES; ++ break; ++ ++ case 2: ++ type = GDK_INTERP_BILINEAR; ++ break; ++ ++ case 3: ++ type = GDK_INTERP_HYPER; ++ break; ++ ++ default: ++ g_assert_not_reached (); ++ break; + } ++ ++ return type; ++} ++ ++static void ++interp_type_notify (GSettings * settings, ++ gchar * key, ++ gpointer user_data _unused_) ++{ ++ gint enum_value; ++ ++ enum_value = g_settings_get_enum (settings, key); ++ interp_type = interp_enum_to_type (enum_value); ++ redraw_all_views (); + } + + static void +-color_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry _unused_, ++color_notify (GSettings * settings, ++ gchar * key, + gpointer user_data _unused_) + { + gboolean success = FALSE; + +- success |= z_gconf_get_int (&brightness, GCONF_DIR "/view/brightness"); +- success |= z_gconf_get_int (&contrast, GCONF_DIR "/view/contrast"); ++ success |= z_settings_get_int (&brightness, settings, "brightness"); ++ success |= z_settings_get_int (&contrast, settings, "contrast"); + + if (success) + redraw_all_views (); + } + +-GConfEnumStringPair +-navigation_enum [] = { +- { 0, "disabled" }, +- { 1, "flof_top1" }, +- { 2, "flof_top2" }, +- { 0, NULL } +-}; +- + static void +-navigation_notify (GConfClient * client _unused_, +- guint cnxn_id _unused_, +- GConfEntry * entry, ++navigation_notify (GSettings * settings, ++ gchar * key, + gpointer user_data _unused_) + { +- if (entry->value) +- { +- const gchar *s; +- gint enum_value; +- +- s = gconf_value_get_string (entry->value); +- if (s && gconf_string_to_enum (navigation_enum, s, &enum_value)) +- { +- navigation = enum_value; +- reformat_all_views (); +- } +- } ++ navigation = g_settings_get_enum (settings, key); ++ reformat_all_views (); + } + + static void +@@ -3498,17 +3511,23 @@ + + GA_CLIPBOARD = gdk_atom_intern ("CLIPBOARD", FALSE); + +- z_gconf_auto_update_bool (&rolling_header, GCONF_DIR "/view/rolling_header"); +- z_gconf_auto_update_bool (&live_clock, GCONF_DIR "/view/live_clock"); ++ z_settings_auto_update_boolean (&rolling_header, view_settings, ++ "rolling-header"); ++ z_settings_auto_update_boolean (&live_clock, view_settings, "live-clock"); + + /* Error ignored */ +- z_gconf_notify_add (GCONF_DIR "/level", teletext_level_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/default_charset", +- default_charset_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/view/interp_type", interp_type_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/view/brightness", color_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/view/contrast", color_notify, NULL); +- z_gconf_notify_add (GCONF_DIR "/view/navigation", navigation_notify, NULL); ++ z_settings_signal_connect (plugin_settings, "level", ++ G_CALLBACK (teletext_level_notify), NULL); ++ z_settings_signal_connect (plugin_settings, "default-charset", ++ G_CALLBACK (default_charset_notify), NULL); ++ z_settings_signal_connect (view_settings, "interp-type", ++ G_CALLBACK (interp_type_notify), NULL); ++ z_settings_signal_connect (view_settings, "brightness", ++ G_CALLBACK (color_notify), NULL); ++ z_settings_signal_connect (view_settings, "contrast", ++ G_CALLBACK (color_notify), NULL); ++ z_settings_signal_connect (view_settings, "navigation", ++ G_CALLBACK (navigation_notify), NULL); + + cmd_register ("ttx_open", py_ttx_open, METH_VARARGS); + cmd_register ("ttx_page_incr", py_ttx_page_incr, METH_VARARGS, +--- zapping.orig/src/capture.c ++++ zapping/src/capture.c +@@ -1539,10 +1539,13 @@ + return -1; + } + ++static GSettings *deint_settings; ++ + void + shutdown_capture (void) + { + pthread_rwlock_destroy (&fmt_rwlock); ++ g_object_unref (deint_settings); + } + + void +@@ -1550,6 +1553,7 @@ + { + pthread_rwlock_init (&fmt_rwlock, NULL); + +- z_gconf_auto_update_float +- (&field_balance, "/apps/zapping/plugins/deinterlace/field_balance"); ++ deint_settings = g_settings_new ("net.sf.Zapping.plugins.deinterlace"); ++ z_settings_auto_update_double (&field_balance, deint_settings, ++ "field-balance"); + } +--- zapping.orig/src/fullscreen.c ++++ zapping/src/fullscreen.c +@@ -197,7 +197,7 @@ + gint timeout; + + timeout = 0; /* disabled */ +- z_gconf_get_int (&timeout, "/apps/zapping/blank_cursor_timeout"); ++ z_settings_get_int (&timeout, gsettings, "blank-cursor-timeout"); + + z_video_blank_cursor (video, timeout); + } +--- zapping.orig/src/globals.c ++++ zapping/src/globals.c +@@ -7,7 +7,6 @@ + GList *plugin_list = NULL; + /* Whether the device can be attached as XV */ + gboolean xv_present = FALSE; +-GConfClient * gconf_client; + + /* Disable XVideo support */ + gint disable_xv = FALSE; +--- zapping.orig/src/main.c ++++ zapping/src/main.c +@@ -296,6 +296,70 @@ + errstr = NULL; + } + ++/* Migrate old GConf settings to GSettings. */ ++static void ++migrate_gconf_settings (const gchar *name) ++{ ++ gboolean needed = TRUE; ++ GError *error = NULL; ++ GKeyFile *kf; ++ gchar **list; ++ gsize i, n; ++ ++ kf = g_key_file_new (); ++ ++ g_key_file_load_from_data_dirs (kf, "gsettings-data-convert", ++ NULL, G_KEY_FILE_NONE, NULL); ++ list = g_key_file_get_string_list (kf, "State", "converted", &n, NULL); ++ ++ if (list) ++ { ++ for (i = 0; i < n; i++) ++ if (!g_strcmp0 (list[i], name)) ++ { ++ needed = FALSE; ++ break; ++ } ++ ++ g_strfreev (list); ++ } ++ ++ g_key_file_free (kf); ++ ++ if (needed) ++ { ++ g_spawn_command_line_sync ("gsettings-data-convert", ++ NULL, NULL, NULL, &error); ++ ++ /* Don't bother running a dialog as this point will be reached ++ if there are no GConf settings at all. OTOH, if the tool is ++ missing, the dialog will appear every time on startup which ++ is extremely annoying. */ ++ if (error) ++ { ++ fprintf (stderr, ++ (_("Warning: Could not migrate old GConf settings: %s\n" ++ "Please make sure that GConf is installed and the " ++ "gsettings-data-convert tool is in your PATH.\n" ++ "Alternatively, ignore this message and convert your " ++ "old settings manually.\n")), error->message); ++ ++ g_error_free (error); ++ } ++ else ++ { ++ fprintf (stdout, ++ (_("Old GConf settings were either missing or migrated " ++ "successfully.\n"))); ++ ++ /* Allow some time for the GSettings backend to record the ++ changes, otherwise the default values from the new schema ++ might be set. */ ++ sleep (1); ++ } ++ } ++} ++ + extern int zapzilla_main(int argc, char * argv[]); + + /* Make sure the version appears in backtraces. */ +@@ -595,11 +659,10 @@ + program_invocation_short_name = g_get_prgname(); + #endif + +- gconf_client = gconf_client_get_default (); +- g_assert (NULL != gconf_client); +- +- gconf_client_add_dir (gconf_client, "/apps/zapping", +- GCONF_CLIENT_PRELOAD_NONE, NULL); ++ migrate_gconf_settings ("zapping.convert"); ++ gsettings = g_settings_new ("net.sf.Zapping"); ++ g_assert (NULL != gsettings); ++ window_settings = g_settings_get_child (gsettings, "window"); + + if (x11_get_bpp() < 15) + { +@@ -1218,6 +1281,9 @@ + " %s. Please contact the author.\n" + ), GTK_MESSAGE_ERROR, "Zapping"); + ++ g_object_unref (window_settings); ++ g_object_unref (gsettings); ++ + printv(" cmd"); + shutdown_cmd (); + +--- zapping.orig/src/overlay.c ++++ zapping/src/overlay.c +@@ -130,7 +130,7 @@ + tv_window overlay_rect; + + GdkRGBA chroma_key_color; +- guint chroma_key_color_cnxn_id; ++ gulong chroma_key_color_cnxn_id; + + GdkEventMask old_root_events; + GdkEventMask old_main_events; +@@ -967,7 +967,8 @@ + c->old_video_events); + + if (0 != c->chroma_key_color_cnxn_id) +- z_gconf_notify_remove (c->chroma_key_color_cnxn_id); ++ g_signal_handler_disconnect (window_settings, ++ c->chroma_key_color_cnxn_id); + + break; + } +@@ -1001,7 +1002,7 @@ + color->blue = 0.8; + + /* XXX error message please. */ +- z_gconf_get_string (&value, "/apps/zapping/window/chroma_key_color"); ++ z_settings_get_string (&value, window_settings, "chroma-key-color"); + success = gdk_rgba_parse (color, value); + g_free (value); + +@@ -1050,18 +1051,12 @@ + } + + static void +-chroma_key_color_changed (GConfClient * client, +- guint cnxn_id, +- GConfEntry * entry, ++chroma_key_color_changed (GSettings * settings, ++ gchar * key, + gpointer user_data) + { + struct context *c = user_data; + +- client = client; +- entry = entry; +- +- c->chroma_key_color_cnxn_id = cnxn_id; +- + set_window_bg_from_config (c); + } + +@@ -1072,9 +1067,10 @@ + return set_window_bg_black (c); + + /* Calls chroma_key_color_notify on success. */ +- if (z_gconf_notify_add ("/apps/zapping/window/chroma_key_color", +- chroma_key_color_changed, +- /* user_data */ c)) ++ if ((c->chroma_key_color_cnxn_id ++ = z_settings_signal_connect (window_settings, "chroma-key-color", ++ G_CALLBACK (chroma_key_color_changed), ++ /* user_data */ c))) + return &c->chroma_key_color; + + /* Too bad. Let's the window background once and continue. */ +--- zapping.orig/src/properties-handler.c ++++ zapping/src/properties-handler.c +@@ -824,58 +824,65 @@ + + } + +-/* Toolbar style option menu mostly copied from libgnomeui, +- for compatibility with libgnomeui's toolbar context menu. */ ++static GtkToolbarStyle ++toolbar_enum_to_style (gint value) ++{ ++ GtkToolbarStyle style; ++ ++ switch (value) ++ { ++ case 0: ++ style = GTK_TOOLBAR_BOTH; ++ break; ++ ++ case 1: ++ style = GTK_TOOLBAR_BOTH_HORIZ; ++ break; ++ ++ case 2: ++ style = GTK_TOOLBAR_ICONS; ++ break; + +-#include ++ case 3: ++ style = GTK_TOOLBAR_TEXT; ++ break; ++ ++ default: ++ g_assert_not_reached (); ++ break; ++ } ++ ++ return style; ++} + +-static GConfEnumStringPair toolbar_styles [] = { +- { GTK_TOOLBAR_TEXT, "text" }, +- { GTK_TOOLBAR_ICONS, "icons" }, +- { GTK_TOOLBAR_BOTH, "both" }, +- { GTK_TOOLBAR_BOTH_HORIZ, "both_horiz" }, +- { -1, NULL } +-}; +- + static void +-global_menu_item_activated (void) ++style_menu_changed (GSettings *settings, gchar *key, GtkComboBox *combobox) + { +- const char *key; ++ gint i, index; + +- key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; ++ i = g_settings_get_enum (settings, key); ++ index = gtk_combo_box_get_active (combobox); + +- /* Unset the per-app toolbar setting */ +- gconf_client_unset (gconf_client, key, NULL); ++ if (i != index) ++ gtk_combo_box_set_active (combobox, i); ++ ++ gtk_toolbar_set_style (zapping->toolbar, toolbar_enum_to_style (i)); + } + + static void + style_menu_item_activated (GtkWidget * widget, + gpointer date) + { +- const char *key; +- guint i; + gint style; + +- key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; + style = gtk_combo_box_get_active (GTK_COMBO_BOX (widget)); + +- /* This is actually the "default" style but since the widget is +- already a GtkComboBoxText instead of the deprecated (and missing +- in GTK+ 3) GtkOptionMenu, we can't use separate callbacks for the +- different items as they are not GObject's. */ ++ /* This is actually the "default" style, so just reset the key. */ + if (style == 4) +- global_menu_item_activated (); +- +- /* Set our per-app toolbar setting */ +- for (i = 0; i < G_N_ELEMENTS (toolbar_styles); i++) +- { +- if (toolbar_styles[i].enum_value == (int) style) +- { +- gconf_client_set_string (gconf_client, key, +- toolbar_styles[i].str, NULL); +- break; +- } +- } ++ g_settings_reset (window_settings, "toolbar-style"); ++ else ++ /* Set our per-app toolbar setting */ ++ g_settings_set_enum (window_settings, "toolbar-style", style); + } + + static void +@@ -883,8 +890,9 @@ + { + char *both, *both_horiz, *icons, *text, *global; + char *str; +- const char *key; ++ gint value; + GtkToolbarStyle toolbar_style; ++ GSettings *desktop_settings; + + /* This property is deprecated and is ignored by modern GTK+. The + only way to make this work seems to be through our own GSettings +@@ -908,18 +916,16 @@ + g_signal_connect (combobox, "changed", + G_CALLBACK (style_menu_item_activated), + NULL); ++ /* Automatically done by z_settings_combo_box_new but the widget is ++ built by GtkBuilder so this function cannot be used. */ ++ z_settings_signal_connect (window_settings, "toolbar-style", ++ G_CALLBACK (style_menu_changed), combobox); + + /* Get global setting */ +- str = gconf_client_get_string +- (gconf_client, "/desktop/gnome/interface/toolbar_style", NULL); +- +- if (str != NULL) +- { +- if (!gconf_string_to_enum (toolbar_styles, str, (gint *) &toolbar_style)) +- toolbar_style = GTK_TOOLBAR_BOTH; +- +- g_free (str); +- } ++ desktop_settings = g_settings_new ("org.gnome.desktop.interface"); ++ value = g_settings_get_enum (desktop_settings, "toolbar-style"); ++ toolbar_style = toolbar_enum_to_style (value); ++ g_object_unref (desktop_settings); + + switch (toolbar_style) + { +@@ -946,34 +952,9 @@ + gtk_widget_show_all (combobox); + + /* Now select the correct menu according to our preferences */ +- key = "/apps/gnome-settings/" PACKAGE "/toolbar_style"; +- str = gconf_client_get_string (gconf_client, key, NULL); +- +- if (str == NULL) +- { +- /* We have no per-app setting, so the global one must be right. */ +- gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), 4); +- } +- else +- { +- if (!gconf_string_to_enum (toolbar_styles, str, (gint *) &toolbar_style)) +- toolbar_style = GTK_TOOLBAR_BOTH; ++ value = g_settings_get_enum (window_settings, "toolbar-style"); + +- /* We have a per-app setting, find out which one it is */ +- switch (toolbar_style) +- { +- case GTK_TOOLBAR_BOTH: +- case GTK_TOOLBAR_BOTH_HORIZ: +- case GTK_TOOLBAR_ICONS: +- case GTK_TOOLBAR_TEXT: +- gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), toolbar_style); +- break; +- default: +- g_assert_not_reached (); +- } +- +- g_free (str); +- } ++ gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), value); + } + + /* Main window */ +@@ -1173,7 +1154,7 @@ + { + gchar *str; + +- if (z_gconf_get_string (&str, "/apps/zapping/window/chroma_key_color")) ++ if (z_settings_get_string (&str, window_settings, "chroma-key-color")) + { + GdkRGBA color; + +--- zapping.orig/plugins/teletext/window.c ++++ zapping/plugins/teletext/window.c +@@ -1019,8 +1019,7 @@ + + toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action + (window->action_group, "ViewToolbar")); +- z_toggle_action_connect_gconf_key +- (toggle_action, "/apps/zapping/plugins/teletext/window/view_toolbar"); ++ z_toggle_action_connect_key (toggle_action, win_settings, "view-toolbar"); + /* Adds the toolbar if necessary. */ + view_toolbar_action (toggle_action, window); + } +@@ -1031,8 +1030,8 @@ + toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action + (window->action_group, + "ViewStatusbar")); +- z_toggle_action_connect_gconf_key +- (toggle_action, "/apps/zapping/plugins/teletext/window/view_statusbar"); ++ z_toggle_action_connect_key (toggle_action, win_settings, ++ "view-statusbar"); + /* Adds the status bar if necessary. */ + view_statusbar_action (toggle_action, window); + } +--- zapping.orig/src/zmisc.c ++++ zapping/src/zmisc.c +@@ -470,7 +470,7 @@ + new_dmode, new_cmode); + + timeout = 0; /* disabled */ +- z_gconf_get_int (&timeout, "/apps/zapping/blank_cursor_timeout"); ++ z_settings_get_int (&timeout, gsettings, "blank-cursor-timeout"); + + if (zapping->display_mode == new_dmode + && tv_get_capture_mode (info) == new_cmode) +--- zapping.orig/src/zapping.c ++++ zapping/src/zapping.c +@@ -873,8 +873,8 @@ + GtkToggleAction *toggle_action; + + toggle_action = GTK_TOGGLE_ACTION (action); +- z_toggle_action_connect_gconf_key (toggle_action, +- "/apps/zapping/window/keep_on_top"); ++ z_toggle_action_connect_key (toggle_action, window_settings, ++ "keep-on-top"); + /* Window is mapped now, set the initial state. */ + keep_window_on_top_action (toggle_action, z); + } +@@ -1019,8 +1019,7 @@ + toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action + (z->generic_action_group, + "ViewMenu")); +- z_toggle_action_connect_gconf_key (toggle_action, +- "/apps/zapping/window/view_menu"); ++ z_toggle_action_connect_key (toggle_action, window_settings, "view-menu"); + /* Adds the menu if necessary. */ + view_menu_action (toggle_action, z); + } +@@ -1032,8 +1031,8 @@ + toggle_action = GTK_TOGGLE_ACTION (gtk_action_group_get_action + (z->generic_action_group, + "ViewToolbar")); +- z_toggle_action_connect_gconf_key (toggle_action, +- "/apps/zapping/window/view_toolbar"); ++ z_toggle_action_connect_key (toggle_action, window_settings, ++ "view-toolbar"); + /* Adds the toolbar if necessary. */ + view_toolbar_action (toggle_action, z); + } +--- zapping.orig/po/POTFILES.in ++++ zapping/po/POTFILES.in +@@ -75,7 +75,7 @@ + src/zspinslider.c + src/zvbi.c + zapping.desktop.in +-zapping.schemas.in ++net.sf.Zapping.gschema.xml + zapping_setup_fb/zapping_setup_fb.c + zapping_setup_fb/zapping_setup_fb.h + zapping_setup_fb/v4l.c +--- /dev/null ++++ zapping/net.sf.Zapping.gschema.xml +@@ -0,0 +1,451 @@ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 1500 ++ Time to wait until blanking the pointer. ++ This is the time in milliseconds Zapping will wait ++ between pointer movements and blanking the pointer when over the ++ video. A value of zero disables this feature. ++ ++ ++ ++ ++ ++ ++ true ++ Show a menu bar in the main window. ++ ++ ++ true ++ Show a toolbar in the main window. ++ ++ ++ 'desktop-default' ++ Style of the toolbar. Valid values: both, both-horiz, ++ icons, text and desktop-defaul. ++ ++ ++ false ++ Keep the main window above other windows. ++ ++ ++ 'rgb(255,204,204)' ++ Color for chroma-key overlay (rgb(r,g,b)), default ++ rgb(255,204,204). ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 'western_and_central_europe' ++ Default Teletext character set. ++ Some stations fail to transmit a complete language ++ identifier, so the Teletext viewer may not display the correct ++ font or national characters. You can select your geographical ++ region here as an additional hint. Valid values: ++ western_and_central_europe, eastern_europe, ++ western_europe_and_turkey, central_and_southeast_europe, ++ cyrillic, greek_and_turkish, arabic, ++ hebrew_and_arabic. ++ ++ ++ '2.5' ++ Teletext implementation level. ++ Teletext implementation level. Valid values: 1.0, ++ 1.5, 2.5, 3.5. ++ ++ ++ 100 ++ Default Teletext home page. ++ Default Teletext home page, usually 100. Valid ++ values range from 100 to 899. ++ ++ ++ 1024000 ++ Maximum size of the Teletext page cache in bytes. ++ ++ ++ 1 ++ Maximum number of networks in the Teletext page cache. ++ ++ ++ ++ ++ ++ ++ ++ 'hyper' ++ Teletext page scaling quality. ++ Quality/speed trade-off when scaling and ++ anti-aliasing Teletext pages. Valid values: nearest, tiles, ++ bilinear, hyper. ++ ++ ++ true ++ Roll Teletext page numbers. ++ Roll the Teletext page number in the page header ++ until the requested page has arrived. ++ ++ ++ true ++ Update the clock in the Teletext page header. ++ ++ ++ 128 ++ Text brightness, valid values range from 0 to 255. ++ ++ ++ 64 ++ Text contrast, valid values range from -128 to 127. ++ ++ ++ 'flof_top2' ++ Enable navigation elements. ++ Enable navigation elements in the bottom row of the ++ Teletext page. Valid values: disabled, flof_top1 (FLOF or TOP ++ style 1), flof_top2 (TOP style 2). ++ ++ ++ ++ ++ true ++ Show a toolbar in Teletext windows. ++ ++ ++ true ++ Show a status bar in Teletext windows. ++ ++ ++ ++ ++ true ++ Interpret the Teletext search text as regular ++ expression. ++ ++ ++ false ++ The Teletext search is case insensitive. ++ ++ ++ false ++ Search all channels in the Teletext page memory. ++ ++ ++ ++ ++ false ++ Reverse the temporal field order. ++ ++ ++ 0.45 ++ Display delay of second field (0.0 to 1.0 of one frame ++ period). ++ ++ ++ 'high' ++ Horizontal image resolution in deinterlace mode. ++ When your CPU is too slow to use the desired ++ deinterlace mode you can reduce the horizontal resolution. Valid ++ values: low, medium, high. ++ ++ ++ 'disabled' ++ Deinterlace method. ++ Deinterlace method. Valid values are: disabled, ++ VideoBob, VideoWeave, TwoFrame, Weave, Bob, ScalerBob, EvenOnly, ++ OddOnly, Greedy, Greedy2Frame, GreedyH, TomsMoComp, ++ MoComp2 ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ 625 ++ Deinterlace option. ++ ++ ++ 73 ++ Deinterlace option. ++ ++ ++ 300 ++ Deinterlace option. ++ ++ ++ 600 ++ Deinterlace option. ++ ++ ++ 25 ++ Deinterlace option. ++ ++ ++ 600 ++ Deinterlace option. ++ ++ ++ 300 ++ Deinterlace option. ++ ++ ++ -15 ++ Deinterlace option. ++ ++ ++ 17 ++ Deinterlace option. ++ ++ ++ 20 ++ Deinterlace option. ++ ++ ++ 0 ++ Deinterlace option. ++ ++ ++ 27 ++ Deinterlace option. ++ ++ ++ 0 ++ Deinterlace option. ++ ++ ++ 20 ++ Deinterlace option. ++ ++ ++ 10 ++ Deinterlace option. ++ ++ ++ 0 ++ Deinterlace option. ++ ++ ++ 0 ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ true ++ Deinterlace option. ++ ++ ++ true ++ Deinterlace option. ++ ++ ++ 15 ++ Deinterlace option. ++ ++ ++ 4 ++ Deinterlace option. ++ ++ ++ 8 ++ Deinterlace option. ++ ++ ++ 25 ++ Deinterlace option. ++ ++ ++ 30 ++ Deinterlace option. ++ ++ ++ 83 ++ Deinterlace option. ++ ++ ++ 88 ++ Deinterlace option. ++ ++ ++ 50 ++ Deinterlace option. ++ ++ ++ 23 ++ Deinterlace option. ++ ++ ++ 5 ++ Deinterlace option. ++ ++ ++ 0 ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ 5 ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ 1 ++ Deinterlace option. ++ ++ ++ false ++ Greedy (high motion) deinterlace test mode. ++ Enables slow MMX and 3DNow! optimized functions for ++ tests. ++ ++ ++ ++ ++ 300 ++ Deinterlace option. ++ ++ ++ false ++ Deinterlace option. ++ ++ ++ ++ ++ false ++ Switch to full capture size for screenshot. ++ ++ ++ ++ ++ 'western_and_central_europe' ++ Default Teletext character set. ++ Some stations fail to transmit a complete language ++ identifier, so the Teletext viewer may not display the correct ++ font or national characters. You can select your geographical ++ region here as an additional hint. Valid values: ++ western_and_central_europe, eastern_europe, ++ western_europe_and_turkey, central_and_southeast_europe, ++ cyrillic, greek_and_turkish, arabic, ++ hebrew_and_arabic. ++ ++ ++ 'bilinear' ++ Caption/subtitle scaling quality. ++ Quality/speed trade-off when scaling and ++ anti-aliasing caption/subtitles. Valid values: nearest, tiles, ++ bilinear, hyper. ++ ++ ++ true ++ Pad Closed Caption text with spaces. ++ Adds spaces around words in Closed Caption text to ++ improve legibility. ++ ++ ++ true ++ Enable smooth rolling of real time Closed Caption. ++ ++ ++ 'rgb(255,255,255)' ++ Closed Caption default foreground color. ++ Default foreground color of Closed Caption text ++ (rgb(r,g,b)), default rgb(255,255,255) (white). ++ ++ ++ 'rgb(0,0,0)' ++ Closed Caption default background color. ++ Default background color of Closed Caption text ++ (rgb(r,g,b)), default rgb(0,0,0) (black). ++ ++ ++ 128 ++ Text brightness, valid values range from 0 to 255. ++ ++ ++ 64 ++ Text contrast, valid values range from -128 to 127. ++ ++ ++ true ++ Show double height characters in Teletext subtitles. ++ ++ ++ +--- zapping.orig/zapping.schemas.in ++++ /dev/null +@@ -1,828 +0,0 @@ +- +- +- +- /schemas/apps/zapping/window/view_menu +- /apps/zapping/window/view_menu +- Zapping +- bool +- 1 +- +- Show a menu bar in the main window. +- +- +- +- /schemas/apps/zapping/window/view_toolbar +- /apps/zapping/window/view_toolbar +- Zapping +- bool +- 1 +- +- Show a toolbar in the main window. +- +- +- +- /schemas/apps/zapping/window/keep_on_top +- /apps/zapping/window/keep_on_top +- Zapping +- bool +- 0 +- +- Keep the main window above other windows. +- +- +- +- +- /schemas/apps/zapping/plugins/teletext/default_charset +- /apps/zapping/plugins/teletext/default_charset +- Zapping +- string +- western_central_europe +- +- Default Teletext character set. +- Some stations fail to transmit a complete language +- identifier, so the Teletext viewer may not display the correct font +- or national characters. You can select your geographical region here +- as an additional hint. Valid values: western_and_central_europe, +- eastern_europe, western_europe_and_turkey, central_and_southeast_europe, +- cyrillic, greek_and_turkish, arabic, hebrew_and_arabic. +- +- +- +- /schemas/apps/zapping/plugins/teletext/level +- /apps/zapping/plugins/teletext/level +- Zapping +- string +- 2.5 +- +- Teletext implementation level. +- Teletext implementation level. Valid values: 1, 1.5, +- 2.5, 3.5. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/interp_type +- /apps/zapping/plugins/teletext/view/interp_type +- Zapping +- string +- hyper +- +- Teletext page scaling quality. +- Quality/speed trade-off when scaling and anti-aliasing Teletext +- pages. Valid values: nearest, tiles, bilinear, hyper. +- +- +- +- /schemas/apps/zapping/plugins/teletext/home_page +- /apps/zapping/plugins/teletext/home_page +- Zapping +- int +- 100 +- +- Default Teletext home page. +- Default Teletext home page, usually 100. Valid values range +- from 100 to 899. +- +- +- +- /schemas/apps/zapping/plugins/teletext/window/view_toolbar +- /apps/zapping/plugins/teletext/window/view_toolbar +- Zapping +- bool +- 1 +- +- Show a toolbar in Teletext windows. +- +- +- +- /schemas/apps/zapping/plugins/teletext/window/view_statusbar +- /apps/zapping/plugins/teletext/window/view_statusbar +- Zapping +- bool +- 1 +- +- Show a status bar in Teletext windows. +- +- +- +- /schemas/apps/zapping/blank_cursor_timeout +- /apps/zapping/blank_cursor_timeout +- Zapping +- int +- 1500 +- +- Time to wait until blanking the pointer. +- This is the time in milliseconds Zapping will wait between +- pointer movements and blanking the pointer when over the video. A +- value of zero disables this feature. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/rolling_header +- /apps/zapping/plugins/teletext/view/rolling_header +- Zapping +- bool +- 1 +- +- Roll Teletext page numbers. +- Roll the Teletext page number in the page header until the +-requested page has arrived. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/live_clock +- /apps/zapping/plugins/teletext/view/live_clock +- Zapping +- bool +- 1 +- +- Update the clock in the Teletext page header. +- +- +- +- /schemas/apps/zapping/plugins/teletext/cache_size +- /apps/zapping/plugins/teletext/cache_size +- Zapping +- int +- 1024000 +- +- Maximum size of the Teletext page cache in bytes. +- +- +- +- /schemas/apps/zapping/plugins/teletext/cache_networks +- /apps/zapping/plugins/teletext/cache_networks +- Zapping +- int +- 1 +- +- Maximum number of networks in the Teletext page cache. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/brightness +- /apps/zapping/plugins/teletext/view/brightness +- Zapping +- int +- 128 +- +- Text brightness, valid values range from 0 to 255. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/contrast +- /apps/zapping/plugins/teletext/view/contrast +- Zapping +- int +- 64 +- +- Text contrast, valid values range from -128 to 127. +- +- +- +- /schemas/apps/zapping/plugins/teletext/search/regexp +- /apps/zapping/plugins/teletext/search/regexp +- Zapping +- bool +- 1 +- +- Interpret the Teletext search text as regular expression. +- +- +- +- /schemas/apps/zapping/plugins/teletext/search/casefold +- /apps/zapping/plugins/teletext/search/casefold +- Zapping +- bool +- 0 +- +- The Teletext search is case insensitive. +- +- +- +- /schemas/apps/zapping/plugins/teletext/search/all_channels +- /apps/zapping/plugins/teletext/search/all_channels +- Zapping +- bool +- 0 +- +- Search all channels in the Teletext page memory. +- +- +- +- /schemas/apps/zapping/plugins/teletext/view/navigation +- /apps/zapping/plugins/teletext/view/navigation +- Zapping +- string +- flof_top2 +- +- Enable navigation elements. +- Enable navigation elements in the bottom row of the Teletext +- page. Valid values: disabled, flof_top1 (FLOF or TOP style 1), +- flof_top2 (TOP style 2). +- +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/EdgeDetect +- /apps/zapping/plugins/deinterlace/options/Deinterlace/EdgeDetect +- Zapping +- int +- 625 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/JaggieThreshold +- /apps/zapping/plugins/deinterlace/options/Deinterlace/JaggieThreshold +- Zapping +- int +- 73 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TemporalTolerance +- /apps/zapping/plugins/deinterlace/options/Deinterlace/TemporalTolerance +- Zapping +- int +- 300 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SpatialTolerance +- /apps/zapping/plugins/deinterlace/options/Deinterlace/SpatialTolerance +- Zapping +- int +- 600 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SimilarityThreshold +- /apps/zapping/plugins/deinterlace/options/Deinterlace/SimilarityThreshold +- Zapping +- int +- 25 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameSpatialTolerance +- /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameSpatialTolerance +- Zapping +- int +- 600 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameTemporalTolerance +- /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameTemporalTolerance +- Zapping +- int +- 300 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMinimumClip +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMinimumClip +- Zapping +- int +- -15 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelMotionSense +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelMotionSense +- Zapping +- int +- 17 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMotionAvgPeriod +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMotionAvgPeriod +- Zapping +- int +- 20 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentMotionSense +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentMotionSense +- Zapping +- int +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelCombSense +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelCombSense +- Zapping +- int +- 27 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentCombSense +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentCombSense +- Zapping +- int +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcCombAvgPeriod +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcCombAvgPeriod +- Zapping +- int +- 20 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcHighCombSkip +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcHighCombSkip +- Zapping +- int +- 10 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcLowMotionSkip +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcLowMotionSkip +- Zapping +- int +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcVerticalSmoothing +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcVerticalSmoothing +- Zapping +- int +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcUseInterpBob +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcUseInterpBob +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcBlendChroma +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcBlendChroma +- Zapping +- bool +- 1 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/BlcShowControls +- /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcShowControls +- Zapping +- bool +- 1 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb +- Zapping +- int +- 15 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold +- Zapping +- int +- 4 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold2 +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold2 +- Zapping +- int +- 8 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb +- Zapping +- int +- 5 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionThreshold +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionThreshold +- Zapping +- int +- 25 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionSense +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionSense +- Zapping +- int +- 30 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyGoodPullDownLvl +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyGoodPullDownLvl +- Zapping +- int +- 83 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyBadPullDownLvl +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyBadPullDownLvl +- Zapping +- int +- 88 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyHSharpnessAmt +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyHSharpnessAmt +- Zapping +- int +- 50 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyVHSharpnessAmt +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyVHSharpnessAmt +- Zapping +- int +- 23 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMedianFilterAmt +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMedianFilterAmt +- Zapping +- int +- 5 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyLowMotionPdLvl +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyLowMotionPdLvl +- Zapping +- int +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUsePulldown +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUsePulldown +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseInBetween +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseInBetween +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseMedianFilter +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseMedianFilter +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseVSharpness +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseVSharpness +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseHSharpness +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseHSharpness +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/DI_OldGame/maxComb +- /apps/zapping/plugins/deinterlace/options/DI_OldGame/maxComb +- Zapping +- int +- 300 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/DI_OldGame/CompositeMode +- /apps/zapping/plugins/deinterlace/options/DI_OldGame/CompositeMode +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/SearchEffort +- /apps/zapping/plugins/deinterlace/options/Deinterlace/SearchEffort +- Zapping +- int +- 5 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/UseStrangeBob +- /apps/zapping/plugins/deinterlace/options/Deinterlace/UseStrangeBob +- Zapping +- bool +- 0 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/MoComp2SE +- /apps/zapping/plugins/deinterlace/options/Deinterlace/MoComp2SE +- Zapping +- int +- 1 +- +- Deinterlace option. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/reverse_fields +- /apps/zapping/plugins/deinterlace/reverse_fields +- Zapping +- bool +- 0 +- +- Reverse the temporal field order. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/field_balance +- /apps/zapping/plugins/deinterlace/field_balance +- Zapping +- float +- 0.45 +- +- Display delay of second field (0.0 to 1.0 of one frame +-period). +- +- +- +- /schemas/apps/zapping/plugins/screenshot/full_size +- /apps/zapping/plugins/screenshot/full_size +- Zapping +- bool +- 0 +- +- Switch to full capture size for screenshot. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/resolution +- /apps/zapping/plugins/deinterlace/resolution +- Zapping +- string +- high +- +- Horizontal image resolution in deinterlace mode. +- When your CPU is too slow to use the desired deinterlace mode +-you can reduce the horizontal resolution. Valid values: low, medium, +-high. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTestMode +- /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTestMode +- Zapping +- bool +- 0 +- +- Greedy (high motion) deinterlace test mode. +- Enables slow MMX and 3DNow! optimized functions for +-tests. +- +- +- +- +- /schemas/apps/zapping/plugins/subtitle/default_charset +- /apps/zapping/plugins/subtitle/default_charset +- Zapping +- string +- western_central_europe +- +- Default Teletext character set. +- Some stations fail to transmit a complete language +- identifier, so the Teletext viewer may not display the correct font +- or national characters. You can select your geographical region here +- as an additional hint. Valid values: western_and_central_europe, +- eastern_europe, western_europe_and_turkey, central_and_southeast_europe, +- cyrillic, greek_and_turkish, arabic, hebrew_and_arabic. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/interp_type +- /apps/zapping/plugins/subtitle/interp_type +- Zapping +- string +- bilinear +- +- Caption/subtitle scaling quality. +- Quality/speed trade-off when scaling and anti-aliasing +- caption/subtitles. Valid values: nearest, tiles, bilinear, hyper. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/pad +- /apps/zapping/plugins/subtitle/pad +- Zapping +- bool +- 1 +- +- Pad Closed Caption text with spaces. +- Adds spaces around words in Closed Caption text to improve legibility. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/roll +- /apps/zapping/plugins/subtitle/roll +- Zapping +- bool +- 1 +- +- Enable smooth rolling of real time Closed Caption. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/foreground +- /apps/zapping/plugins/subtitle/foreground +- Zapping +- string +- #FFFFFF +- +- Closed Caption default foreground color. +- Default foreground color of Closed Caption text (#RRGGBB), default #FFFFFF. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/background +- /apps/zapping/plugins/subtitle/background +- Zapping +- string +- #000000 +- +- Closed Caption default background color. +- Default background color of Closed Caption text (#RRGGBB), default #000000. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/brightness +- /apps/zapping/plugins/subtitle/brightness +- Zapping +- int +- 128 +- +- Text brightness, valid values range from 0 to 255. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/contrast +- /apps/zapping/plugins/subtitle/contrast +- Zapping +- int +- 64 +- +- Text contrast, valid values range from -128 to 127. +- +- +- +- /schemas/apps/zapping/plugins/subtitle/show_dheight +- /apps/zapping/plugins/subtitle/show_dheight +- Zapping +- bool +- 1 +- +- Show double height characters in Teletext subtitles. +- +- +- +- /schemas/apps/zapping/window/chroma_key_color +- /apps/zapping/window/chroma_key_color +- Zapping +- string +- #FFCCCC +- +- Color for chroma-key overlay (#RRGGBB), default #FFCCCC. +- +- +- +- /schemas/apps/zapping/plugins/deinterlace/method +- /apps/zapping/plugins/deinterlace/method +- Zapping +- string +- disabled +- +- Deinterlace method. +- Deinterlace method. Valid values are: disabled, VideoBob, +- VideoWeave, TwoFrame, Weave, Bob, ScalerBob, EvenOnly, OddOnly, +- Greedy, Greedy2Frame, GreedyH, TomsMoComp, MoComp2 +- +- +- +- +- +--- /dev/null ++++ zapping/zapping.convert +@@ -0,0 +1,98 @@ ++[net.sf.Zapping] ++blank-cursor-timeout = /apps/zapping/blank_cursor_timeout ++ ++[net.sf.Zapping.window] ++view-menu = /apps/zapping/window/view_menu ++view-toolbar = /apps/zapping/window/view_toolbar ++keep-on-top = /apps/zapping/window/keep_on_top ++chroma-key-color = /apps/zapping/window/chroma_key_color ++ ++[net.sf.Zapping.plugins.teletext] ++default-charset = /apps/zapping/plugins/teletext/default_charset ++level = /apps/zapping/plugins/teletext/level ++home-page = /apps/zapping/plugins/teletext/home_page ++cache-size = /apps/zapping/plugins/teletext/cache_size ++cache-networks = /apps/zapping/plugins/teletext/cache_networks ++ ++[net.sf.Zapping.plugins.teletext.view] ++interp-type = /apps/zapping/plugins/teletext/view/interp_type ++rolling-header = /apps/zapping/plugins/teletext/view/rolling_header ++live-clock = /apps/zapping/plugins/teletext/view/live_clock ++brightness = /apps/zapping/plugins/teletext/view/brightness ++contrast = /apps/zapping/plugins/teletext/view/contrast ++navigation = /apps/zapping/plugins/teletext/view/navigation ++ ++[net.sf.Zapping.plugins.teletext.window] ++view-toolbar = /apps/zapping/plugins/teletext/window/view_toolbar ++view-statusbar = /apps/zapping/plugins/teletext/window/view_statusbar ++ ++[net.sf.Zapping.plugins.teletext.search] ++regexp = /apps/zapping/plugins/teletext/search/regexp ++casefold = /apps/zapping/plugins/teletext/search/casefold ++all-channels = /apps/zapping/plugins/teletext/search/all_channels ++ ++[net.sf.Zapping.plugins.deinterlace] ++reverse-fields = /apps/zapping/plugins/deinterlace/reverse_fields ++field-balance = /apps/zapping/plugins/deinterlace/field_balance ++resolution = /apps/zapping/plugins/deinterlace/resolution ++method = /apps/zapping/plugins/deinterlace/method ++ ++[net.sf.Zapping.plugins.deinterlace.options.Deinterlace] ++edgedetect = /apps/zapping/plugins/deinterlace/options/Deinterlace/EdgeDetect ++jaggiethreshold = /apps/zapping/plugins/deinterlace/options/Deinterlace/JaggieThreshold ++temporaltolerance = /apps/zapping/plugins/deinterlace/options/Deinterlace/TemporalTolerance ++spatialtolerance = /apps/zapping/plugins/deinterlace/options/Deinterlace/SpatialTolerance ++similaritythreshold = /apps/zapping/plugins/deinterlace/options/Deinterlace/SimilarityThreshold ++twoframespatialtolerance = /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameSpatialTolerance ++twoframetemporaltolerance = /apps/zapping/plugins/deinterlace/options/Deinterlace/TwoFrameTemporalTolerance ++blcminimumclip = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMinimumClip ++blcpixelmotionsense = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelMotionSense ++blcmotionavgperiod = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcMotionAvgPeriod ++blcrecentmotionsense = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentMotionSense ++blcpixelcombsense = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcPixelCombSense ++blcrecentcombsense = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcRecentCombSense ++blccombavgperiod = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcCombAvgPeriod ++blchighcombskip = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcHighCombSkip ++blclowmotionskip = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcLowMotionSkip ++blcverticalsmoothing = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcVerticalSmoothing ++blcuseinterpbob = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcUseInterpBob ++blcblendchroma = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcBlendChroma ++blcshowcontrols = /apps/zapping/plugins/deinterlace/options/Deinterlace/BlcShowControls ++greedymaxcomb = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMaxComb ++greedytwoframethreshold = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold ++greedytwoframethreshold2 = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTwoFrameThreshold2 ++greedymotionthreshold = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionThreshold ++greedymotionsense = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMotionSense ++greedygoodpulldownlvl = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyGoodPullDownLvl ++greedybadpulldownlvl = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyBadPullDownLvl ++greedyhsharpnessamt = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyHSharpnessAmt ++greedyvhsharpnessamt = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyVHSharpnessAmt ++greedymedianfilteramt = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyMedianFilterAmt ++greedylowmotionpdlvl = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyLowMotionPdLvl ++greedyusepulldown = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUsePulldown ++greedyuseinbetween = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseInBetween ++greedyusemedianfilter = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseMedianFilter ++greedyusevsharpness = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseVSharpness ++greedyusehsharpness = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyUseHSharpness ++searcheffort = /apps/zapping/plugins/deinterlace/options/Deinterlace/SearchEffort ++usestrangebob = /apps/zapping/plugins/deinterlace/options/Deinterlace/UseStrangeBob ++mocomp2se = /apps/zapping/plugins/deinterlace/options/Deinterlace/MoComp2SE ++greedytestmode = /apps/zapping/plugins/deinterlace/options/Deinterlace/GreedyTestMode ++ ++[net.sf.Zapping.plugins.deinterlace.options.DI-OldGame] ++maxcomb = /apps/zapping/plugins/deinterlace/options/DI_OldGame/maxComb ++compositemode = /apps/zapping/plugins/deinterlace/options/DI_OldGame/CompositeMode ++ ++[net.sf.Zapping.plugins.screenshot] ++full-size = /apps/zapping/plugins/screenshot/full_size ++ ++[net.sf.Zapping.plugins.subtitle] ++default-charset = /apps/zapping/plugins/subtitle/default_charset ++interp-type = /apps/zapping/plugins/subtitle/interp_type ++pad = /apps/zapping/plugins/subtitle/pad ++roll = /apps/zapping/plugins/subtitle/roll ++foreground = /apps/zapping/plugins/subtitle/foreground ++background = /apps/zapping/plugins/subtitle/background ++brightness = /apps/zapping/plugins/subtitle/brightness ++contrast = /apps/zapping/plugins/subtitle/contrast ++show-dheight = /apps/zapping/plugins/subtitle/show_dheight diff -Nru zapping-0.10~cvs6/debian/patches/25-Disable-mpeg-plugin.patch zapping-0.10~cvs6/debian/patches/25-Disable-mpeg-plugin.patch --- zapping-0.10~cvs6/debian/patches/25-Disable-mpeg-plugin.patch 1970-01-01 00:00:00.000000000 +0000 +++ zapping-0.10~cvs6/debian/patches/25-Disable-mpeg-plugin.patch 2018-09-25 08:16:32.000000000 +0000 @@ -0,0 +1,40 @@ +Description: Put mpeg plugin inside AM_CONDITIONAL. +Author: Yavor Doganov +Forwarded: no +Last-Update: 2018-09-18 +--- + +--- zapping.orig/configure.in ++++ zapping/configure.in +@@ -757,6 +757,8 @@ + AC_SUBST(RTE_LIBS) + LIBS="$SAVE_LIBS" + ++AM_CONDITIONAL([HAVE_LIBRTE], [test "x$HAVE_RTE" = "xyes"]) ++ + dnl --------------------------------------------------------------------------- + dnl lirc_client library (remote controls) + dnl --------------------------------------------------------------------------- +--- zapping.orig/plugins/Makefile.am ++++ zapping/plugins/Makefile.am +@@ -2,14 +2,18 @@ + + SUBDIRS = \ + alirc \ +- screenshot \ +- mpeg ++ screenshot + + # Presently it works only with V4L2 drivers. + if BUILD_DEINTERLACE_PLUGIN + SUBDIRS += deinterlace + endif + ++# The mpeg plugin depends on librte. ++if HAVE_LIBRTE ++SUBDIRS += mpeg ++endif ++ + # Need libzvbi 0.2.x to build this module. + if HAVE_LIBZVBI + SUBDIRS += \ diff -Nru zapping-0.10~cvs6/debian/patches/series zapping-0.10~cvs6/debian/patches/series --- zapping-0.10~cvs6/debian/patches/series 2017-12-29 15:57:49.000000000 +0000 +++ zapping-0.10~cvs6/debian/patches/series 2018-09-25 08:16:25.000000000 +0000 @@ -21,3 +21,6 @@ 20-Check-return-value.patch 21-GnomeVFS-to-GIO.patch 22-gnome-common-deprecated.patch +23-GnomeUI-to-GTK3.patch +24-GConf-to-GSettings.patch +25-Disable-mpeg-plugin.patch diff -Nru zapping-0.10~cvs6/debian/rules zapping-0.10~cvs6/debian/rules --- zapping-0.10~cvs6/debian/rules 2017-12-29 19:36:33.000000000 +0000 +++ zapping-0.10~cvs6/debian/rules 2018-09-25 08:24:48.000000000 +0000 @@ -17,15 +17,18 @@ CONFIGFLAG += --enable-bktr endif +ifeq ($(DEB_BUILD_ARCH_OS),hurd) +export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/freebsd +endif + %: dh $@ --builddirectory=$(BDIR) override_dh_auto_configure: dh_auto_configure -- $(CONFIGFLAG) \ + ac_cv_path_CONSOLEHELPER_LOCATION=/usr/bin/consolehelper \ --enable-pam \ - --enable-compile-warnings=yes \ - --disable-schemas-install \ - --with-gconf-schema-file-dir=\$${prefix}/share/gconf/schemas + --enable-compile-warnings=yes mv $(BDIR)/libtool $(BDIR)/libtool.old sed -e '/^archive_cmds/{ s/="\\$$CC -shared /&$${wl}--as-needed /;s/ [^ ]*soname[^ ]*/ /g; }' < \ @@ -41,13 +44,14 @@ override_dh_auto_install: dh_auto_install -- MKINSTALLDIRS="install -d" $(RM) debian/zapping/usr/lib/zapping/plugins/*.la +# Upstream's build system assumes that consolehelper is used but that +# is no longer necessary. + mv debian/zapping/usr/sbin/zapping_setup_fb debian/zapping/usr/bin + rmdir debian/zapping/usr/sbin override_dh_installdocs: dh_installdocs dh_buildinfo -override_dh_fixperms: - dh_fixperms -Xzapping_setup_fb - override_dh_strip: dh_strip --dbgsym-migration='zapping-dbg (<< 0.10~cvs6-12~)'