[eog/wip/gaction-migration: 5/7] Add back eog_window_open_editor as we might still need it
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog/wip/gaction-migration: 5/7] Add back eog_window_open_editor as we might still need it
- Date: Wed, 17 Dec 2014 20:52:08 +0000 (UTC)
commit 567b86dbdb099f2b56afd8c88ff8d59ff8bf1004
Author: Felix Riemann <friemann gnome org>
Date: Wed Dec 17 20:08:39 2014 +0100
Add back eog_window_open_editor as we might still need it
https://bugzilla.gnome.org/show_bug.cgi?id=741050
src/eog-window.c | 41 ++++++++++++++++++++++++++++++++++++++++-
1 files changed, 40 insertions(+), 1 deletions(-)
---
diff --git a/src/eog-window.c b/src/eog-window.c
index 6655ca2..0d3d4e1 100644
--- a/src/eog-window.c
+++ b/src/eog-window.c
@@ -4033,6 +4033,7 @@ eog_window_ui_settings_changed_cb (GSettings *settings,
GAction *action = NULL;
g_return_if_fail (EOG_IS_WINDOW (user_data));
+ g_warn_if_reached();
window = EOG_WINDOW (user_data);
if (g_ascii_strcasecmp (key, EOG_CONF_UI_IMAGE_GALLERY) == 0) {
@@ -4050,6 +4051,8 @@ eog_window_ui_settings_changed_cb (GSettings *settings,
old_state = g_action_get_state (action);
+ g_print("change: %s\n", key);
+
if (g_variant_get_boolean (new_state) != g_variant_get_boolean (old_state))
g_action_change_state (action, new_state);
}
@@ -4328,6 +4331,42 @@ get_appinfo_for_editor (EogWindow *window)
return (GAppInfo *) app_info;
}
+#if 0
+static void
+eog_window_open_editor (GAction *action,
+ EogWindow *window)
+{
+ GdkAppLaunchContext *context;
+ GAppInfo *app_info;
+ GList files;
+
+ app_info = get_appinfo_for_editor (window);
+
+ if (app_info == NULL)
+ return;
+
+ context = gdk_display_get_app_launch_context (
+ gtk_widget_get_display (GTK_WIDGET (window)));
+ gdk_app_launch_context_set_screen (context,
+ gtk_widget_get_screen (GTK_WIDGET (window)));
+ gdk_app_launch_context_set_icon (context,
+ g_app_info_get_icon (app_info));
+ gdk_app_launch_context_set_timestamp (context,
+ gtk_get_current_event_time ());
+
+ {
+ GList f = { eog_image_get_file (window->priv->image) };
+ files = f;
+ }
+
+ g_app_info_launch (app_info, &files,
+ G_APP_LAUNCH_CONTEXT (context), NULL);
+
+ g_object_unref (files.data);
+ g_object_unref (context);
+}
+#endif
+
static void
eog_window_view_rotation_changed_cb (EogScrollView *view,
gdouble degrees,
@@ -4573,7 +4612,7 @@ eog_window_init (EogWindow *window)
* not trigger the state changed handler since the state is updated directly
* via the "state" property. Requesting a state change via this callback,
* however, works. */
- g_signal_connect (priv->ui_settings, "changed",
+ g_signal_connect (priv->ui_settings, "changed::image-gallery",
G_CALLBACK (eog_window_ui_settings_changed_cb),
window);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]