Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Dorota Czaplejewicz
gtk
Commits
6f4df09a
Commit
6f4df09a
authored
Jan 20, 2011
by
William Jon McCann
Committed by
Matthias Clasen
Jan 20, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When cancelling the app dialog return to the last item in combobox
https://bugzilla.gnome.org/show_bug.cgi?id=640011
parent
9532e96d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
gtk/gtkappchooserbutton.c
gtk/gtkappchooserbutton.c
+5
-1
No files found.
gtk/gtkappchooserbutton.c
View file @
6f4df09a
...
...
@@ -88,6 +88,7 @@ G_DEFINE_TYPE_WITH_CODE (GtkAppChooserButton, gtk_app_chooser_button, GTK_TYPE_C
struct
_GtkAppChooserButtonPrivate
{
GtkListStore
*
store
;
int
last_active
;
gchar
*
content_type
;
gboolean
show_dialog_item
;
...
...
@@ -200,7 +201,7 @@ other_application_dialog_response_cb (GtkDialog *dialog,
/* reset the active item, otherwise we are stuck on
* 'Other application...'
*/
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
self
),
0
);
gtk_combo_box_set_active
(
GTK_COMBO_BOX
(
self
),
self
->
priv
->
last_active
);
gtk_widget_destroy
(
GTK_WIDGET
(
dialog
));
return
;
}
...
...
@@ -404,6 +405,7 @@ gtk_app_chooser_button_changed (GtkComboBox *object)
{
name_quark
=
g_quark_from_string
(
name
);
g_signal_emit
(
self
,
signals
[
SIGNAL_CUSTOM_ITEM_ACTIVATED
],
name_quark
,
name
);
self
->
priv
->
last_active
=
gtk_combo_box_get_active
(
object
);
}
else
{
...
...
@@ -413,6 +415,8 @@ gtk_app_chooser_button_changed (GtkComboBox *object)
g_free
(
name
);
}
else
self
->
priv
->
last_active
=
gtk_combo_box_get_active
(
object
);
}
static
void
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment