[gnac] Clicking on the GtkFileChooserButton in gnac-prefs makes it sensitive.
- From: Benoît Dupasquier <bdupasqu src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnac] Clicking on the GtkFileChooserButton in gnac-prefs makes it sensitive.
- Date: Sat, 22 Aug 2009 18:14:54 +0000 (UTC)
commit 6f11e0a3d648b86748e6330bae5f733664a146fa
Author: Benoît Dupasquier <bdupasqu src gnome org>
Date: Sat Aug 22 20:14:29 2009 +0200
Clicking on the GtkFileChooserButton in gnac-prefs makes it sensitive.
data/gnac-pref-window.xml | 20 +++++++++++++-------
src/gnac-prefs.c | 12 ++++++++----
2 files changed, 21 insertions(+), 11 deletions(-)
---
diff --git a/data/gnac-pref-window.xml b/data/gnac-pref-window.xml
index 735d74b..9815c4f 100644
--- a/data/gnac-pref-window.xml
+++ b/data/gnac-pref-window.xml
@@ -123,7 +123,7 @@
<child type="label">
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Display:</b></property>
+ <property name="label" translatable="yes"><b>Display</b></property>
<property name="use_markup">True</property>
</object>
</child>
@@ -197,10 +197,16 @@
</packing>
</child>
<child>
- <object class="GtkFileChooserButton" id="filechooserbutton">
+ <object class="GtkEventBox" id="selected_eventbox">
<property name="visible">True</property>
- <property name="action">select-folder</property>
- <signal name="selection_changed" handler="gnac_prefs_selected_uri_changed"/>
+ <signal name="button_press_event" handler="gnac_prefs_button_press_event_cb" object="selected_radiobutton"/>
+ <child>
+ <object class="GtkFileChooserButton" id="filechooserbutton">
+ <property name="visible">True</property>
+ <property name="action">select-folder</property>
+ <signal name="selection_changed" handler="gnac_prefs_selected_uri_changed"/>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">1</property>
@@ -339,7 +345,7 @@
<child type="label">
<object class="GtkLabel" id="conversion_frame_label">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>Conversion:</b></property>
+ <property name="label" translatable="yes"><b>Conversion</b></property>
<property name="use_markup">True</property>
</object>
</child>
@@ -452,7 +458,7 @@
<child>
<object class="GtkLabel" id="example_label">
<property name="visible">True</property>
- <property name="xalign">0.95</property>
+ <property name="xalign">0.94999998807907104</property>
<property name="use_markup">True</property>
<property name="ellipsize">start</property>
</object>
@@ -524,7 +530,7 @@
<child type="label">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
- <property name="label" translatable="yes"><b>File and folder naming:</b></property>
+ <property name="label" translatable="yes"><b>File and folder naming</b></property>
<property name="use_markup">True</property>
</object>
</child>
diff --git a/src/gnac-prefs.c b/src/gnac-prefs.c
index 1ff9914..42d0436 100644
--- a/src/gnac-prefs.c
+++ b/src/gnac-prefs.c
@@ -144,6 +144,7 @@ gnac_prefs_set_subfolder_mode(void)
GtkWidget *filechooserbutton;
GtkWidget *subfolder_entry;
GtkWidget *subfolder_label;
+ GtkWidget *selected_eventbox;
GtkWidget *selected_label;
filechooserbutton = GTK_WIDGET(gtk_builder_get_object(gnac_prefs_builder,
@@ -152,9 +153,12 @@ gnac_prefs_set_subfolder_mode(void)
"subfolder_entry"));
subfolder_label = GTK_WIDGET(gtk_builder_get_object(gnac_prefs_builder,
"subfolder_label"));
+ selected_eventbox = GTK_WIDGET(gtk_builder_get_object(gnac_prefs_builder,
+ "selected_eventbox"));
selected_label = GTK_WIDGET(gtk_builder_get_object(gnac_prefs_builder,
"selected_label"));
+ gtk_event_box_set_above_child(GTK_EVENT_BOX(selected_eventbox), TRUE);
gtk_widget_set_sensitive(subfolder_entry, TRUE);
gtk_widget_set_sensitive(filechooserbutton, FALSE);
gtk_widget_set_sensitive(subfolder_label, TRUE);
@@ -513,13 +517,13 @@ gnac_prefs_button_press_event_cb(GtkWidget *widget,
GdkEventButton *event,
gpointer user_data)
{
- GtkWidget *entry;
+ GtkWidget *child;
GType widget_type;
/* handle left clicks only */
if (event->button != 1) return FALSE;
- entry = gtk_bin_get_child(GTK_BIN(user_data));
+ child = gtk_bin_get_child(GTK_BIN(user_data));
widget_type = GTK_WIDGET_TYPE(widget);
if (widget_type == GTK_TYPE_COMBO_BOX)
@@ -534,8 +538,8 @@ gnac_prefs_button_press_event_cb(GtkWidget *widget,
}
gtk_event_box_set_above_child(GTK_EVENT_BOX(user_data), FALSE);
- gtk_widget_set_sensitive(entry, TRUE);
- gtk_widget_grab_focus(entry);
+ gtk_widget_set_sensitive(child, TRUE);
+ gtk_widget_grab_focus(child);
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]