[SCM] gnome-mplayer/experimental: Add patch from upstream to fix GTK+ 3 deprecation warnings

sramacher at users.alioth.debian.org sramacher at users.alioth.debian.org
Fri Dec 14 23:09:27 UTC 2012


The following commit has been merged in the experimental branch:
commit a61da93f9cdb302066666bc633eb0d7360c0ffea
Author: Sebastian Ramacher <sramacher at debian.org>
Date:   Sat Dec 15 00:09:16 2012 +0100

    Add patch from upstream to fix GTK+ 3 deprecation warnings

diff --git a/debian/changelog b/debian/changelog
index a96fdfa..0d2b614 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ gnome-mplayer (1.0.7-3) UNRELEASED; urgency=low
   * debian/patches:
     - fallback-to-nonsymbolic.patch: Update upstream's fix.
     - option-album-image-fetch.patch: Refresh.
+    - fix-gtk3-deprecation-warnings.patch: Fix deprecation warnings from
+      GTK+ 3.
 
  -- Sebastian Ramacher <sramacher at debian.org>  Fri, 14 Dec 2012 23:55:04 +0100
 
diff --git a/debian/patches/fix-gtk3-deprecation-warnings.patch b/debian/patches/fix-gtk3-deprecation-warnings.patch
new file mode 100644
index 0000000..9939da3
--- /dev/null
+++ b/debian/patches/fix-gtk3-deprecation-warnings.patch
@@ -0,0 +1,210 @@
+Description: Fix deprecation warnings from GTK+ 3
+Origin: upstream,
+ https://code.google.com/p/gnome-mplayer/source/detail?r=2363
+Last-Update: 2012-12-15
+
+--- a/src/gui.c
++++ b/src/gui.c
+@@ -1366,7 +1366,12 @@
+     gtk_window_set_resizable(GTK_WINDOW(folder_progress_window), FALSE);
+     gtk_widget_set_size_request(folder_progress_window, 400, -1);
+ 
+-    vbox = gtk_vbox_new(FALSE, 10);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
++#else
++	vbox = gtk_vbox_new(FALSE, 10);
++#endif
+     folder_progress_bar = gtk_progress_bar_new();
+     gtk_progress_bar_set_pulse_step(GTK_PROGRESS_BAR(folder_progress_bar), 0.10);
+     folder_progress_label = gtk_label_new("");
+@@ -1374,7 +1379,11 @@
+ 
+     cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+     g_signal_connect(G_OBJECT(cancel), "clicked", G_CALLBACK(cancel_clicked), NULL);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++    hbox = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
++#else
+     hbox = gtk_hbutton_box_new();
++#endif
+     gtk_button_box_set_layout(GTK_BUTTON_BOX(hbox), GTK_BUTTONBOX_END);
+     gtk_container_add(GTK_CONTAINER(hbox), cancel);
+ 
+@@ -3119,16 +3128,31 @@
+ 
+     gtk_window_set_resizable(GTK_WINDOW(open_window), FALSE);
+     gtk_window_set_title(GTK_WINDOW(open_window), _("Open Location"));
+-    vbox = gtk_vbox_new(FALSE, 6);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,6);
++	gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
++#else
++	vbox = gtk_vbox_new(FALSE, 6);
++#endif
+     label = gtk_label_new(_("Location:"));
+     open_location = gtk_entry_new();
+     gtk_entry_set_width_chars(GTK_ENTRY(open_location), 50);
+     gtk_entry_set_activates_default(GTK_ENTRY(open_location), TRUE);
+-    item_box = gtk_hbox_new(FALSE, 6);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	item_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,6);
++	gtk_box_set_homogeneous(GTK_BOX(item_box), FALSE);
++#else
++	item_box = gtk_hbox_new(FALSE, 6);
++#endif
+     gtk_box_pack_start(GTK_BOX(item_box), label, FALSE, FALSE, 12);
+     gtk_box_pack_end(GTK_BOX(item_box), open_location, TRUE, TRUE, 0);
+ 
+-    button_box = gtk_hbox_new(FALSE, 6);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	button_box = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,6);
++	gtk_box_set_homogeneous(GTK_BOX(button_box), FALSE);
++#else
++	button_box = gtk_hbox_new(FALSE, 6);
++#endif
+     cancel_button = gtk_button_new_from_stock(GTK_STOCK_CANCEL);
+     open_button = gtk_button_new_from_stock(GTK_STOCK_OPEN);
+ #ifdef GTK2_22_ENABLED
+@@ -4659,7 +4683,12 @@
+     gtk_window_set_resizable(GTK_WINDOW(adv_window), FALSE);
+     gtk_window_set_title(GTK_WINDOW(adv_window), _("Video Picture Adjustments"));
+ 
+-    adv_vbox = gtk_vbox_new(FALSE, 10);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	adv_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(adv_vbox), FALSE);
++#else
++	adv_vbox = gtk_vbox_new(FALSE, 10);
++#endif
+     adv_hbutton_box = gtk_hbutton_box_new();
+     gtk_button_box_set_layout(GTK_BUTTON_BOX(adv_hbutton_box), GTK_BUTTONBOX_END);
+     adv_table = gtk_table_new(20, 2, FALSE);
+@@ -5144,14 +5173,54 @@
+     gtk_window_set_icon(GTK_WINDOW(config_window), pb_icon);
+ 
+     gtk_window_set_resizable(GTK_WINDOW(config_window), FALSE);
+-    conf_vbox = gtk_vbox_new(FALSE, 10);
+-    conf_page1 = gtk_vbox_new(FALSE, 10);
+-    conf_page2 = gtk_vbox_new(FALSE, 10);
+-    conf_page3 = gtk_vbox_new(FALSE, 10);
+-    conf_page4 = gtk_vbox_new(FALSE, 10);
+-    conf_page5 = gtk_vbox_new(FALSE, 10);
+-    conf_page6 = gtk_vbox_new(FALSE, 10);
+-    conf_page7 = gtk_vbox_new(FALSE, 10);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_vbox), FALSE);
++#else
++	conf_vbox = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page1 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page1), FALSE);
++#else
++	conf_page1 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page2 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page2), FALSE);
++#else
++	conf_page2 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page3 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page3), FALSE);
++#else
++	conf_page3 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page4 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page4), FALSE);
++#else
++	conf_page4 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page5 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page5), FALSE);
++#else
++	conf_page5 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page6 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page6), FALSE);
++#else
++	conf_page6 = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	conf_page7 = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(conf_page7), FALSE);
++#else
++	conf_page7 = gtk_vbox_new(FALSE, 10);
++#endif
+     conf_hbutton_box = gtk_hbutton_box_new();
+     gtk_button_box_set_layout(GTK_BUTTON_BOX(conf_hbutton_box), GTK_BUTTONBOX_END);
+     conf_table = gtk_table_new(20, 2, FALSE);
+@@ -7716,9 +7785,24 @@
+     gtk_drag_dest_add_uri_targets(window);
+     //Connect the signal for DnD
+     g_signal_connect(G_OBJECT(window), "drag_data_received", G_CALLBACK(drop_callback), NULL);
+-    vbox = gtk_vbox_new(FALSE, 0);
+-    hbox = gtk_hbox_new(FALSE, 0);
+-    controls_box = gtk_vbox_new(FALSE, 0);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(vbox), FALSE);
++#else
++	vbox = gtk_vbox_new(FALSE, 10);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,0);
++	gtk_box_set_homogeneous(GTK_BOX(hbox), FALSE);
++#else
++	hbox = gtk_hbox_new(FALSE, 0);
++#endif
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	controls_box = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
++	gtk_box_set_homogeneous(GTK_BOX(controls_box), FALSE);
++#else
++	controls_box = gtk_vbox_new(FALSE, 0);
++#endif
+     media = gmtk_media_player_new();
+     g_signal_connect_swapped(G_OBJECT(media), "media_state_changed",
+                              G_CALLBACK(player_media_state_changed_callback), NULL);
+@@ -7734,10 +7818,20 @@
+     media_label = gtk_label_new("");
+     gtk_widget_set_size_request(media_label, 300, 100);
+     gtk_label_set_ellipsize(GTK_LABEL(media_label), PANGO_ELLIPSIZE_END);
+-    media_hbox = gtk_hbox_new(FALSE, 10);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	media_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(media_hbox), FALSE);
++#else
++	media_hbox = gtk_hbox_new(FALSE, 10);
++#endif
+     g_signal_connect(media_hbox, "show", G_CALLBACK(view_option_show_callback), NULL);
+     g_signal_connect(media_hbox, "size_allocate", G_CALLBACK(view_option_size_allocate_callback), NULL);
+-    details_vbox = gtk_vbox_new(FALSE, 10);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	details_vbox = gtk_box_new(GTK_ORIENTATION_VERTICAL,10);
++	gtk_box_set_homogeneous(GTK_BOX(details_vbox), FALSE);
++#else
++	details_vbox = gtk_vbox_new(FALSE, 10);
++#endif
+     details_table = gtk_table_new(20, 2, FALSE);
+     g_signal_connect(details_vbox, "show", G_CALLBACK(view_option_show_callback), NULL);
+     g_signal_connect(details_vbox, "size_allocate", G_CALLBACK(view_option_size_allocate_callback), NULL);
+@@ -7769,7 +7863,12 @@
+     g_signal_connect(plvbox, "size_allocate", G_CALLBACK(view_option_size_allocate_callback), NULL);
+     //if (remember_loc)
+     //      gtk_paned_set_position(GTK_PANED(pane),loc_panel_position);
+-    vbox_master = gtk_vbox_new(FALSE, 0);
++#if GTK_MAJOR_VERSION == 3 && GTK_MINOR_VERSION >= 2
++	vbox_master = gtk_box_new(GTK_ORIENTATION_VERTICAL,0);
++	gtk_box_set_homogeneous(GTK_BOX(vbox_master), FALSE);
++#else
++	vbox_master = gtk_vbox_new(FALSE, 0);
++#endif
+     if (windowid == 0)
+         gtk_box_pack_start(GTK_BOX(vbox_master), menubar, FALSE, FALSE, 0);
+     gtk_widget_show(menubar);
diff --git a/debian/patches/series b/debian/patches/series
index e678e20..66d556c 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 remove-audio-midi-from-desktop.patch
 fallback-to-nonsymbolic-icons.patch
 option-album-image-fetch.patch
+fix-gtk3-deprecation-warnings.patch

-- 
gnome-mplayer packaging



More information about the pkg-multimedia-commits mailing list