port from gnome-vfs to gio (part of bug #524401)
2008-05-01 Jens Granseuer <jensgr@gmx.net> * gnome-theme-apply.c: * gnome-theme-info.c: (get_file_type), (add_theme_to_hash_by_name), (get_theme_from_hash_by_name), (gnome_theme_read_meta_theme), (read_icon_theme), (gdk_pixbuf_from_xcursor_image), (read_cursor_theme), (handle_change_signal), (update_theme_index), (update_gtk2_index), (update_keybinding_index), (update_metacity_index), (update_common_theme_dir_index), (update_meta_theme_index), (update_icon_theme_index), (update_cursor_theme_index), (gtk2_dir_changed), (keybinding_dir_changed), (metacity_dir_changed), (common_theme_dir_changed), (common_icon_theme_dir_changed), (add_common_theme_dir_monitor), (add_common_icon_theme_dir_monitor), (remove_common_theme_dir_monitor), (remove_common_icon_theme_dir_monitor), (top_theme_dir_changed), (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor), (add_top_theme_dir_monitor), (add_top_icon_theme_dir_monitor), (gnome_theme_init): * gnome-theme-info.h: * gnome-theme-test.c: (main): port from gnome-vfs to gio (part of bug #524401) 2008-05-01 Jens Granseuer <jensgr@gmx.net> * appearance-themes.c: (themes_init): update for changes in the theme-info API 2008-05-01 Jens Granseuer <jensgr@gmx.net> * theme-method.c: (vfs_module_init): * themus-properties-view.c: (themus_properties_view_init), (themus_properties_view_set_location): * themus-theme-applier.c: (main): update users of the theme-info API svn path=/trunk/; revision=8681
This commit is contained in:
parent
79d007e929
commit
d714ff7e49
11 changed files with 615 additions and 778 deletions
|
@ -1,3 +1,11 @@
|
|||
2008-05-01 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* theme-method.c: (vfs_module_init):
|
||||
* themus-properties-view.c: (themus_properties_view_init),
|
||||
(themus_properties_view_set_location):
|
||||
* themus-theme-applier.c: (main): update users of the theme-info
|
||||
API
|
||||
|
||||
2008-03-11 Jens Granseuer <jensgr@gmx.net>
|
||||
|
||||
* theme-thumbnailer.c: (main): handle failed thumbnailing attempts
|
||||
|
|
|
@ -675,7 +675,7 @@ static GnomeVFSMethod method = {
|
|||
GnomeVFSMethod*
|
||||
vfs_module_init (const char *method_name, const char *args)
|
||||
{
|
||||
gnome_theme_init (NULL);
|
||||
gnome_theme_init ();
|
||||
if (!strcmp (method_name, "themes"))
|
||||
{
|
||||
gnome_theme_info_register_theme_change (theme_changed_callback, NULL);
|
||||
|
|
|
@ -20,9 +20,10 @@
|
|||
#include <config.h>
|
||||
|
||||
#include "themus-properties-view.h"
|
||||
#include <gnome-theme-info.h>
|
||||
#include "gnome-theme-info.h"
|
||||
|
||||
#include <glib/gi18n-lib.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#define LOAD_BUFFER_SIZE 8192
|
||||
|
@ -118,7 +119,7 @@ themus_properties_view_init (ThemusPropertiesView *self)
|
|||
THEMUS_TYPE_PROPERTIES_VIEW,
|
||||
ThemusPropertiesViewDetails);
|
||||
|
||||
gnome_theme_init (NULL);
|
||||
gnome_theme_init ();
|
||||
|
||||
gtk_table_resize (GTK_TABLE (self), 3, 2);
|
||||
gtk_table_set_homogeneous (GTK_TABLE (self), FALSE);
|
||||
|
@ -215,16 +216,16 @@ void
|
|||
themus_properties_view_set_location (ThemusPropertiesView *self,
|
||||
const char *location)
|
||||
{
|
||||
GnomeVFSURI *uri;
|
||||
GnomeThemeMetaInfo *theme;
|
||||
|
||||
g_assert (THEMUS_IS_PROPERTIES_VIEW (self));
|
||||
|
||||
if (location) {
|
||||
uri = gnome_vfs_uri_new (location);
|
||||
GFile *file;
|
||||
GnomeThemeMetaInfo *theme;
|
||||
|
||||
theme = gnome_theme_read_meta_theme (uri);
|
||||
gnome_vfs_uri_unref (uri);
|
||||
file = g_file_new_for_path (location);
|
||||
|
||||
theme = gnome_theme_read_meta_theme (file);
|
||||
g_object_unref (file);
|
||||
|
||||
gtk_label_set_text (GTK_LABEL (self->details->description),
|
||||
theme->comment);
|
||||
|
@ -243,4 +244,3 @@ themus_properties_view_set_location (ThemusPropertiesView *self,
|
|||
gtk_label_set_text (GTK_LABEL (self->details->icon_theme), "");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
|
||||
|
||||
/*
|
||||
/*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
|
@ -22,11 +22,11 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gio/gio.h>
|
||||
#include <gtk/gtk.h>
|
||||
#include <glade/glade.h>
|
||||
#include <libgnome/libgnome.h>
|
||||
#include <libgnomeui/gnome-ui-init.h>
|
||||
#include <libgnomevfs/gnome-vfs.h>
|
||||
#include <gconf/gconf-client.h>
|
||||
|
||||
#include <gnome-theme-info.h>
|
||||
|
@ -58,7 +58,7 @@ run_apply_font_dialog (GnomeThemeMetaInfo *theme)
|
|||
_("ABCDEFG"),
|
||||
"</span>",
|
||||
NULL));
|
||||
|
||||
|
||||
if (gtk_dialog_run (GTK_DIALOG(font_dialog)) == GTK_RESPONSE_OK)
|
||||
apply_font = TRUE;
|
||||
|
||||
|
@ -74,7 +74,7 @@ run_apply_font_dialog (GnomeThemeMetaInfo *theme)
|
|||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GnomeVFSURI *uri;
|
||||
GFile *file;
|
||||
GnomeThemeMetaInfo *theme;
|
||||
GnomeProgram *program;
|
||||
gboolean apply_font;
|
||||
|
@ -107,16 +107,13 @@ main (int argc, char **argv)
|
|||
goto error;
|
||||
}
|
||||
|
||||
uri = gnome_vfs_uri_new (arguments[0]);
|
||||
file = g_file_new_for_path (arguments[0]);
|
||||
g_strfreev (arguments);
|
||||
|
||||
if (!uri)
|
||||
goto error;
|
||||
gnome_theme_init ();
|
||||
|
||||
gnome_theme_init (NULL);
|
||||
|
||||
theme = gnome_theme_read_meta_theme (uri);
|
||||
gnome_vfs_uri_unref (uri);
|
||||
theme = gnome_theme_read_meta_theme (file);
|
||||
g_object_unref (file);
|
||||
|
||||
if (!theme)
|
||||
goto error;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue