patches/gnome-media-03-mergetabs.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 16306 79c06b43f504
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
15427
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     1
--- gnome-media-2.24.0.1/gst-mixer/src/element.c-orig	2009-03-06 15:11:56.690723000 -0600
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     2
+++ gnome-media-2.24.0.1/gst-mixer/src/element.c	2009-03-06 15:13:22.909421000 -0600
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     3
@@ -252,15 +252,13 @@ gnome_volume_control_element_change (Gno
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     4
 						    GtkWidget     *right_sep,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     5
 						    GtkWidget     *flagbox);
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     6
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     7
-  } content[4] = {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     8
+  } content[3] = {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
     9
     { NULL, NULL, NULL, NULL, FALSE, 0, 5, 1,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    10
       gnome_volume_control_track_add_playback },
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    11
     { NULL, NULL, NULL, NULL, FALSE, 0, 5, 1,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    12
       gnome_volume_control_track_add_recording },
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    13
     { NULL, NULL, NULL, NULL, FALSE, 0, 1, 3,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    14
       gnome_volume_control_track_add_playback },
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    15
-    { NULL, NULL, NULL, NULL, FALSE, 0, 1, 3,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    16
-      gnome_volume_control_track_add_option }
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    17
   };
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    18
   static gboolean theme_page = FALSE;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    19
   const GList *item;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    20
@@ -307,7 +305,7 @@ gnome_volume_control_element_change (Gno
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    21
   }
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    22
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    23
   /* content pages */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    24
-  for (i = 0; i < 4; i++) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    25
+  for (i = 0; i < 3; i++) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    26
     content[i].page = gtk_table_new (content[i].width, content[i].height, FALSE);
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    27
     gtk_container_set_border_width (GTK_CONTAINER (content[i].page), 6);
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    28
     if (i >= 2)
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    29
@@ -332,12 +330,10 @@ gnome_volume_control_element_change (Gno
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    30
      *     _of this type_. We currently destroy it at the
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    31
      *     end, so it's not critical, but not nice either.
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    32
      */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    33
-    if (i == 3) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    34
+    if (i == 2) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    35
       content[i].new_sep = gtk_hseparator_new ();
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    36
-    } else if (i < 2) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    37
-      content[i].new_sep = gtk_vseparator_new ();
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    38
     } else {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    39
-      content[i].new_sep = NULL;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    40
+      content[i].new_sep = gtk_vseparator_new ();
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    41
     }
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    42
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    43
     /* visible? */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    44
@@ -395,7 +391,7 @@ gnome_volume_control_element_change (Gno
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    45
   /* show - need to build the tabs backwards so that deleting the "Sound Theme"
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    46
    * page can be avoided.
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    47
    */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    48
-  for (i = 3; i >= 0; i--) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    49
+  for (i = 2; i >= 0; i--) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    50
     GtkWidget *label, *view, *viewport;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    51
     GtkAdjustment *hadjustment, *vadjustment;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    52
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    53
@@ -542,7 +538,7 @@ cb_gconf (GConfClient *client,
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    54
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    55
         if (value->type == GCONF_VALUE_BOOL) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    56
           gboolean active = gconf_value_get_bool (value),
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    57
-		   first[4] = { TRUE, TRUE, TRUE, TRUE };
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    58
+		   first[3] = { TRUE, TRUE, TRUE };
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    59
           gint n, page = get_page_num (el->mixer, track);
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    60
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    61
           gnome_volume_control_track_show (trkw, active);
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    62
--- gnome-media-2.24.0.1/gst-mixer/src/misc.c	2009-03-05 14:33:09.453181745 -0800
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    63
+++ gnome-media-2.24.0.1/gst-mixer/src/misc.c	2009-03-05 14:47:07.165228853 -0800
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    64
@@ -37,17 +37,13 @@
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    65
         if ((gst_mixer_get_mixer_flags (GST_MIXER (mixer)) &
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    66
                 GST_MIXER_FLAG_GROUPING) == 0) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    67
                 /* old style grouping, only volume sliders on the first two pages */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    68
-               if (GST_IS_MIXER_OPTIONS (track))
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    69
-                        return 3;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    70
-                else if (track->num_channels == 0)
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    71
+                if (track->num_channels == 0)
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    72
                         return 2;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    73
         }
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    74
         if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_INPUT))
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    75
                 return 1;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    76
         else if (GST_MIXER_TRACK_HAS_FLAG (track, GST_MIXER_TRACK_OUTPUT))
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    77
                 return 0;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    78
-        else if (GST_IS_MIXER_OPTIONS (track))
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    79
-                return 3;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    80
         else
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    81
                 return 2;
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    82
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    83
@@ -56,15 +52,12 @@
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    84
 
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    85
 gchar *get_page_description (gint n)
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    86
 {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    87
-	/* needs i18n work */
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    88
 	switch (n) {
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    89
 	case 0:
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    90
 		return _("Playback");
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    91
 	case 1:
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    92
 		return _("Recording");
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    93
 	case 2:
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    94
-		return _("Switches");
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    95
-	case 3:
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    96
 		return _("Options");
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    97
 	}
174657e7785c 2009-03-18 Brian Cameron <[email protected]>
yippi
parents:
diff changeset
    98