[pan2/merge_xzver_mt: 2/2] gtk3



commit 5a6b30d823a2720db0f16ae3de8a2fefcc127dc9
Author: Heinrich MÃller <henmull src gnome org>
Date:   Sat Jul 14 13:28:07 2012 +0200

    gtk3

 pan/data-impl/data-impl.h  |    3 ++
 pan/gui/body-pane.cc       |    6 ++--
 pan/gui/e-charset-dialog.c |    4 +-
 pan/gui/e-cte-dialog.c     |    4 +-
 pan/gui/gtk-compat.h       |   77 ++++++++++++++++++++++++++++++++++++--------
 pan/gui/gui.cc             |    6 ++--
 pan/gui/pan-file-entry.cc  |    2 +-
 pan/gui/post-ui.cc         |   22 ++++++------
 pan/gui/prefs-ui.cc        |   30 ++++++++--------
 pan/gui/profiles-dialog.cc |    8 ++--
 pan/gui/save-attach-ui.cc  |    2 +-
 pan/gui/save-ui.cc         |    2 +-
 pan/gui/score-add-ui.cc    |    8 ++--
 pan/gui/score-view-ui.cc   |    6 ++--
 pan/gui/server-ui.cc       |    8 ++--
 pan/gui/task-pane.cc       |   20 ++++++------
 pan/tasks/decoder.h        |    2 +
 17 files changed, 132 insertions(+), 78 deletions(-)
---
diff --git a/pan/data-impl/data-impl.h b/pan/data-impl/data-impl.h
index 83de650..d19ec0f 100644
--- a/pan/data-impl/data-impl.h
+++ b/pan/data-impl/data-impl.h
@@ -165,6 +165,9 @@ namespace pan
       virtual void set_server_article_expiration_age  (const Quark  & server,
                                                        int            days);
 
+      virtual void set_server_compression_type  (const Quark   & server,
+                                                 const int       setme);
+
       virtual void save_server_info (const Quark& server);
 
     public: // accessors
diff --git a/pan/gui/body-pane.cc b/pan/gui/body-pane.cc
index f1b8493..3d0f01f 100644
--- a/pan/gui/body-pane.cc
+++ b/pan/gui/body-pane.cc
@@ -1555,7 +1555,7 @@ BodyPane :: new_attachment (const char* filename)
 {
   if (!filename) return 0;
 
-  GtkWidget* w = gtk_hbox_new(false, 0);
+  GtkWidget* w = hbox_new(false, 0);
   GtkWidget* attachment = gtk_label_new(filename);
   GtkWidget * image = gtk_image_new_from_stock(GTK_STOCK_FILE, GTK_ICON_SIZE_MENU);
 
@@ -1692,7 +1692,7 @@ BodyPane :: BodyPane (Data& data, ArticleCache& cache, Prefs& prefs, GroupPrefs
   gtk_menu_shell_append (GTK_MENU_SHELL(_menu),l);
   gtk_widget_show_all(_menu);
 
-  GtkWidget * vbox = gtk_vbox_new (false, PAD);
+  GtkWidget * vbox = vbox_new (false, PAD);
   gtk_container_set_resize_mode (GTK_CONTAINER(vbox), GTK_RESIZE_QUEUE);
 
   // about this expander... getting the ellipsis to work is a strange process.
@@ -1717,7 +1717,7 @@ BodyPane :: BodyPane (Data& data, ArticleCache& cache, Prefs& prefs, GroupPrefs
   gtk_widget_show (_terse);
   g_signal_connect (_terse, "button-press-event", G_CALLBACK(verbose_clicked_cb), this);
 
-  hbox = _verbose = gtk_hbox_new (false, 0);
+  hbox = _verbose = hbox_new (false, 0);
   g_object_ref_sink (G_OBJECT(_verbose));
   w = _headers = gtk_label_new ("Headers");
   gtk_label_set_selectable (GTK_LABEL(_headers), TRUE);
diff --git a/pan/gui/e-charset-dialog.c b/pan/gui/e-charset-dialog.c
index 4d4fcb5..4e5066c 100644
--- a/pan/gui/e-charset-dialog.c
+++ b/pan/gui/e-charset-dialog.c
@@ -53,7 +53,7 @@ e_charset_dialog (const char *title, const char *prompt,
 	//gtk_dialog_set_has_separator (dialog, FALSE);
 	gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
 
-	vbox = gtk_vbox_new (FALSE, 6);
+	vbox = vbox_new (FALSE, 6);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(dialog)), vbox, FALSE, FALSE, 0);
 	gtk_widget_show (vbox);
@@ -64,7 +64,7 @@ e_charset_dialog (const char *title, const char *prompt,
 	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show (label);
 
-	hbox = gtk_hbox_new (FALSE, 12);
+	hbox = hbox_new (FALSE, 12);
 	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 	gtk_widget_show (hbox);
 
diff --git a/pan/gui/e-cte-dialog.c b/pan/gui/e-cte-dialog.c
index e039d3a..27520f5 100644
--- a/pan/gui/e-cte-dialog.c
+++ b/pan/gui/e-cte-dialog.c
@@ -50,7 +50,7 @@ e_cte_dialog (const char *title, const char *prompt, GMimeContentEncoding now, G
 	//gtk_dialog_set_has_separator (dialog, FALSE);
 	gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
 
-	vbox = gtk_vbox_new (FALSE, 6);
+	vbox = vbox_new (FALSE, 6);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
 	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area(dialog)), vbox, FALSE, FALSE, 0);
 	gtk_widget_show (vbox);
@@ -61,7 +61,7 @@ e_cte_dialog (const char *title, const char *prompt, GMimeContentEncoding now, G
 	gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
 	gtk_widget_show (label);
 
-	hbox = gtk_hbox_new (FALSE, 12);
+	hbox = hbox_new (FALSE, 12);
 	gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
 	gtk_widget_show (hbox);
 
diff --git a/pan/gui/gtk-compat.h b/pan/gui/gtk-compat.h
index 72bf8ba..daa2d34 100644
--- a/pan/gui/gtk-compat.h
+++ b/pan/gui/gtk-compat.h
@@ -22,6 +22,69 @@
 namespace
 {
 #endif
+
+  #if GTK_CHECK_VERSION(3,0,0)
+
+  // include this for conversion of old key names to new
+    #include <gdk/gdkkeysyms-compat.h>
+
+    #define GTK_OBJECT(w) w
+    typedef GtkWidget GtkObject;
+    #ifdef GTK_DISABLE_DEPRECATED
+      static inline void gdk_cursor_unref(GdkCursor *p)
+      {
+        g_object_unref(p);
+      }
+    #endif
+  #endif
+
+  // convenience for gtk3 conversion
+  static inline GtkWidget* vbox_new (gboolean homogen, int space)
+  {
+    GtkWidget* ret;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    ret = gtk_vbox_new (homogen, space);
+#else
+    ret = gtk_box_new (GTK_ORIENTATION_VERTICAL, space);
+    gtk_box_set_homogeneous (GTK_BOX(ret), homogen);
+#endif
+    return ret;
+  }
+
+  static inline GtkWidget* hbox_new (gboolean homogen, int space)
+  {
+    GtkWidget* ret;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    ret = gtk_hbox_new (homogen, space);
+#else
+    ret = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, space);
+    gtk_box_set_homogeneous (GTK_BOX(ret), homogen);
+#endif
+    return ret;
+  }
+
+  static inline GtkWidget* hseparator_new()
+  {
+    GtkWidget* ret;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    ret = gtk_hseparator_new();
+#else
+    ret = gtk_separator_new(GTK_ORIENTATION_HORIZONTAL);
+#endif
+    return ret;
+  }
+
+  static inline GtkWidget* vseparator_new()
+  {
+    GtkWidget* ret;
+#if !GTK_CHECK_VERSION(3, 0, 0)
+    ret = gtk_vseparator_new();
+#else
+    ret = gtk_separator_new(GTK_ORIENTATION_VERTICAL);
+#endif
+    return ret;
+  }
+
 #if !GTK_CHECK_VERSION(2,18,0)
   static inline void gtk_widget_get_allocation( GtkWidget *w, GtkAllocation *a)
   {
@@ -126,20 +189,6 @@ namespace
     gtk_widget_modify_font(w,f);
   }
 #endif
-#if GTK_CHECK_VERSION(3,0,0)
-
-// include this for conversion of old key names to new
-#include <gdk/gdkkeysyms-compat.h>
-
-#define GTK_OBJECT(w) w
-  typedef GtkWidget GtkObject;
-#ifdef GTK_DISABLE_DEPRECATED
-  static inline void gdk_cursor_unref(GdkCursor *p)
-  {
-    g_object_unref(p);
-  }
-#endif
-#endif
 
 #ifdef __cplusplus
 }
diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc
index ffc508a..df79587 100644
--- a/pan/gui/gui.cc
+++ b/pan/gui/gui.cc
@@ -214,8 +214,8 @@ GUI :: GUI (Data& data, Queue& queue, Prefs& prefs, GroupPrefs& group_prefs):
   _group_prefs (group_prefs),
   _cache (data.get_cache()),
   _encode_cache (data.get_encode_cache()),
-  _root (gtk_vbox_new (FALSE, 0)),
-  _menu_vbox (gtk_vbox_new (FALSE, 0)),
+  _root (vbox_new (FALSE, 0)),
+  _menu_vbox (vbox_new (FALSE, 0)),
   _group_pane (0),
   _header_pane (0),
   _body_pane (0),
@@ -281,7 +281,7 @@ GUI :: GUI (Data& data, Queue& queue, Prefs& prefs, GroupPrefs& group_prefs):
   gtk_box_pack_start (GTK_BOX(_root), w, false, false, 0);
   gtk_widget_show (w);
 
-  GtkWidget * status_bar (gtk_hbox_new (FALSE, 0));
+  GtkWidget * status_bar (hbox_new (FALSE, 0));
 
   // connection status
   w = _connection_size_label = gtk_label_new (NULL);
diff --git a/pan/gui/pan-file-entry.cc b/pan/gui/pan-file-entry.cc
index 9e9405d..a71a346 100644
--- a/pan/gui/pan-file-entry.cc
+++ b/pan/gui/pan-file-entry.cc
@@ -69,7 +69,7 @@ GtkWidget*
 pan :: file_entry_new (const char * title, int chooser_action)
 {
   // create the widgetry
-  GtkWidget * hbox = gtk_hbox_new (false, PAD);
+  GtkWidget * hbox = hbox_new (false, PAD);
   GtkWidget * e = gtk_entry_new ();
   gtk_box_pack_start (GTK_BOX(hbox), e, true, true, 0);
   GtkWidget * b = gtk_button_new_from_stock (GTK_STOCK_OPEN);
diff --git a/pan/gui/post-ui.cc b/pan/gui/post-ui.cc
index b768d2b..f9bd12c 100644
--- a/pan/gui/post-ui.cc
+++ b/pan/gui/post-ui.cc
@@ -812,7 +812,7 @@ namespace
     GtkWidget * button = gtk_button_new ();
     GtkWidget * label = gtk_label_new_with_mnemonic (_("Go _Online"));
     GtkWidget * image = gtk_image_new_from_stock (GTK_STOCK_NETWORK, GTK_ICON_SIZE_BUTTON);
-    GtkWidget * hbox = gtk_hbox_new (false, 2);
+    GtkWidget * hbox = hbox_new (false, 2);
     GtkWidget * align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
     gtk_box_pack_start (GTK_BOX (hbox), image, false, false, 0);
     gtk_box_pack_end (GTK_BOX (hbox), label, false, false, 0);
@@ -2418,7 +2418,7 @@ PostUI :: create_main_tab ()
   set_spellcheck_enabled (_prefs.get_flag ("spellcheck-enabled", DEFAULT_SPELLCHECK_FLAG));
   _body_changed_id = g_signal_connect (_body_buf, "changed", G_CALLBACK(body_changed_cb), this);
 
-  GtkWidget * v = gtk_vbox_new (false, PAD);
+  GtkWidget * v = vbox_new (false, PAD);
   gtk_container_set_border_width (GTK_CONTAINER(v), PAD);
   gtk_box_pack_start (GTK_BOX(v), t, false, false, 0);
   pan_box_pack_start_defaults (GTK_BOX(v), w);
@@ -2494,22 +2494,22 @@ PostUI :: create_filequeue_tab ()
   GtkWidget *w ;
   GtkListStore *list_store;
   GtkCellRenderer *renderer;
-  GtkWidget * vbox = gtk_vbox_new (false, 0);
-  GtkWidget * buttons = gtk_hbox_new (false, PAD_SMALL);
+  GtkWidget * vbox = vbox_new (false, 0);
+  GtkWidget * buttons = hbox_new (false, PAD_SMALL);
 
   // add button row
   add_button (buttons, GTK_STOCK_GO_UP, G_CALLBACK(up_clicked_cb), this);
   add_button (buttons, GTK_STOCK_GOTO_TOP, G_CALLBACK(top_clicked_cb), this);
-  gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+  gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
   add_button (buttons, GTK_STOCK_GO_DOWN, G_CALLBACK(down_clicked_cb), this);
   add_button (buttons, GTK_STOCK_GOTO_BOTTOM, G_CALLBACK(bottom_clicked_cb), this);
-  gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+  gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
   w = add_button (buttons, GTK_STOCK_DELETE, G_CALLBACK(delete_clicked_cb), this);
   gtk_widget_set_tooltip_text( w, _("Delete from Queue"));
   pan_box_pack_start_defaults (GTK_BOX(buttons), gtk_event_box_new());
 
   gtk_box_pack_start (GTK_BOX(vbox), buttons, false, false, 0);
-  gtk_box_pack_start (GTK_BOX(vbox), gtk_hseparator_new(), false, false, 0);
+  gtk_box_pack_start (GTK_BOX(vbox), hseparator_new(), false, false, 0);
 
   //add filestore
   list_store = gtk_list_store_new (4, G_TYPE_UINT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING);
@@ -2555,7 +2555,7 @@ GtkWidget*
 PostUI:: create_filequeue_status_bar ()
 {
   GtkWidget * w;
-  GtkWidget * status_bar (gtk_hbox_new (FALSE, 0));
+  GtkWidget * status_bar (hbox_new (FALSE, 0));
 
   // connection status
   w = _filequeue_label = gtk_label_new (NULL);
@@ -2882,7 +2882,7 @@ PostUI :: select_parts ()
   y = _prefs.get_int("post-ui-height", 450);
   gtk_window_set_default_size (GTK_WINDOW(w), x, y);
   // populate the window
-  GtkWidget * vbox = gtk_vbox_new (false, PAD_SMALL);
+  GtkWidget * vbox = vbox_new (false, PAD_SMALL);
   gtk_container_add (GTK_CONTAINER(w), vbox);
 
   GtkWidget * notebook = gtk_notebook_new ();
@@ -3053,8 +3053,8 @@ PostUI :: PostUI (GtkWindow    * parent,
   }
 
   // populate the window
-  GtkWidget * vbox = gtk_vbox_new (false, PAD_SMALL);
-  GtkWidget * menu_vbox = gtk_vbox_new (false, PAD_SMALL);
+  GtkWidget * vbox = vbox_new (false, PAD_SMALL);
+  GtkWidget * menu_vbox = vbox_new (false, PAD_SMALL);
   gtk_box_pack_start (GTK_BOX(vbox), menu_vbox, false, false, 0);
   add_actions (menu_vbox);
   gtk_window_add_accel_group (GTK_WINDOW(_root), gtk_ui_manager_get_accel_group (_uim));
diff --git a/pan/gui/prefs-ui.cc b/pan/gui/prefs-ui.cc
index 323bf3b..f9e0e03 100644
--- a/pan/gui/prefs-ui.cc
+++ b/pan/gui/prefs-ui.cc
@@ -411,7 +411,7 @@ namespace pan
     const bool icons = "icons" == what;
     const bool both  = "both"  == what;
 
-    GtkWidget* hbox = gtk_hbox_new(false, 2);
+    GtkWidget* hbox = hbox_new(false, 2);
     GdkPixbuf * pixbuf = gdk_pixbuf_new_from_inline (-1, line, false, 0);
     GtkWidget * image = gtk_image_new_from_pixbuf (pixbuf);
     g_object_unref (pixbuf);
@@ -615,7 +615,7 @@ namespace pan
 
     // tie them together...
     g_signal_connect (c, "changed", G_CALLBACK(maybe_make_widget_visible), e);
-    GtkWidget * h = gtk_hbox_new (false, PAD);
+    GtkWidget * h = hbox_new (false, PAD);
     gtk_box_pack_start (GTK_BOX(h), c, true, true, 0);
     gtk_box_pack_start (GTK_BOX(h), e, true, true, 0);
 
@@ -886,9 +886,9 @@ namespace
     GtkWidget * f = gtk_frame_new (NULL);
     gtk_frame_set_shadow_type (GTK_FRAME(f), GTK_SHADOW_IN);
     gtk_container_add (GTK_CONTAINER(f), view);
-    GtkWidget * hbox = gtk_hbox_new (false, PAD);
+    GtkWidget * hbox = hbox_new (false, PAD);
     gtk_box_pack_start (GTK_BOX(hbox), f, true, true, 0);
-    GtkWidget * vbox = gtk_vbox_new (false, PAD);
+    GtkWidget * vbox = vbox_new (false, PAD);
     GtkWidget * up = gtk_button_new_from_stock (GTK_STOCK_GO_UP);
     gtk_box_pack_start (GTK_BOX(vbox), up, false, false, 0);
     GtkWidget * down = gtk_button_new_from_stock (GTK_STOCK_GO_DOWN);
@@ -1048,7 +1048,7 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
   HIG :: workarea_add_section_title (t, &row, _("Pane Layout"));
     std::string cur = _prefs.get_string ("pane-layout", "stacked-right");
     HIG :: workarea_add_section_spacer (t, row, 1);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     w = new_layout_radio (0, icon_layout_1, "stacked-top", cur, prefs);
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
     w = new_layout_radio (w, icon_layout_2, "stacked-bottom", cur, prefs);
@@ -1105,7 +1105,7 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
     i=0;
 
     w = score_handler_new (prefs, "rules-delete-value", "never", b);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
     gtk_box_pack_start (GTK_BOX(h), action_combo[i++], false, false, 0);
     HIG :: workarea_add_row (t, &row, _("_Delete articles scoring at: "), h);
@@ -1114,13 +1114,13 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
     HIG :: workarea_add_row (t, &row, _("Mark articles as _read scoring at: "), w);
 
     w = score_handler_new (prefs, "rules-autocache-value", "never", b);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
     gtk_box_pack_start (GTK_BOX(h), action_combo[i++], false, false, 0);
     HIG :: workarea_add_row (t, &row, _("_Cache articles scoring at: "), h);
 
     w = score_handler_new (prefs, "rules-auto-dl-value", "never", b);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
     gtk_box_pack_start (GTK_BOX(h), action_combo[i++], false, false, 0);
     HIG :: workarea_add_row (t, &row, _("Download _attachments of articles scoring at: "), h);
@@ -1170,37 +1170,37 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
   t = HIG :: workarea_create ();
   HIG :: workarea_add_section_title (t, &row, _("Header Pane"));
     HIG :: workarea_add_section_spacer(t, row, 6);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-watched-fg", def_color_str.c_str(), prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-watched-bg", TANGO_CHAMELEON_LIGHT, prefs));
     HIG :: workarea_add_row (t, &row, _("Scores of 9999 or more:"), h);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-high-fg", def_color_str.c_str(), prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-high-bg", TANGO_BUTTER_LIGHT, prefs));
     HIG :: workarea_add_row (t, &row, _("Scores from 5000 to 9998:"), h);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-medium-fg", def_color_str.c_str(), prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-medium-bg", TANGO_SKY_BLUE_LIGHT, prefs));
     HIG :: workarea_add_row (t, &row, _("Scores from 1 to 4999:"), h);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-low-fg", TANGO_ALUMINUM_2, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-low-bg", def_color_str.c_str(), prefs));
     HIG :: workarea_add_row (t, &row, _("Scores from -9998 to -1:"), h);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-ignored-fg", TANGO_ALUMINUM_4, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("score-color-ignored-bg", def_color_str.c_str(), prefs));
     HIG :: workarea_add_row (t, &row, _("Scores of -9999 or less:"), h);
-    h = gtk_hbox_new (false, PAD);
+    h = hbox_new (false, PAD);
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Text:")));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("color-read-fg", TANGO_ORANGE, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), gtk_label_new (_("Background:")));
@@ -1209,7 +1209,7 @@ PrefsDialog :: PrefsDialog (Prefs& prefs, GtkWindow* parent):
   HIG :: workarea_add_section_divider (t, &row);
   HIG :: workarea_add_section_title (t, &row, _("Body Pane"));
     HIG :: workarea_add_section_spacer (t, row, 3);
-    h = gtk_hbox_new (false, PAD_SMALL);
+    h = hbox_new (false, PAD_SMALL);
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-quote-1", TANGO_CHAMELEON_DARK, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-quote-2", TANGO_ORANGE_DARK, prefs));
     pan_box_pack_start_defaults (GTK_BOX(h), new_color_button ("body-pane-color-quote-3", TANGO_PLUM_DARK, prefs));
diff --git a/pan/gui/profiles-dialog.cc b/pan/gui/profiles-dialog.cc
index 3ceb9ea..84d0c06 100644
--- a/pan/gui/profiles-dialog.cc
+++ b/pan/gui/profiles-dialog.cc
@@ -192,7 +192,7 @@ ProfileDialog :: ProfileDialog (const Data         & data,
 #endif
     w = gtk_combo_box_new_with_model (GTK_TREE_MODEL(store));
 
-    hbox = gtk_hbox_new(FALSE, 3);
+    hbox = hbox_new(FALSE, 3);
     l = gtk_label_new(_("Signature Type: "));
     gtk_misc_set_alignment (GTK_MISC(l), 0.0f, 0.5f);
     gtk_box_pack_start(GTK_BOX(hbox), l, false, false, 0);
@@ -214,7 +214,7 @@ ProfileDialog :: ProfileDialog (const Data         & data,
 #endif
 
     gtk_combo_box_set_active (GTK_COMBO_BOX(w), active);
-    GtkWidget* vbox = gtk_vbox_new(TRUE, 3);
+    GtkWidget* vbox = vbox_new(TRUE, 3);
     gtk_box_pack_start(GTK_BOX(vbox), _signature_file_combo, false, false, 0);
     gtk_box_pack_start(GTK_BOX(vbox), _signature_file, false, false, 0);
     HIG :: workarea_add_row (t, &row, "",vbox);
@@ -530,7 +530,7 @@ ProfilesDialog :: ProfilesDialog (const Data& data, Profiles &profiles, GtkWindo
   //g_signal_connect (GTK_OBJECT(_root), "response", G_CALLBACK(response_cb), this);
 
   // workarea
-  GtkWidget * hbox = gtk_hbox_new (false, PAD);
+  GtkWidget * hbox = hbox_new (false, PAD);
   gtk_container_set_border_width (GTK_CONTAINER(hbox), PAD_BIG);
   gtk_box_pack_start (GTK_BOX( gtk_dialog_get_content_area( GTK_DIALOG(_root))), hbox, true, true, 0);
 
@@ -555,7 +555,7 @@ ProfilesDialog :: ProfilesDialog (const Data& data, Profiles &profiles, GtkWindo
   gtk_widget_set_size_request (w, 300, 300);
 
   // button box
-  GtkWidget * bbox = gtk_vbox_new (FALSE, PAD_SMALL);
+  GtkWidget * bbox = vbox_new (FALSE, PAD_SMALL);
   gtk_box_pack_start (GTK_BOX (hbox), bbox, false, false, 0);
 
   // add button
diff --git a/pan/gui/save-attach-ui.cc b/pan/gui/save-attach-ui.cc
index 1483e79..c9c215b 100644
--- a/pan/gui/save-attach-ui.cc
+++ b/pan/gui/save-attach-ui.cc
@@ -251,7 +251,7 @@ SaveAttachmentsDialog :: SaveAttachmentsDialog
   if (path_mode==PATH_GROUP && !have_group_default)
       path_mode = PATH_ENTRY;
 
-  h = gtk_hbox_new (FALSE, 0);
+  h = hbox_new (FALSE, 0);
   if (have_group_default) {
     w = _save_custom_path_radio = gtk_radio_button_new_with_mnemonic (NULL, _("_Location:"));
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
diff --git a/pan/gui/save-ui.cc b/pan/gui/save-ui.cc
index 7352153..3de7131 100644
--- a/pan/gui/save-ui.cc
+++ b/pan/gui/save-ui.cc
@@ -266,7 +266,7 @@ SaveDialog :: SaveDialog (Prefs                       & prefs,
   if (path_mode==PATH_GROUP && !have_group_default)
       path_mode = PATH_ENTRY;
 
-  h = gtk_hbox_new (FALSE, 0);
+  h = hbox_new (FALSE, 0);
   if (have_group_default) {
     w = _save_custom_path_radio = gtk_radio_button_new_with_mnemonic (NULL, _("_Location:"));
     gtk_box_pack_start (GTK_BOX(h), w, false, false, 0);
diff --git a/pan/gui/score-add-ui.cc b/pan/gui/score-add-ui.cc
index 52f98f7..1fa1e1d 100644
--- a/pan/gui/score-add-ui.cc
+++ b/pan/gui/score-add-ui.cc
@@ -314,7 +314,7 @@ namespace
                                 GtkWidget     *& setme_spin,
                                 const Article  * article)
   {
-    GtkWidget * h = gtk_hbox_new (false, PAD);
+    GtkWidget * h = hbox_new (false, PAD);
     g_object_set_data (G_OBJECT(h), "article", gpointer(article));
 
     GtkTreeModel * model = field_tree_model_new ();
@@ -555,7 +555,7 @@ namespace
 
     GtkWidget * image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_BUTTON);
     GtkWidget * image2 = gtk_image_new_from_stock (GTK_STOCK_REFRESH, GTK_ICON_SIZE_BUTTON);
-    GtkWidget * hbox = gtk_hbox_new (FALSE, 2);
+    GtkWidget * hbox = hbox_new (FALSE, 2);
     GtkWidget * align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
 
     gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
@@ -625,7 +625,7 @@ ScoreAddDialog :: ScoreAddDialog (Data           & data,
     HIG::workarea_add_section_spacer (t, row, 4);
 
     // section
-    GtkWidget * h = gtk_hbox_new (false, PAD);
+    GtkWidget * h = hbox_new (false, PAD);
     GtkTreeModel * model = text_tree_model_new (false);
     w = _section_menu = value_combo_new (model);
     g_object_unref (G_OBJECT(model));
@@ -643,7 +643,7 @@ ScoreAddDialog :: ScoreAddDialog (Data           & data,
     gtk_widget_show (w);
 
     // score
-    h = gtk_hbox_new (false, PAD_SMALL);
+    h = hbox_new (false, PAD_SMALL);
     model = score_tree_model_new ();
     w = _score_menu = value_combo_new (model);
     g_object_unref (model);
diff --git a/pan/gui/score-view-ui.cc b/pan/gui/score-view-ui.cc
index f351932..4e0f1c3 100644
--- a/pan/gui/score-view-ui.cc
+++ b/pan/gui/score-view-ui.cc
@@ -58,7 +58,7 @@ namespace
 
     GtkWidget * image = gtk_image_new_from_stock (GTK_STOCK_CLOSE, GTK_ICON_SIZE_BUTTON);
     GtkWidget * image2 = gtk_image_new_from_stock (GTK_STOCK_REFRESH, GTK_ICON_SIZE_BUTTON);
-    GtkWidget * hbox = gtk_hbox_new (FALSE, 2);
+    GtkWidget * hbox = hbox_new (FALSE, 2);
 
     GtkWidget * align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
 
@@ -192,7 +192,7 @@ ScoreView :: ScoreView (Data& data, GtkWindow* parent,
   g_object_set_data_full (G_OBJECT(w), "score_view", this, delete_score_view);
 
   // workarea
-  GtkWidget * hbox = gtk_hbox_new (FALSE, PAD);
+  GtkWidget * hbox = hbox_new (FALSE, PAD);
   gtk_container_set_border_width (GTK_CONTAINER(hbox), 12);
   gtk_box_pack_start (GTK_BOX( gtk_dialog_get_content_area( GTK_DIALOG(w))), hbox, TRUE, TRUE, 0);
   gtk_widget_show (hbox);
@@ -231,7 +231,7 @@ ScoreView :: ScoreView (Data& data, GtkWindow* parent,
   gtk_widget_show (w);
 
   // button box
-  GtkWidget * bbox = gtk_vbox_new (FALSE, PAD_SMALL);
+  GtkWidget * bbox = vbox_new (FALSE, PAD_SMALL);
   gtk_box_pack_start (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
   gtk_widget_show (bbox);
 
diff --git a/pan/gui/server-ui.cc b/pan/gui/server-ui.cc
index 2b3ec1f..b63a939 100644
--- a/pan/gui/server-ui.cc
+++ b/pan/gui/server-ui.cc
@@ -919,7 +919,7 @@ pan :: server_list_dialog_new (Data& data, Queue& queue, Prefs& prefs, GtkWindow
   g_object_set_data_full (G_OBJECT(w), "dialog", d, delete_server_list_dialog);
 
   // workarea
-  GtkWidget * hbox = gtk_hbox_new (FALSE, PAD);
+  GtkWidget * hbox = hbox_new (FALSE, PAD);
   gtk_container_set_border_width (GTK_CONTAINER(hbox), 12);
   gtk_box_pack_start (GTK_BOX( gtk_dialog_get_content_area( GTK_DIALOG(w))), hbox, TRUE, TRUE, 0);
 
@@ -948,7 +948,7 @@ pan :: server_list_dialog_new (Data& data, Queue& queue, Prefs& prefs, GtkWindow
   gtk_widget_set_size_request (w, 300, 300);
 
   // button box
-  GtkWidget * bbox = gtk_vbox_new (FALSE, PAD_SMALL);
+  GtkWidget * bbox = vbox_new (FALSE, PAD_SMALL);
   gtk_box_pack_start (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
 
   // add button
@@ -1012,7 +1012,7 @@ pan :: sec_dialog_new (Data& data, Queue& queue, Prefs& prefs, GtkWindow* parent
   g_object_set_data_full (G_OBJECT(w), "dialog", d, delete_sec_dialog);
 
   // workarea
-  GtkWidget * hbox = gtk_hbox_new (FALSE, PAD);
+  GtkWidget * hbox = hbox_new (FALSE, PAD);
   gtk_container_set_border_width (GTK_CONTAINER(hbox), 12);
   gtk_box_pack_start (GTK_BOX( gtk_dialog_get_content_area( GTK_DIALOG(w))), hbox, TRUE, TRUE, 0);
 
@@ -1046,7 +1046,7 @@ pan :: sec_dialog_new (Data& data, Queue& queue, Prefs& prefs, GtkWindow* parent
   gtk_widget_set_size_request (w, 300, 300);
 
   // button box
-  GtkWidget * bbox = gtk_vbox_new (FALSE, PAD_SMALL);
+  GtkWidget * bbox = vbox_new (FALSE, PAD_SMALL);
   gtk_box_pack_start (GTK_BOX (hbox), bbox, FALSE, FALSE, 0);
 
   // add button
diff --git a/pan/gui/task-pane.cc b/pan/gui/task-pane.cc
index 71f257b..9e08fa0 100644
--- a/pan/gui/task-pane.cc
+++ b/pan/gui/task-pane.cc
@@ -972,45 +972,45 @@ TaskPane :: TaskPane (Queue& queue, Prefs& prefs): _queue(queue), _prefs(prefs)
 
   GtkWidget * w;
 
-  GtkWidget * vbox = gtk_vbox_new (false, 0);
+  GtkWidget * vbox = vbox_new (false, 0);
 
-    GtkWidget * buttons = gtk_hbox_new (false, PAD_SMALL);
+    GtkWidget * buttons = hbox_new (false, PAD_SMALL);
 
     w = _online_toggle = gtk_check_button_new ();
     _online_toggle_handler = g_signal_connect (w, "clicked", G_CALLBACK(online_toggled_cb), &queue);
     GtkWidget * i = _online_image = gtk_image_new ();
     GtkWidget * l = gtk_label_new_with_mnemonic (_("_Online"));
-    GtkWidget * v = gtk_hbox_new (false, PAD);
+    GtkWidget * v = hbox_new (false, PAD);
     gtk_label_set_mnemonic_widget (GTK_LABEL(l), w);
     on_queue_online_changed (queue, queue.is_online());
     gtk_box_pack_start (GTK_BOX(v), i, 0, 0, 0);
     gtk_box_pack_start (GTK_BOX(v), l, 0, 0, 0);
     gtk_container_add (GTK_CONTAINER(w), v);
     gtk_box_pack_start (GTK_BOX(buttons), w, false, false, 0);
-    gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+    gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
 
     add_button (buttons, GTK_STOCK_GO_UP, G_CALLBACK(up_clicked_cb), this);
     add_button (buttons, GTK_STOCK_GOTO_TOP, G_CALLBACK(top_clicked_cb), this);
-    gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+    gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
     add_button (buttons, GTK_STOCK_GO_DOWN, G_CALLBACK(down_clicked_cb), this);
     add_button (buttons, GTK_STOCK_GOTO_BOTTOM, G_CALLBACK(bottom_clicked_cb), this);
-    gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+    gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
     w = add_button (buttons, GTK_STOCK_REDO, G_CALLBACK(restart_clicked_cb), this);
     gtk_widget_set_tooltip_text( w, _("Restart Tasks"));
     w = add_button (buttons, GTK_STOCK_STOP, G_CALLBACK(stop_clicked_cb), this);
     gtk_widget_set_tooltip_text( w, _("Stop Tasks"));
     w = add_button (buttons, GTK_STOCK_DELETE, G_CALLBACK(delete_clicked_cb), this);
     gtk_widget_set_tooltip_text( w, _("Delete Tasks"));
-    gtk_box_pack_start (GTK_BOX(buttons), gtk_vseparator_new(), 0, 0, 0);
+    gtk_box_pack_start (GTK_BOX(buttons), vseparator_new(), 0, 0, 0);
     w = add_button (buttons, GTK_STOCK_CLOSE, 0, 0);
     g_signal_connect_swapped (w, "clicked", G_CALLBACK(gtk_widget_destroy), _root);
     pan_box_pack_start_defaults (GTK_BOX(buttons), gtk_event_box_new()); // eat horizontal space
 
   gtk_box_pack_start (GTK_BOX(vbox), buttons, false, false, 0);
-  gtk_box_pack_start (GTK_BOX(vbox), gtk_hseparator_new(), false, false, 0);
+  gtk_box_pack_start (GTK_BOX(vbox), hseparator_new(), false, false, 0);
 
   // statusbar
-  GtkWidget * hbox = gtk_hbox_new (false, PAD);
+  GtkWidget * hbox = hbox_new (false, PAD);
   w = _status_label = gtk_label_new (0);
   gtk_box_pack_start (GTK_BOX(hbox), w, false, false, PAD_SMALL);
 
@@ -1038,7 +1038,7 @@ TaskPane :: TaskPane (Queue& queue, Prefs& prefs): _queue(queue), _prefs(prefs)
   gtk_window_add_accel_group (GTK_WINDOW(_root), gtk_ui_manager_get_accel_group (_uim));
 
   // search filter
-  gtk_box_pack_start (GTK_BOX(hbox), gtk_vseparator_new(), 0, 0, 0);
+  gtk_box_pack_start (GTK_BOX(hbox), vseparator_new(), 0, 0, 0);
   gtk_box_pack_start (GTK_BOX(hbox), create_filter_entry(), false, false, PAD);
   GtkTreeModel* initial_model= gtk_tree_view_get_model(GTK_TREE_VIEW( _view ));
   GtkTreeModel* filter_model = gtk_tree_model_filter_new( initial_model, NULL );
diff --git a/pan/tasks/decoder.h b/pan/tasks/decoder.h
index 0814694..46c8a53 100644
--- a/pan/tasks/decoder.h
+++ b/pan/tasks/decoder.h
@@ -95,6 +95,8 @@ namespace pan
       /** tell our task about the decode's progress */
       static gboolean progress_update_timer_func(gpointer decoder);
 
+    protected:
+
       WorkerPool& _worker_pool;
       int _gsourceid;
       void disable_progress_update();



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]