]> granicus.if.org Git - handbrake/commitdiff
LinGui: gtk 2.12 compatibility fixes
authorjstebbins <jstebbins.hb@gmail.com>
Tue, 7 Jul 2009 15:28:53 +0000 (15:28 +0000)
committerjstebbins <jstebbins.hb@gmail.com>
Tue, 7 Jul 2009 15:28:53 +0000 (15:28 +0000)
- ifdef 2.16 specific code.
   use g_object_set_property to set action properties with older gtk versions.
- remove "orientation" property from vbox widgets.
  It's not recognized by older gtk versions

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2670 b64f7644-9d1e-0410-96f1-a4d463321fa5

gtk/src/ghb.ui
gtk/src/queuehandler.c

index a9a9c3255578377d6d9d86ff961739a70317d3d0..77d989922a09ea538406eee8ef5630284051d83f 100644 (file)
@@ -3659,7 +3659,6 @@ no-dct-decimate=0:cabac=1</property>
                     <child>
                       <object class="GtkVBox" id="vbox42">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
                         <child>
                           <object class="GtkAlignment" id="alignment60">
                             <property name="visible">True</property>
@@ -3748,7 +3747,6 @@ no-dct-decimate=0:cabac=1</property>
                             <child>
                               <object class="GtkVBox" id="vbox5">
                                 <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
                                 <child>
                                   <object class="GtkCheckButton" id="use_source_name">
                                     <property name="label" translatable="yes">Use automatic naming (uses DVD name)</property>
@@ -3770,7 +3768,6 @@ no-dct-decimate=0:cabac=1</property>
                                     <child>
                                       <object class="GtkVBox" id="vbox29">
                                         <property name="visible">True</property>
-                                        <property name="orientation">vertical</property>
                                         <child>
                                           <object class="GtkCheckButton" id="chapters_in_destination">
                                             <property name="label" translatable="yes">Add chapters to destination name</property>
@@ -3912,7 +3909,6 @@ no-dct-decimate=0:cabac=1</property>
                     <child>
                       <object class="GtkVBox" id="vbox18">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
                         <child>
                           <object class="GtkAlignment" id="alignment61">
                             <property name="visible">True</property>
@@ -3924,7 +3920,6 @@ no-dct-decimate=0:cabac=1</property>
                             <child>
                               <object class="GtkVBox" id="vbox7">
                                 <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
                                 <child>
                                   <object class="GtkHBox" id="hbox81">
                                     <property name="visible">True</property>
@@ -3967,7 +3962,6 @@ no-dct-decimate=0:cabac=1</property>
                                       <object class="GtkVBox" id="vbox49">
                                         <property name="visible">True</property>
                                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                        <property name="orientation">vertical</property>
                                         <child>
                                           <object class="GtkRadioButton" id="AudioDUB">
                                             <property name="label" translatable="yes">DUB Foreign language audio</property>
@@ -4048,7 +4042,6 @@ no-dct-decimate=0:cabac=1</property>
                     <child>
                       <object class="GtkVBox" id="vbox1">
                         <property name="visible">True</property>
-                        <property name="orientation">vertical</property>
                         <child>
                           <object class="GtkAlignment" id="alignment3">
                             <property name="visible">True</property>
@@ -4058,7 +4051,6 @@ no-dct-decimate=0:cabac=1</property>
                             <child>
                               <object class="GtkVBox" id="vbox3">
                                 <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
                                 <child>
                                   <object class="GtkCheckButton" id="constant_rate_factor">
                                     <property name="label" translatable="yes">Use CRF (Instead of CQP) for Constant Quality encodes</property>
@@ -4151,7 +4143,6 @@ no-dct-decimate=0:cabac=1</property>
                             <child>
                               <object class="GtkVBox" id="vbox2">
                                 <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
                                 <child>
                                   <object class="GtkCheckButton" id="EncodeLogLocation">
                                     <property name="label" translatable="yes">Put individual encode logs in same location as movie</property>
@@ -4278,7 +4269,6 @@ no-dct-decimate=0:cabac=1</property>
                             <child>
                               <object class="GtkVBox" id="vbox4">
                                 <property name="visible">True</property>
-                                <property name="orientation">vertical</property>
                                 <child>
                                   <object class="GtkCheckButton" id="allow_tweaks">
                                     <property name="label" translatable="yes">Allow Tweaks</property>
index c019f21257a6c4315a43a843da721e82130ba0d0..fbe7cce981b168e88f2d56863b88c8405908dbe5 100644 (file)
@@ -1105,31 +1105,67 @@ ghb_queue_buttons_grey(signal_user_data_t *ud)
        if (show_stop)
        {
                gtk_action_set_sensitive (action, TRUE);
+#if GTK_CHECK_VERSION(2, 16, 0)
                gtk_action_set_icon_name(action, "hb-stop");
                gtk_action_set_label(action, "S_top Queue");
                gtk_action_set_tooltip(action, "Stop Encoding");
+#else
+               g_object_set_property(G_OBJECT(action), "icon-name", 
+                                                                                       ghb_string_value("hb-stop"));
+               g_object_set_property(G_OBJECT(action), "label",
+                                                                                       ghb_string_value("S_top Queue"));
+               g_object_set_property(G_OBJECT(action), "tooltip",
+                                                                                       ghb_string_value("Stop Encoding"));
+#endif
        }
        else
        {
                gtk_action_set_sensitive (action, show_start);
+#if GTK_CHECK_VERSION(2, 16, 0)
                gtk_action_set_icon_name(action, "hb-play");
                gtk_action_set_label(action, "_Start Queue");
                gtk_action_set_tooltip(action, "Start Encoding");
+#else
+               g_object_set_property(G_OBJECT(action), "icon-name", 
+                                                                                       ghb_string_value("hb-play"));
+               g_object_set_property(G_OBJECT(action), "label",
+                                                                                       ghb_string_value("_Start Queue"));
+               g_object_set_property(G_OBJECT(action), "tooltip",
+                                                                                       ghb_string_value("Start Encoding"));
+#endif
        }
        action = GHB_ACTION (ud->builder, "queue_pause_menu");
        if (paused)
        {
                gtk_action_set_sensitive (action, show_start);
+#if GTK_CHECK_VERSION(2, 16, 0)
                gtk_action_set_icon_name(action, "hb-play");
                gtk_action_set_label(action, "_Resume Queue");
                gtk_action_set_tooltip(action, "Resume Encoding");
+#else
+               g_object_set_property(G_OBJECT(action), "icon-name", 
+                                                                               ghb_string_value("hb-play"));
+               g_object_set_property(G_OBJECT(action), "label",
+                                                                               ghb_string_value("_Resume Queue"));
+               g_object_set_property(G_OBJECT(action), "tooltip",
+                                                                               ghb_string_value("Resume Encoding"));
+#endif
        }
        else
        {
                gtk_action_set_sensitive (action, show_stop);
+#if GTK_CHECK_VERSION(2, 16, 0)
                gtk_action_set_icon_name(action, "hb-pause");
                gtk_action_set_label(action, "_Pause Queue");
                gtk_action_set_tooltip(action, "Pause Encoding");
+#else
+               g_object_set_property(G_OBJECT(action), "icon-name", 
+                                                                               ghb_string_value("hb-pause"));
+               g_object_set_property(G_OBJECT(action), "label",
+                                                                               ghb_string_value("_Pause Queue"));
+               g_object_set_property(G_OBJECT(action), "tooltip",
+                                                                               ghb_string_value("Pause Encoding"));
+#endif
        }
 }