~ubuntu-branches/ubuntu/trusty/gnomeradio/trusty

« back to all changes in this revision

Viewing changes to debian/patches/gnomeradio-prefs.patch

  • Committer: Package Import Robot
  • Author(s): POJAR GEORGE
  • Date: 2013-09-11 15:06:44 UTC
  • Revision ID: package-import@ubuntu.com-20130911150644-l8x3ubsyqmrvnkh8
Tags: 1.8-2ubuntu20
* Updated debian/patches/gnomeradio-station_list.patch: Prevent to parse
  malformed/incomplete/invalid XML file.
* Updated debian/patches/gnomeradio-auto_device.patch:
  - Automatically detect radio device when users type auto in settings field.
  - Updated error messages to be clear and precise.
* Updated debian/patches/gnomeradio-alsamixer.patch: Make presets list the
  default widget when open settings dialog. Presets are the most common
  settings for users than devices settings.
* Updated debian/patches/gnomeradio-about.patch: It is not safe in principle
  to write raw UTF-8 in narrow string literals, made to be multibyte
  encodings.
* debian/patches/gnomeradio-prefs.patch: Renamed to
  debian/patches/gnomeradio-about.patch.
* debian/patches/gnomeradio-preferences.patch: Make sentence capitalization in
  text and increased preferences dialog.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
## Description: Switch from a GtkButton to a GtkFileChooserButton, instead of fidling around with the dialog.
2
 
## Origin: upstream, no
3
 
## Author: Pojar George 
4
 
## Forwarded: no
5
 
Index: gnomeradio-1.8/src/prefs.c
6
 
===================================================================
7
 
--- gnomeradio-1.8.orig/src/prefs.c     2013-05-29 16:41:32.179964469 +0000
8
 
+++ gnomeradio-1.8/src/prefs.c  2013-05-29 16:42:36.471962557 +0000
9
 
@@ -379,21 +379,11 @@
10
 
 
11
 
 static void destination_button_clicked_cb(GtkWidget *button, gpointer data)
12
 
 {
13
 
-       GtkWidget *dialog;
14
 
-       
15
 
-       dialog = gtk_file_chooser_dialog_new(_("Choose a destination folder"), NULL, 
16
 
-                                       GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, 
17
 
-                                       GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, 
18
 
-                                       GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
19
 
-                                       NULL);
20
 
-       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), rec_settings.destination);
21
 
-       if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) {
22
 
-               if (rec_settings.destination) g_free(rec_settings.destination);
23
 
-               rec_settings.destination = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
24
 
-               gtk_button_set_label(GTK_BUTTON(button), rec_settings.destination);
25
 
+       if (rec_settings.destination)
26
 
+       {
27
 
+               g_free(rec_settings.destination);
28
 
        }
29
 
-       
30
 
-       gtk_widget_destroy (dialog);
31
 
+       rec_settings.destination = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(button));
32
 
 }
33
 
 
34
 
 static gboolean list_view_key_press_event_cb(GtkWidget *widget, GdkEventKey *event, gpointer user_data)
35
 
@@ -711,8 +701,9 @@
36
 
        destination_label = gtk_label_new(_("Destination directory:"));
37
 
        gtk_misc_set_alignment(GTK_MISC(destination_label), 0.0f, 0.5f);
38
 
 
39
 
-       destination_button = gtk_button_new();
40
 
-       gtk_button_set_label(GTK_BUTTON(destination_button), rec_settings.destination);
41
 
+       destination_button = gtk_file_chooser_button_new(
42
 
+               _("Select a folder"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER);
43
 
+       gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(destination_button), rec_settings.destination);
44
 
        
45
 
        profile_eb = gtk_event_box_new();
46
 
        profile_combo = gm_audio_profile_choose_new();
47
 
@@ -723,7 +714,7 @@
48
 
        gtk_table_attach_defaults(GTK_TABLE(record_table), destination_button, 1, 2, 0, 1);
49
 
        gtk_table_attach_defaults(GTK_TABLE(record_table), profile_eb, 0, 2, 1, 2);
50
 
 
51
 
-       g_signal_connect(G_OBJECT(destination_button), "clicked", G_CALLBACK(destination_button_clicked_cb), NULL);
52
 
+       g_signal_connect(GTK_FILE_CHOOSER(destination_button), "selection-changed", G_CALLBACK(destination_button_clicked_cb), NULL);
53
 
        g_signal_connect(G_OBJECT(profile_combo), "changed", G_CALLBACK(profile_combo_change_cb), NULL);
54
 
 
55
 
        gtk_widget_set_tooltip_text(profile_eb, _("Choose the Media Profile that should be used to record."));