make gnome-theme-installer work
2007-06-16 Jens Granseuer <jensgr@gmx.net> * Makefile.am: * appearance-main.c: (init_appearance_data), (main): * gnome-theme-installer.desktop.in.in: make gnome-theme-installer work svn path=/trunk/; revision=7731
This commit is contained in:
parent
dbc58d64cb
commit
cba96896bc
4 changed files with 53 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-06-16 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* Makefile.am:
|
||||
* appearance-main.c: (init_appearance_data), (main):
|
||||
* gnome-theme-installer.desktop.in.in: make gnome-theme-installer
|
||||
work
|
||||
|
||||
2007-06-16 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* Makefile.am:
|
||||
|
|
|
@ -55,7 +55,9 @@ wallpaperdir = $(datadir)/gnome-background-properties
|
|||
@INTLTOOL_DESKTOP_RULE@
|
||||
|
||||
desktopdir = $(datadir)/applications
|
||||
desktop_in_files = gnome-appearance-properties.desktop.in
|
||||
desktop_in_files = \
|
||||
gnome-appearance-properties.desktop.in \
|
||||
gnome-theme-installer.desktop.in
|
||||
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
|
||||
|
||||
@INTLTOOL_XML_RULE@
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "appearance-themes.h"
|
||||
#include "appearance-style.h"
|
||||
#include "appearance-ui.h"
|
||||
#include "theme-installer.h"
|
||||
#include "theme-thumbnail.h"
|
||||
#include "activate-settings-daemon.h"
|
||||
#include "capplet-util.h"
|
||||
|
@ -40,6 +41,10 @@ init_appearance_data (int *argc, char ***argv)
|
|||
gchar *gladefile;
|
||||
GladeXML *ui;
|
||||
|
||||
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
|
||||
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
|
||||
textdomain (GETTEXT_PACKAGE);
|
||||
|
||||
g_thread_init (NULL);
|
||||
theme_thumbnail_factory_init (*argc, *argv);
|
||||
gtk_init (argc, argv);
|
||||
|
@ -85,12 +90,28 @@ main (int argc, char **argv)
|
|||
AppearanceData *data;
|
||||
GtkWidget *win;
|
||||
GnomeProgram *program;
|
||||
gchar *install_filename = NULL;
|
||||
GOptionContext *option_context;
|
||||
GOptionEntry option_entries[] = {
|
||||
{ "install-theme",
|
||||
'i',
|
||||
G_OPTION_FLAG_IN_MAIN,
|
||||
G_OPTION_ARG_FILENAME,
|
||||
&install_filename,
|
||||
N_("Specify the filename of a theme to install"),
|
||||
N_("filename")
|
||||
},
|
||||
{ NULL }
|
||||
};
|
||||
|
||||
/* init */
|
||||
data = init_appearance_data (&argc, &argv);
|
||||
if (!data)
|
||||
return 1;
|
||||
|
||||
option_context = g_option_context_new (NULL);
|
||||
g_option_context_add_main_entries (option_context, option_entries, GETTEXT_PACKAGE);
|
||||
|
||||
/* this appears to be required for gnome_wm_manager_init (), which is called
|
||||
* inside gnome_meta_theme_set ();
|
||||
* TODO: try to remove if possible
|
||||
|
@ -98,8 +119,13 @@ main (int argc, char **argv)
|
|||
program = gnome_program_init ("appearance", VERSION,
|
||||
LIBGNOMEUI_MODULE, argc, argv,
|
||||
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
|
||||
GNOME_PARAM_GOPTION_CONTEXT, option_context,
|
||||
NULL);
|
||||
|
||||
if (install_filename != NULL)
|
||||
gnome_theme_install_from_uri (install_filename, NULL);
|
||||
g_free (install_filename);
|
||||
|
||||
/* init tabs */
|
||||
themes_init (data);
|
||||
style_init (data);
|
||||
|
|
17
capplets/appearance/gnome-theme-installer.desktop.in.in
Normal file
17
capplets/appearance/gnome-theme-installer.desktop.in.in
Normal file
|
@ -0,0 +1,17 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
_Name=Theme Installer
|
||||
_Comment=Installs themes packages for various parts of the desktop
|
||||
Exec=gnome-appearance-properties -i %u
|
||||
Icon=gnome-settings-theme
|
||||
Terminal=false
|
||||
Type=Application
|
||||
MimeType=application/x-gnome-theme-package;
|
||||
StartupNotify=true
|
||||
Categories=GNOME;GTK;
|
||||
# we don't want to show this at all in the menus
|
||||
OnlyShowIn=;
|
||||
X-GNOME-Bugzilla-Bugzilla=GNOME
|
||||
X-GNOME-Bugzilla-Product=gnome-control-center
|
||||
X-GNOME-Bugzilla-Component=Appearance
|
||||
X-GNOME-Bugzilla-Version=@VERSION@
|
Loading…
Add table
Add a link
Reference in a new issue