forked from pool/gnome-control-center
Accepting request 161869 from home:dimstar:branches:GNOME:Factory
Patch rebased - yast is launchable from g-c-c again OBS-URL: https://build.opensuse.org/request/show/161869 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/gnome-control-center?expand=0&rev=182
This commit is contained in:
parent
14f6874ce3
commit
b40b31cf86
@ -1,25 +1,51 @@
|
||||
Index: gnome-control-center-3.7.91/shell/cc-window.c
|
||||
Index: gnome-control-center-3.8.0/shell/cc-panel-loader.c
|
||||
===================================================================
|
||||
--- gnome-control-center-3.7.91.orig/shell/cc-window.c
|
||||
+++ gnome-control-center-3.7.91/shell/cc-window.c
|
||||
@@ -133,6 +133,39 @@ get_icon_name_from_g_icon (GIcon *gicon)
|
||||
--- gnome-control-center-3.8.0.orig/shell/cc-panel-loader.c
|
||||
+++ gnome-control-center-3.8.0/shell/cc-panel-loader.c
|
||||
@@ -102,6 +102,7 @@ static struct {
|
||||
#ifdef BUILD_WACOM
|
||||
PANEL_TYPE("wacom", cc_wacom_panel_get_type ),
|
||||
#endif
|
||||
+ PANEL_TYPE("YaST", NULL ),
|
||||
};
|
||||
|
||||
GList *
|
||||
@@ -160,8 +161,11 @@ cc_panel_loader_fill_model (CcShellModel
|
||||
char *desktop_name;
|
||||
int category;
|
||||
|
||||
- desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
||||
- "-panel.desktop", NULL);
|
||||
+ if (g_strcmp0 (all_panels[i].name, "YaST") == 0)
|
||||
+ desktop_name = g_strconcat (all_panels[i].name, ".desktop", NULL);
|
||||
+ else
|
||||
+ desktop_name = g_strconcat ("gnome-", all_panels[i].name,
|
||||
+ "-panel.desktop", NULL);
|
||||
app = g_desktop_app_info_new (desktop_name);
|
||||
|
||||
if (app == NULL)
|
||||
Index: gnome-control-center-3.8.0/shell/cc-window.c
|
||||
===================================================================
|
||||
--- gnome-control-center-3.8.0.orig/shell/cc-window.c
|
||||
+++ gnome-control-center-3.8.0/shell/cc-window.c
|
||||
@@ -134,6 +134,38 @@ get_icon_name_from_g_icon (GIcon *gicon)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static void
|
||||
+suse_activate_desktop (GnomeControlCenter *shell,
|
||||
+ const gchar *id,
|
||||
+ const gchar *desktop_file)
|
||||
+suse_activate_desktop (const gchar *name)
|
||||
+{
|
||||
+ GDesktopAppInfo *appinfo;
|
||||
+ GdkAppLaunchContext *context;
|
||||
+ const gchar *desktop_file;
|
||||
+ GdkScreen *screen;
|
||||
+ GdkDisplay *display;
|
||||
+ GdkAppLaunchContext *context;
|
||||
+ GError *error;
|
||||
+
|
||||
+ appinfo = g_desktop_app_info_new_from_filename (desktop_file);
|
||||
+ desktop_file = g_strconcat (name, ".desktop", NULL);
|
||||
+ appinfo = g_desktop_app_info_new (desktop_file);
|
||||
+
|
||||
+ screen = gtk_widget_get_screen (shell->priv->window);
|
||||
+ screen = gdk_screen_get_default();
|
||||
+ display = gdk_screen_get_display (screen);
|
||||
+ context = gdk_display_get_app_launch_context (display);
|
||||
+ gdk_app_launch_context_set_screen (context, screen);
|
||||
@ -28,10 +54,9 @@ Index: gnome-control-center-3.7.91/shell/cc-window.c
|
||||
+ error = NULL;
|
||||
+ g_app_info_launch_uris (G_APP_INFO (appinfo), NULL,
|
||||
+ (GAppLaunchContext *) context,
|
||||
+ &error);
|
||||
+
|
||||
+ &error);
|
||||
+ if (error) {
|
||||
+ g_printerr ("Could not launch '%s': %s\n", id, error->message);
|
||||
+ g_printerr ("Could not launch '%s': %s\n", name, error->message);
|
||||
+ g_clear_error (&error);
|
||||
+ }
|
||||
+
|
||||
@ -42,43 +67,16 @@ Index: gnome-control-center-3.7.91/shell/cc-window.c
|
||||
static gboolean
|
||||
activate_panel (CcWindow *self,
|
||||
const gchar *id,
|
||||
@@ -147,6 +180,11 @@ activate_panel (CcWindow *self
|
||||
@@ -148,6 +180,12 @@ activate_panel (CcWindow *self
|
||||
if (!id)
|
||||
return FALSE;
|
||||
|
||||
+ if (g_strcmp0 (id, "yast") == 0) {
|
||||
+ suse_activate_desktop (shell, id, "YaST.desktop");
|
||||
+ if (g_strcmp0 (id, "YaST") == 0)
|
||||
+ {
|
||||
+ suse_activate_desktop (name);
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
priv->current_panel = GTK_WIDGET (cc_panel_loader_load_by_name (CC_SHELL (self), id, argv));
|
||||
cc_shell_set_active_panel (CC_SHELL (self), CC_PANEL (priv->current_panel));
|
||||
gtk_widget_show (priv->current_panel);
|
||||
Index: gnome-control-center-3.7.91/shell/cc-panel-loader.c
|
||||
===================================================================
|
||||
--- gnome-control-center-3.7.91.orig/shell/cc-panel-loader.c
|
||||
+++ gnome-control-center-3.7.91/shell/cc-panel-loader.c
|
||||
@@ -178,6 +178,23 @@ cc_panel_loader_fill_model (CcShellModel
|
||||
cc_shell_model_add_item (model, category, G_APP_INFO (app), all_panels[i].name);
|
||||
g_object_unref (app);
|
||||
}
|
||||
+
|
||||
+ do
|
||||
+ {
|
||||
+ GDesktopAppInfo *app;
|
||||
+
|
||||
+ app = g_desktop_app_info_new ("YaST.desktop");
|
||||
+
|
||||
+ if (app == NULL)
|
||||
+ {
|
||||
+ g_warning ("Missing desktop file for YaST");
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ cc_shell_model_add_item (model, CC_CATEGORY_SYSTEM, G_APP_INFO (app), "yast");
|
||||
+ g_object_unref (app);
|
||||
+ }
|
||||
+ while (0);
|
||||
}
|
||||
|
||||
#ifndef CC_PANEL_LOADER_NO_GTYPES
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Mar 30 14:38:16 UTC 2013 - dimstar@opensuse.org
|
||||
|
||||
- Rebase gnome-control-center-allow-yast-in-shell.patch: allow
|
||||
YaST to be added to the gnome-control-center again.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Mar 26 10:24:50 UTC 2013 - dimstar@opensuse.org
|
||||
|
||||
|
@ -32,7 +32,7 @@ License: GPL-2.0+
|
||||
Group: System/GUI/GNOME
|
||||
Url: http://www.gnome.org
|
||||
Source: http://download.gnome.org/sources/gnome-control-center/3.8/%{name}-%{version}.tar.xz
|
||||
# NEEDS-REBASE PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch vuntz@opensuse.org -- Allow the launch of the yast shell from the g-c-c shell; it's quite ugly, but on the other hand, we don't want to change the behavior of the shell except for yast...
|
||||
# PATCH-FEATURE-OPENSUSE gnome-control-center-allow-yast-in-shell.patch vuntz@opensuse.org -- Allow the launch of the yast shell from the g-c-c shell; it's quite ugly, but on the other hand, we don't want to change the behavior of the shell except for yast...
|
||||
Patch0: gnome-control-center-allow-yast-in-shell.patch
|
||||
# PATCH-NEEDS-REBASE PATCH-HACK-OPENSUSE gnome-control-center-hide-region-system-tab.patch vuntz@opensuse.org -- Hide system tab in region panel until we really use the right files for system settings (see bnc#703833)
|
||||
Patch2: gnome-control-center-hide-region-system-tab.patch
|
||||
@ -154,8 +154,7 @@ various aspects of your desktop.
|
||||
%prep
|
||||
%setup -q
|
||||
translation-update-upstream
|
||||
# Needs rebase
|
||||
#patch0 -p1
|
||||
%patch0 -p1
|
||||
#Needs rebase
|
||||
#patch2 -p1
|
||||
%patch3 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user