Change gnome2-* to gnome-* ditto ditto ditto ditto ditto ditto ditto ditto

Tue Apr  9 11:43:08 2002  Jonathan Blandford  <jrb@gnome.org>

	* capplets/accessibility/keyboard/Makefile.am: Change gnome2-* to
	gnome-*
	* capplets/default-applications/Makefile.am: ditto
	* capplets/file-types/Makefile.am: ditto
	* capplets/font/Makefile.am: ditto
	* capplets/keyboard/Makefile.am: ditto
	* capplets/mouse/Makefile.am: ditto
	* capplets/sound/Makefile.am: ditto
	* capplets/theme-switcher/Makefile.am: ditto
	* capplets/ui-properties/Makefile.am: ditto
	* control-center/Makefile.am: ditto
	* gnome-settings-daemon/Makefile.am: ditto

	* gnome-keybinding-properties.c (setup_dialog): man, was this code
	silly.  Also, themes are case sensitive.
	(is_metacity_running): Add support for metacity keybindings.  This
	is off by default until I write code to actually detect metacity.

Tue Apr  9 11:58:10 2002  Jonathan Blandford  <jrb@gnome.org>

	* Makefile.am: Add commented out disk support until I finish the code.
This commit is contained in:
Jonathan Blandford 2002-04-10 06:08:08 +00:00 committed by Jonathan Blandford
parent 5a1e076eed
commit 6f1fa592ec
26 changed files with 697 additions and 130 deletions

View file

@ -1,3 +1,18 @@
Tue Apr 9 11:43:08 2002 Jonathan Blandford <jrb@gnome.org>
* capplets/accessibility/keyboard/Makefile.am: Change gnome2-* to
gnome-*
* capplets/default-applications/Makefile.am: ditto
* capplets/file-types/Makefile.am: ditto
* capplets/font/Makefile.am: ditto
* capplets/keyboard/Makefile.am: ditto
* capplets/mouse/Makefile.am: ditto
* capplets/sound/Makefile.am: ditto
* capplets/theme-switcher/Makefile.am: ditto
* capplets/ui-properties/Makefile.am: ditto
* control-center/Makefile.am: ditto
* gnome-settings-daemon/Makefile.am: ditto
2002-04-05 jacob berkman <jacob@ximian.com>
* configure.ion (AC_OUTPUT): revert kevin's patch until help stuff

View file

@ -4,10 +4,10 @@ libaccessibility_keyboard_a_SOURCES = \
accessibility-keyboard.c \
accessibility-keyboard.h
bin_PROGRAMS = gnome2-accessibility-keyboard-properties
bin_PROGRAMS = gnome-accessibility-keyboard-properties
gnome2_accessibility_keyboard_properties_SOURCES = gnome-accessibility-keyboard-properties.c
gnome2_accessibility_keyboard_properties_LDADD = \
gnome_accessibility_keyboard_properties_SOURCES = gnome-accessibility-keyboard-properties.c
gnome_accessibility_keyboard_properties_LDADD = \
libaccessibility-keyboard.a $(GNOMECC_CAPPLETS_LIBS)
@INTLTOOL_DESKTOP_RULE@

View file

@ -236,9 +236,10 @@ setup_images (GladeXML *dialog, gboolean as_dialog)
int i = G_N_ELEMENTS (features);
while (i-- > 0)
if (features [i].image != NULL &&
(as_dialog || !features [i].only_for_dialog))
(as_dialog || !features [i].only_for_dialog)) {
gtk_image_set_from_file (GTK_IMAGE (WID (features [i].image)),
features [i].image_file);
}
}
static void
@ -248,6 +249,7 @@ setup_dialog (GladeXML *dialog, GConfChangeSet *changeset, gboolean as_dialog)
GtkWidget *page = WID ("accessX_page");
GObject *label;
g_return_if_fail (content != NULL);
g_return_if_fail (page != NULL);
@ -466,12 +468,18 @@ GtkWidget *
setup_accessX_dialog (GConfChangeSet *changeset, gboolean as_dialog)
{
GConfClient *client;
#if 1
char const *toplevel_name = as_dialog ? "accessX_dialog" : "accessX_page";
GladeXML *dialog = glade_xml_new (GNOMECC_DATA_DIR
"/interfaces/gnome-accessibility-keyboard-properties.glade2",
toplevel_name, NULL);
GtkWidget *toplevel = WID (toplevel_name);
#else
char const *toplevel_name = "key_access_dialog";
GladeXML *dialog = glade_xml_new ("access-foo.glade",
toplevel_name, NULL);
GtkWidget *toplevel = WID (toplevel_name);
#endif
client = gconf_client_get_default ();
gconf_client_add_dir (client, CONFIG_ROOT, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);

View file

@ -45,7 +45,6 @@ main (int argc, char **argv)
{
GtkWidget *dialog;
GConfChangeSet *changeset;
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);

View file

@ -6,7 +6,7 @@ INCLUDES = \
-DG_LOG_DOMAIN=\"capplet-common\" \
-I$(top_srcdir)/ \
-I$(top_srcdir)/libbackground \
@CAPPLET_CFLAGS@
@VFS_CAPPLET_CFLAGS@
noinst_LTLIBRARIES = libcommon.la

View file

@ -7,6 +7,8 @@
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
#include <libgnomevfs/gnome-vfs-ops.h>
#include "theme-common.h"
static GList *
@ -89,3 +91,45 @@ theme_common_list_free (GList *list)
g_list_foreach (list, g_free, NULL);
g_list_free (list);
}
static void
theme_dir_changed_callback (GnomeVFSMonitorHandle *handle,
const gchar *monitor_uri,
const gchar *info_uri,
GnomeVFSMonitorEventType event_type,
gpointer user_data)
{
g_print ("%s\n", monitor_uri);
g_closure_invoke ((GClosure *) user_data, NULL, 0, NULL, NULL);
}
void
theme_common_register_theme_change (GCallback func,
gpointer data)
{
GnomeVFSResult result;
GnomeVFSMonitorHandle *handle = NULL;
gchar *text_uri;
GClosure *closure;
/* We're unlikely to ever need to cancel this with the control center */
closure = g_cclosure_new (func, data, NULL);
text_uri = g_build_filename (g_get_home_dir (), ".themes", NULL);
gnome_vfs_monitor_add (&handle,
text_uri,
GNOME_VFS_MONITOR_DIRECTORY,
theme_dir_changed_callback,
closure);
g_free (text_uri);
text_uri = gtk_rc_get_theme_dir ();
gnome_vfs_monitor_add (&handle,
text_uri,
GNOME_VFS_MONITOR_DIRECTORY,
theme_dir_changed_callback,
closure);
g_free (text_uri);
}

View file

@ -13,8 +13,10 @@ struct _ThemeInfo
gboolean has_keybinding;
};
GList *theme_common_get_list (void);
void theme_common_list_free (GList *list);
GList *theme_common_get_list (void);
void theme_common_list_free (GList *list);
void theme_common_register_theme_change (GCallback func,
gpointer data);
#endif /* THEME_COMMON_H */

View file

@ -1,7 +1,7 @@
bin_PROGRAMS = gnome2-default-applications-properties
bin_PROGRAMS = gnome-default-applications-properties
gnome2_default_applications_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome2_default_applications_properties_SOURCES = \
gnome_default_applications_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome_default_applications_properties_SOURCES = \
gnome-default-applications-properties.c
@INTLTOOL_DESKTOP_RULE@

View file

@ -1,10 +1,10 @@
SUBDIRS = libuuid
bin_PROGRAMS = gnome2-file-types-properties
bin_PROGRAMS = gnome-file-types-properties
gnome2_file_types_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(VFS_CAPPLET_LIBS) libuuid/libuuid.a
gnome_file_types_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(VFS_CAPPLET_LIBS) libuuid/libuuid.a
gnome2_file_types_properties_SOURCES = \
gnome_file_types_properties_SOURCES = \
file-types-capplet.c \
mime-types-model.c mime-types-model.h \
model-entry.c model-entry.h \

View file

@ -1,9 +1,9 @@
bin_PROGRAMS = gnome2-font-properties
bin_PROGRAMS = gnome-font-properties
gnome2_font_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome2_font_properties_SOURCES = \
gnome_font_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome_font_properties_SOURCES = \
main.c
gnome2_font_properties_LDFLAGS = -export-dynamic
gnome_font_properties_LDFLAGS = -export-dynamic
@INTLTOOL_DESKTOP_RULE@

View file

@ -1,3 +1,10 @@
Sat Apr 6 11:57:50 2002 Jonathan Blandford <jrb@gnome.org>
* gnome-keybinding-properties.c (setup_dialog): man, was this code
silly. Also, themes are case sensitive.
(is_metacity_running): Add support for metacity keybindings. This
is off by default until I write code to actually detect metacity.
2002-03-29 Jody Goldberg <jody@gnome.org>
* gnome-keybinding-properties.c (create_dialog) : remove the startup

View file

@ -1,3 +1,7 @@
/* This program was written with lots of love under the GPL by Jonathan
* Blandford <jrb@gnome.org>
*/
#include <config.h>
#include <string.h>
@ -11,6 +15,10 @@
#include "activate-settings-daemon.h"
#define LABEL_DATA "gnome-keybinding-properties-label"
#define KEY_THEME_KEY "/desktop/gnome/interface/gtk_key_theme"
#define KEY_LIST_KEY "/apps/gnome_keybinding_properties/keybinding_key_list"
#define METACITY_KEY_LIST_KEY "/apps/metacity/general/configurable_keybinding_key_list"
#define MAX_ELEMENTS_BEFORE_SCROLLING 8
enum
{
@ -31,6 +39,13 @@ typedef struct
GList *signals = NULL;
static gboolean
is_metacity_running (void)
{
return FALSE;
}
static void
menu_item_activate (GtkWidget *menu_item,
gpointer unused)
@ -45,10 +60,10 @@ menu_item_activate (GtkWidget *menu_item,
key_theme = g_object_get_data (G_OBJECT (menu_item), LABEL_DATA);
g_return_if_fail (key_theme != NULL);
current_key_theme = gconf_client_get_string (client, "/desktop/gnome/interface/gtk_key_theme", &error);
current_key_theme = gconf_client_get_string (client, KEY_THEME_KEY, &error);
if (current_key_theme && strcmp (current_key_theme, key_theme))
{
gconf_client_set_string (client, "/desktop/gnome/interface/gtk_key_theme", key_theme, NULL);
gconf_client_set_string (client, KEY_THEME_KEY, key_theme, NULL);
}
}
@ -145,6 +160,7 @@ keybinding_key_changed (GConfClient *client,
key_entry->keyval = 0;
key_entry->mask = 0;
}
key_entry->editable = gconf_entry_get_is_writable (entry);
path = gtk_tree_path_new_first ();
for (valid = gtk_tree_model_get_iter_first (key_entry->model, &iter);
@ -167,7 +183,8 @@ keybinding_key_changed (GConfClient *client,
static void
clear_old_model (GtkWidget *tree_view)
clear_old_model (GladeXML *dialog,
GtkWidget *tree_view)
{
GtkTreeModel *model;
GtkTreeIter iter;
@ -177,39 +194,46 @@ clear_old_model (GtkWidget *tree_view)
client = gconf_client_get_default ();
model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
if (model == NULL)
return;
g_object_ref (model);
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), NULL);
for (valid = gtk_tree_model_get_iter_first (model, &iter);
valid;
valid = gtk_tree_model_iter_next (model, &iter))
if (model != NULL)
{
gtk_tree_model_get (model, &iter,
KEYENTRY_COLUMN, &key_entry,
-1);
gconf_client_notify_remove (client, key_entry->gconf_cnxn);
g_free (key_entry->gconf_key);
g_free (key_entry);
g_object_ref (model);
for (valid = gtk_tree_model_get_iter_first (model, &iter);
valid;
valid = gtk_tree_model_iter_next (model, &iter))
{
gtk_tree_model_get (model, &iter,
KEYENTRY_COLUMN, &key_entry,
-1);
gconf_client_notify_remove (client, key_entry->gconf_cnxn);
g_free (key_entry->gconf_key);
g_free (key_entry);
}
g_object_unref (model);
}
g_object_unref (model);
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("actions_swindow")),
GTK_POLICY_NEVER, GTK_POLICY_NEVER);
gtk_widget_set_usize (WID ("actions_swindow"), -1, -1);
}
static void
setup_tree (GladeXML *dialog,
GSList *keys_list)
append_keys_to_tree (GladeXML *dialog,
GSList *keys_list)
{
GConfClient *client;
GtkTreeModel *model;
GSList *list;
gint i = 0;
gint i;
clear_old_model (WID ("shortcut_treeview"));
client = gconf_client_get_default ();
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("shortcut_treeview")));
i = gtk_tree_model_iter_n_children (model, NULL);
for (list = keys_list; list; list = list->next)
{
@ -229,7 +253,7 @@ setup_tree (GladeXML *dialog,
&error);
if (error || entry == NULL)
{
/* We don't actually want to popup a dialog */
/* We don't actually want to popup a dialog - just skip this one */
g_free (key_string);
if (error)
g_error_free (error);
@ -241,7 +265,7 @@ setup_tree (GladeXML *dialog,
if (error || schema == NULL)
{
/* We don't actually want to popup a dialog */
/* We don't actually want to popup a dialog - just skip this one */
g_free (key_string);
if (error)
g_error_free (error);
@ -252,7 +276,7 @@ setup_tree (GladeXML *dialog,
key_entry = g_new0 (KeyEntry, 1);
key_entry->gconf_key = key_string;
key_entry->editable = TRUE;
key_entry->editable = gconf_entry_get_is_writable (entry);
key_entry->model = model;
gconf_client_add_dir (client, key_string, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
key_entry->gconf_cnxn = gconf_client_notify_add (client,
@ -270,6 +294,14 @@ setup_tree (GladeXML *dialog,
}
g_free (key_value);
if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
{
GtkRequisition rectangle;
gtk_widget_size_request (WID ("shortcut_treeview"), &rectangle);
gtk_widget_set_usize (WID ("actions_swindow"), -1, rectangle.height);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("actions_swindow")),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
i++;
gtk_list_store_append (GTK_LIST_STORE (model), &iter);
if (schema->short_desc)
@ -286,12 +318,6 @@ setup_tree (GladeXML *dialog,
gconf_schema_free (schema);
}
if (i > 8)
{
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("actions_swindow")),
GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER);
}
if (i == 0)
{
gtk_widget_hide (WID ("shortcuts_frame"));
@ -300,7 +326,6 @@ setup_tree (GladeXML *dialog,
{
gtk_widget_show (WID ("shortcuts_frame"));
}
gtk_tree_view_set_model (GTK_TREE_VIEW (WID ("shortcut_treeview")), model);
}
static void
@ -311,21 +336,68 @@ keybinding_key_list_changed (GConfClient *client,
{
GladeXML *dialog;
GSList *value_list, *list;
GSList *string_list = NULL;
GSList *keys_list = NULL;
dialog = user_data;
if (strcmp (entry->key, "/apps/gnome_keybinding_properties/keybinding_key_list"))
if (strcmp (entry->key, KEY_LIST_KEY))
return;
value_list = gconf_value_get_list (entry->value);
for (list = value_list; list; list = list->next)
{
GConfValue *value = list->data;
string_list = g_slist_append (string_list, (char *)gconf_value_get_string (value));
keys_list = g_slist_append (keys_list, (char *) gconf_value_get_string (value));
}
setup_tree (dialog, string_list);
g_slist_free (string_list);
clear_old_model (dialog, WID ("shortcut_treeview"));
append_keys_to_tree (dialog, keys_list);
g_slist_free (keys_list);
if (is_metacity_running ())
{
GSList *keys_list;
keys_list = gconf_client_get_list (client, METACITY_KEY_LIST_KEY, GCONF_VALUE_STRING, NULL);
append_keys_to_tree (dialog, keys_list);
}
}
static void
metacity_key_list_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
GladeXML *dialog;
GSList *value_list, *list;
GSList *keys_list;
if (strcmp (entry->key, METACITY_KEY_LIST_KEY))
return;
if (! is_metacity_running ())
return;
dialog = user_data;
clear_old_model (dialog, WID ("shortcut_treeview"));
keys_list = gconf_client_get_list (client, KEY_LIST_KEY, GCONF_VALUE_STRING, NULL);
append_keys_to_tree (dialog, keys_list);
g_slist_foreach (keys_list, (GFunc) g_free, NULL);
g_slist_free (keys_list);
keys_list = NULL;
value_list = gconf_value_get_list (entry->value);
for (list = value_list; list; list = list->next)
{
GConfValue *value;
value = list->data;
keys_list = g_slist_append (keys_list, (char *)gconf_value_get_string (value));
}
append_keys_to_tree (dialog, keys_list);
g_slist_free (keys_list);
}
static void
@ -431,12 +503,24 @@ setup_dialog (GladeXML *dialog)
GtkCellRenderer *renderer;
GSList *keys_list;
GtkWidget *widget;
gboolean found_keys = FALSE;
GList *list;
client = gconf_client_get_default ();
key_theme_list = theme_common_get_list ();
if (key_theme_list == NULL)
for (list = key_theme_list; list; list = list->next)
{
ThemeInfo *info = list->data;
if (info->has_keybinding)
{
found_keys = TRUE;
break;
}
}
if (! found_keys)
{
GtkWidget *msg_dialog = gtk_message_dialog_new (NULL, 0,
GTK_MESSAGE_ERROR,
@ -454,7 +538,6 @@ setup_dialog (GladeXML *dialog)
GtkWidget *menu;
GtkWidget *menu_item;
GConfEntry *entry;
GList *list;
omenu = WID ("key_theme_omenu");
menu = gtk_menu_new ();
@ -465,37 +548,25 @@ setup_dialog (GladeXML *dialog)
if (! info->has_keybinding)
continue;
/* Make sure we have a default */
if (!strcasecmp (info->name, "default"))
{
menu_item = make_key_theme_menu_item (info->name);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
menu_item = make_key_theme_menu_item (info->name);
if (!strcmp (info->name, "Default"))
/* Put default first, always */
gtk_menu_shell_prepend (GTK_MENU_SHELL (menu), menu_item);
else
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
for (list = key_theme_list; list; list = list->next)
{
ThemeInfo *info = list->data;
if (! info->has_keybinding)
continue;
if (strcasecmp (info->name, "default"))
{
menu_item = make_key_theme_menu_item (info->name);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
}
}
gtk_widget_show (menu);
gtk_option_menu_set_menu (GTK_OPTION_MENU (omenu), menu);
gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client,
"/desktop/gnome/interface/gtk_key_theme",
KEY_THEME_KEY,
(GConfClientNotifyFunc) &key_theme_changed,
omenu, NULL, NULL);
/* Initialize the option menu */
entry = gconf_client_get_entry (client,
"/desktop/gnome/interface/gtk_key_theme",
KEY_THEME_KEY,
NULL, TRUE, NULL);
key_theme_changed (client, 0, entry, omenu);
@ -521,11 +592,29 @@ setup_dialog (GladeXML *dialog)
accel_set_func, NULL, NULL);
gconf_client_add_dir (client, "/apps/gnome_keybinding_properties", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client,
"/apps/gnome_keybinding_properties/keybinding_key_list",
KEY_LIST_KEY,
(GConfClientNotifyFunc) &keybinding_key_list_changed,
dialog, NULL, NULL);
keys_list = gconf_client_get_list (client, "/apps/gnome_keybinding_properties/keybinding_key_list", GCONF_VALUE_STRING, NULL);
setup_tree (dialog, keys_list);
gconf_client_add_dir (client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client,
METACITY_KEY_LIST_KEY,
(GConfClientNotifyFunc) &metacity_key_list_changed,
dialog, NULL, NULL);
/* set up the dialog */
clear_old_model (dialog, WID ("shortcut_treeview"));
keys_list = gconf_client_get_list (client, KEY_LIST_KEY, GCONF_VALUE_STRING, NULL);
append_keys_to_tree (dialog, keys_list);
g_slist_foreach (keys_list, (GFunc) g_free, NULL);
g_slist_free (keys_list);
if (is_metacity_running ())
{
keys_list = gconf_client_get_list (client, METACITY_KEY_LIST_KEY, GCONF_VALUE_STRING, NULL);
append_keys_to_tree (dialog, keys_list);
g_slist_foreach (keys_list, (GFunc) g_free, NULL);
g_slist_free (keys_list);
}
widget = WID ("gnome-keybinding-dialog");
gtk_widget_show (widget);

View file

@ -4,7 +4,6 @@
<glade-interface>
<widget class="GtkDialog" id="gnome-keybinding-dialog">
<property name="visible">False</property>
<property name="title" translatable="yes">Keyboard Shortcuts</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
@ -107,7 +106,7 @@
<property name="visible">True</property>
<property name="label" translatable="yes">Desktop Shortcuts:</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_NONE</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
<widget class="GtkVBox" id="vbox4">
@ -144,23 +143,53 @@
</child>
<child>
<widget class="GtkLabel" id="label9">
<widget class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="label" translatable="yes">To assign a shortcut to an action, click in the shortcut column and press the key combination you want to associate with it.</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
<property name="homogeneous">False</property>
<property name="spacing">8</property>
<child>
<widget class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="stock">gtk-dialog-info</property>
<property name="icon_size">6</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label10">
<property name="visible">True</property>
<property name="label" translatable="yes">To assign a shortcut to an action, click in the shortcut column and press the key combination you want to associate with it.</property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">True</property>
<property name="selectable">False</property>
<property name="xalign">0</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>

View file

@ -1,7 +1,7 @@
bin_PROGRAMS = gnome2-keyboard-properties
bin_PROGRAMS = gnome-keyboard-properties
gnome2_keyboard_properties_SOURCES = gnome-keyboard-properties.c
gnome2_keyboard_properties_LDADD = \
gnome_keyboard_properties_SOURCES = gnome-keyboard-properties.c
gnome_keyboard_properties_LDADD = \
../accessibility/keyboard/libaccessibility-keyboard.a \
$(GNOMECC_CAPPLETS_LIBS)

View file

@ -1,7 +1,7 @@
bin_PROGRAMS = gnome2-mouse-properties
bin_PROGRAMS = gnome-mouse-properties
gnome2_mouse_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome2_mouse_properties_SOURCES = gnome-mouse-properties.c
gnome_mouse_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome_mouse_properties_SOURCES = gnome-mouse-properties.c
@INTLTOOL_DESKTOP_RULE@

View file

@ -715,7 +715,7 @@ main (int argc, char **argv)
setup_dialog (dialog, changeset);
dialog_win = gtk_dialog_new_with_buttons
(_("Mouse Properties"), NULL, -1,
(_("Mouse Properties"), NULL, 0,
GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
NULL);

View file

@ -6,7 +6,7 @@
<property name="title" translatable="yes">Mouse Properties</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="modal">no</property>
<property name="allow_shrink">no</property>
<property name="allow_shrink">yes</property>
<property name="allow_grow">no</property>
<property name="visible">no</property>
<property name="window-position">GTK_WIN_POS_NONE</property>
@ -352,9 +352,7 @@
</child>
<child>
<widget class="GtkLabel" id="label19">
<property name="label"
translatable="yes">&lt;b&gt;Note:&lt;/b&gt;
You will need to logout and log back in for this setting to take effect.</property>
<property name="label" translatable="yes">&lt;b&gt;Note:&lt;/b&gt; You will need to logout and log back in for this setting to take effect.</property>
<property name="justify">GTK_JUSTIFY_LEFT</property>
<property name="wrap">yes</property>
<property name="use_markup">yes</property>

View file

@ -1,7 +1,7 @@
bin_PROGRAMS = gnome2-sound-properties
bin_PROGRAMS = gnome-sound-properties
gnome2_sound_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(SOUND_CAPPLET_LIBS) $(top_builddir)/libsounds/libsounds.a
gnome2_sound_properties_SOURCES = sound-properties-capplet.c
gnome_sound_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(SOUND_CAPPLET_LIBS) $(top_builddir)/libsounds/libsounds.a
gnome_sound_properties_SOURCES = sound-properties-capplet.c
@INTLTOOL_DESKTOP_RULE@

View file

@ -1,11 +1,9 @@
SUBDIRS = control
bin_PROGRAMS = gnome-font-and-theme-properties
bin_PROGRAMS = gtk2-theme-selector-capplet
gtk2_theme_selector_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gtk2_theme_selector_capplet_SOURCES = \
main.c
gtk2_theme_selector_capplet_LDFLAGS = -export-dynamic
gnome_font_and_theme_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome_font_and_theme_properties_SOURCES = \
gnome-font-and-theme-properties.c
gnome_font_and_theme_properties_LDFLAGS = -export-dynamic
@INTLTOOL_DESKTOP_RULE@

View file

@ -0,0 +1,226 @@
/* This program was written with lots of love under the GPL by Jonathan
* Blandford <jrb@gnome.org>
*/
#include <config.h>
#include <string.h>
#include <gtk/gtk.h>
#include <gconf/gconf-client.h>
#include <glade/glade.h>
#include "theme-common.h"
#include "capplet-util.h"
#include "activate-settings-daemon.h"
#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
#define MAX_ELEMENTS_BEFORE_SCROLLING 8
enum
{
THEME_NAME_COLUMN,
N_COLUMNS
};
gboolean setting_model = FALSE;
static GladeXML *
create_dialog (void)
{
GladeXML *dialog;
dialog = glade_xml_new ("./gnome-font-and-theme-properties.glade", "font_and_theme_dialog", NULL);
return dialog;
}
static void
theme_selection_changed (GtkTreeSelection *selection,
gpointer data)
{
GtkTreeModel *model;
gchar *new_key;
GConfClient *client;
GtkTreeIter iter;
if (setting_model)
return;
client = gconf_client_get_default ();
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{
gtk_tree_model_get (model, &iter,
THEME_NAME_COLUMN, &new_key,
-1);
}
else
/* This shouldn't happen */
{
new_key = NULL;
}
if (new_key != NULL)
{
gchar *old_key;
old_key = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
if (old_key && strcmp (old_key, new_key))
{
gconf_client_set_string (client, GTK_THEME_KEY, new_key, NULL);
}
g_free (old_key);
}
else
{
gconf_client_unset (client, GTK_THEME_KEY, NULL);
}
g_free (new_key);
}
static void
read_themes (GladeXML *dialog)
{
GConfClient *client;
GList *gtk_theme_list;
GList *list;
GtkTreeModel *model;
gchar *current_theme;
gint i = 0;
gboolean current_theme_found = FALSE;
client = gconf_client_get_default ();
gtk_theme_list = theme_common_get_list ();
model = gtk_tree_view_get_model (GTK_TREE_VIEW (WID ("theme_treeview")));
setting_model = TRUE;
gtk_list_store_clear (GTK_LIST_STORE (model));
current_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
if (current_theme == NULL)
current_theme = g_strdup ("Default");
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("theme_swindow")),
GTK_POLICY_NEVER, GTK_POLICY_NEVER);
gtk_widget_set_usize (WID ("theme_swindow"), -1, -1);
for (list = gtk_theme_list; list; list = list->next)
{
ThemeInfo *info = list->data;
GtkTreeIter iter;
if (! info->has_gtk)
continue;
gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
THEME_NAME_COLUMN, info->name,
-1);
if (strcmp (current_theme, info->name) == 0)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview")));
gtk_tree_selection_select_iter (selection, &iter);
current_theme_found = TRUE;
}
if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
{
GtkRequisition rectangle;
gtk_widget_size_request (WID ("theme_treeview"), &rectangle);
gtk_widget_set_usize (WID ("theme_swindow"), -1, rectangle.height);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("theme_swindow")),
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
}
i++;
}
if (! current_theme_found)
{
GtkTreeSelection *selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview")));
GtkTreeIter iter;
gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
THEME_NAME_COLUMN, current_theme,
-1);
gtk_tree_selection_select_iter (selection, &iter);
}
setting_model = FALSE;
g_free (current_theme);
}
static void
theme_key_changed (GConfClient *client,
guint cnxn_id,
GConfEntry *entry,
gpointer user_data)
{
if (strcmp (entry->key, GTK_THEME_KEY))
return;
read_themes ((GladeXML *)user_data);
}
static void
setup_dialog (GladeXML *dialog)
{
GConfClient *client;
GtkWidget *widget;
GtkTreeModel *model;
GtkTreeSelection *selection;
client = gconf_client_get_default ();
gtk_tree_view_insert_column_with_attributes (GTK_TREE_VIEW (WID ("theme_treeview")),
-1, NULL,
gtk_cell_renderer_text_new (),
"text", THEME_NAME_COLUMN,
NULL);
gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
gconf_client_notify_add (client,
GTK_THEME_KEY,
(GConfClientNotifyFunc) &theme_key_changed,
dialog, NULL, NULL);
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
gtk_tree_view_set_model (GTK_TREE_VIEW (WID ("theme_treeview")), model);
selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("theme_treeview")));
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
g_signal_connect (G_OBJECT (selection), "changed", (GCallback) theme_selection_changed, NULL);
read_themes (dialog);
widget = WID ("font_and_theme_dialog");
gtk_widget_show (widget);
g_signal_connect (G_OBJECT (widget), "response", gtk_main_quit, NULL);
g_signal_connect (G_OBJECT (widget), "close", gtk_main_quit, NULL);
}
int
main (int argc, char *argv[])
{
GladeXML *dialog;
gtk_init (&argc, &argv);
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
textdomain (GETTEXT_PACKAGE);
gnome_program_init (argv[0], VERSION, LIBGNOMEUI_MODULE, argc, argv,
GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
NULL);
activate_settings_daemon ();
dialog = create_dialog ();
setup_dialog (dialog);
gtk_main ();
return 0;
}

View file

@ -0,0 +1,145 @@
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
<glade-interface>
<widget class="GtkDialog" id="font_and_theme_dialog">
<property name="visible">True</property>
<property name="title" translatable="yes">Font and Theme Properties</property>
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox1">
<property name="border_width">2</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">0</property>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area1">
<property name="border_width">5</property>
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<property name="spacing">10</property>
<child>
<widget class="GtkButton" id="helpbutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-help</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-11</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="closebutton1">
<property name="visible">True</property>
<property name="can_default">True</property>
<property name="can_focus">True</property>
<property name="label">gtk-close</property>
<property name="use_stock">True</property>
<property name="relief">GTK_RELIEF_NORMAL</property>
<property name="response_id">-7</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
<child>
<widget class="GtkVBox" id="vbox1">
<property name="border_width">8</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">8</property>
<child>
<widget class="GtkFrame" id="theme_frame">
<property name="visible">True</property>
<property name="label" translatable="yes">Themes</property>
<property name="label_xalign">0</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<child>
<widget class="GtkHBox" id="hbox1">
<property name="border_width">4</property>
<property name="visible">True</property>
<property name="homogeneous">False</property>
<property name="spacing">4</property>
<child>
<placeholder/>
</child>
<child>
<widget class="GtkScrolledWindow" id="theme_swindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
<child>
<widget class="GtkTreeView" id="theme_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="headers_visible">False</property>
<property name="rules_hint">True</property>
<property name="reorderable">False</property>
<property name="enable_search">True</property>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
</widget>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
<child>
<placeholder/>
</child>
<child>
<placeholder/>
</child>
</widget>
<packing>
<property name="padding">0</property>
<property name="expand">True</property>
<property name="fill">True</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface>

View file

@ -1,7 +1,7 @@
bin_PROGRAMS = gnome2-ui-properties
bin_PROGRAMS = gnome-ui-properties
gnome2_ui_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome2_ui_properties_SOURCES = \
gnome_ui_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
gnome_ui_properties_SOURCES = \
gnome-ui-properties.c
@INTLTOOL_DESKTOP_RULE@
@ -16,7 +16,7 @@ desktopdir = $(GNOMECC_DESKTOP_DIR)
Desktop_in_files = behavior.desktop.in
desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
Gladedir = $(GNOMECC_GLADE_DIR)
Glade_DATA = gnome2-ui-properties.glade
Glade_DATA = gnome-ui-properties.glade
INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
EXTRA_DIST = $(Glade_DATA) $(icons_DATA) $(Desktop_in_files)

View file

@ -25,9 +25,9 @@ INCLUDES = \
-DGNOME_SBINDIR=\""$(sbindir)"\" \
$(GNOMECC_CFLAGS)
bin_PROGRAMS = gnome2-control-center
bin_PROGRAMS = gnome-control-center
gnome2_control_center_SOURCES = \
gnome_control_center_SOURCES = \
main.c \
capplet-dir.c capplet-dir.h \
capplet-dir-view.c capplet-dir-view.h \
@ -35,7 +35,7 @@ gnome2_control_center_SOURCES = \
# capplet-dir-view-tree.c
gnome2_control_center_LDADD = $(GNOMECC_LIBS)
gnome_control_center_LDADD = $(GNOMECC_LIBS)
EXTRA_DIST = gnomecc.desktop.in $(appicon_DATA) $(splash_DATA) $(ui_DATA)

View file

@ -1,3 +1,7 @@
Tue Apr 9 11:58:10 2002 Jonathan Blandford <jrb@gnome.org>
* Makefile.am: Add commented out disk support until I finish the code.
2002-04-04 jacob berkman <jacob@ximian.com>
* gnome-settings-accessibility-keyboard.c (set_server_from_gconf):

View file

@ -1,8 +1,8 @@
INCLUDES=$(GNOME_SETTINGS_DAEMON_CFLAGS) -I$(top_srcdir)/libbackground -I$(top_srcdir)
bin_PROGRAMS=gnome2-settings-daemon
bin_PROGRAMS=gnome-settings-daemon
gnome2_settings_daemon_SOURCES = \
gnome_settings_daemon_SOURCES = \
factory.c \
gnome-settings-daemon.h \
gnome-settings-daemon.c \
@ -32,7 +32,7 @@ gnome2_settings_daemon_SOURCES = \
xsettings-manager.h \
$(CORBA_GENERATED)
gnome2_settings_daemon_LDADD = \
gnome_settings_daemon_LDADD = \
$(GNOME_SETTINGS_DAEMON_LIBS) \
$(top_builddir)/libbackground/libbackground.la \
$(top_builddir)/libsounds/libsounds.a \

View file

@ -34,6 +34,7 @@
#include "xsettings-manager.h"
#include "gnome-settings-daemon.h"
/*#include "gnome-settings-disk.h"*/
#include "gnome-settings-font.h"
#include "gnome-settings-xsettings.h"
#include "gnome-settings-mouse.h"
@ -224,6 +225,7 @@ gnome_settings_daemon_new (void)
*/
client = gconf_client_get_default ();
/* gnome_settings_disk_init (client);*/
gnome_settings_font_init (client);
gnome_settings_xsettings_init (client);
gnome_settings_mouse_init (client);
@ -261,6 +263,7 @@ gnome_settings_daemon_new (void)
gdk_window_add_filter (NULL, manager_event_filter, NULL);
/* gnome_settings_disk_load (client);*/
gnome_settings_font_load (client);
gnome_settings_xsettings_load (client);
gnome_settings_mouse_load (client);