Try my best to throw a monkey wrench in things. Checkin Windows capplet,
2002-08-08 Seth Nickell <snickell@stanford.edu> Try my best to throw a monkey wrench in things. Checkin Windows capplet, and add window related settings to the font capplet and theme capplet. Also fix button alignments on all capplets.
This commit is contained in:
parent
f40d584822
commit
e5071f4434
26 changed files with 726 additions and 222 deletions
|
@ -1,3 +1,11 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
Try my best to throw a monkey wrench in things. Checkin
|
||||
Windows capplet, and add window related settings to
|
||||
the font capplet and theme capplet.
|
||||
|
||||
Also fix button alignments on all capplets.
|
||||
|
||||
2002-07-27 Mark McLoughlin <mark@skynet.ie>
|
||||
|
||||
* configure.in: add check for gtk+ with multihead
|
||||
|
|
|
@ -1,3 +1,11 @@
|
|||
2002-06-24 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* font-properties.glade:
|
||||
* main.c: (setup_dialog):
|
||||
|
||||
Add a font picker for controlling the window title font (and size).
|
||||
Set border widths nicely so things align.
|
||||
|
||||
2002-07-24 jacob berkman <jacob@ximian.com>
|
||||
|
||||
* Makefile.am (EXTRA_DIST): dist the pixel icons
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
|
||||
<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>
|
||||
|
@ -65,7 +64,7 @@
|
|||
<widget class="GtkTable" id="table3">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_rows">4</property>
|
||||
<property name="n_columns">2</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="row_spacing">8</property>
|
||||
|
@ -452,9 +451,53 @@
|
|||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">fill</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label12">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Window title font:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_RIGHT</property>
|
||||
<property name="wrap">False</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="mnemonic_widget">desktop_font</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="right_attach">1</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GnomeFontPicker" id="window_title_font">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="mode">GNOME_FONT_PICKER_MODE_FONT_INFO</property>
|
||||
<property name="show_size">True</property>
|
||||
<property name="use_font_in_label">True</property>
|
||||
<property name="label_font_size">14</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">fill</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -479,7 +522,6 @@
|
|||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox3">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
#include "activate-settings-daemon.h"
|
||||
#include "gconf-property-editor.h"
|
||||
|
||||
|
||||
#ifdef HAVE_XFT2
|
||||
static void cb_show_details (GtkWidget *button,
|
||||
GtkWindow *parent);
|
||||
|
@ -28,6 +27,7 @@ static void cb_show_details (GtkWidget *button,
|
|||
|
||||
#define GTK_FONT_KEY "/desktop/gnome/interface/font_name"
|
||||
#define DESKTOP_FONT_KEY "/apps/nautilus/preferences/desktop_font"
|
||||
#define WINDOW_TITLE_FONT_KEY "/desktop/gnome/applications/window_manager/titlebar_font"
|
||||
|
||||
#ifdef HAVE_XFT2
|
||||
#define FONT_RENDER_DIR "/desktop/gnome/font_rendering"
|
||||
|
@ -421,6 +421,10 @@ setup_dialog (GladeXML *dialog)
|
|||
WID ("desktop_font"),
|
||||
PEDITOR_FONT_COMBINED, NULL);
|
||||
|
||||
peditor = gconf_peditor_new_font (NULL, WINDOW_TITLE_FONT_KEY,
|
||||
WID ("window_title_font"),
|
||||
PEDITOR_FONT_COMBINED, NULL);
|
||||
|
||||
widget = WID ("font_dialog");
|
||||
capplet_set_icon (widget, "font-capplet.png");
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-keybinding-properties.glade:
|
||||
|
||||
Set border widths correctly so things align nicely.
|
||||
|
||||
2002-06-27 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* gnome-keybinding-properties.c (setup_dialog) : fix and move the code
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="shortcut_dialog">
|
||||
<property name="border_width">2</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
@ -61,7 +60,7 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox3">
|
||||
<property name="border_width">8</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-keyboard-properties.glade:
|
||||
|
||||
Set border widths nicely so things align.
|
||||
|
||||
2002-08-01 Federico Mena Quintero <federico@ximian.com>
|
||||
|
||||
* gnome-keyboard-properties.glade: Made the file entry modal.
|
||||
|
|
|
@ -15,10 +15,9 @@
|
|||
|
||||
<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">8</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area1">
|
||||
|
@ -130,6 +129,7 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
|
@ -152,7 +152,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox5">
|
||||
|
@ -408,7 +408,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox6">
|
||||
|
@ -634,7 +634,7 @@
|
|||
<widget class="GtkFrame" id="frame1">
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox2">
|
||||
|
@ -845,7 +845,7 @@
|
|||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
<property name="shadow_type">GTK_SHADOW_NONE</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox3">
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-mouse-properties.glade:
|
||||
|
||||
Fix alignments.
|
||||
|
||||
2002-07-16 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* gnome-mouse-properties.c (main) : set icon.
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="prefs_widget">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-network-preferences.glade:
|
||||
|
||||
Fix alignment.
|
||||
|
||||
2002-07-10 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
http://bugzilla.gnome.org/show_bug.cgi?id=85929
|
||||
|
|
|
@ -64,7 +64,7 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox12">
|
||||
<property name="border_width">8</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">2</property>
|
||||
|
|
|
@ -1,83 +1,92 @@
|
|||
<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
|
||||
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd" >
|
||||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<glade-interface>
|
||||
|
||||
<widget class="GtkWindow" id="window1">
|
||||
<property name="title" translatable="yes">Sound Preferences</property>
|
||||
<property name="type">GTK_WINDOW_TOPLEVEL</property>
|
||||
<property name="modal">no</property>
|
||||
<property name="allow_shrink">no</property>
|
||||
<property name="allow_grow">yes</property>
|
||||
<property name="visible">no</property>
|
||||
<property name="window-position">GTK_WIN_POS_NONE</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>
|
||||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="prefs_widget">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="show_tabs">yes</property>
|
||||
<property name="show_border">yes</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
<property name="show_border">True</property>
|
||||
<property name="tab_pos">GTK_POS_TOP</property>
|
||||
<property name="scrollable">no</property>
|
||||
<property name="scrollable">False</property>
|
||||
<property name="tab_hborder">2</property>
|
||||
<property name="tab_vborder">2</property>
|
||||
<property name="enable-popup">no</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="enable_popup">False</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox1">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">5</property>
|
||||
<property name="visible">yes</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="enable_toggle">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">E_nable sound server startup</property>
|
||||
<property name="active">no</property>
|
||||
<property name="draw_indicator">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="enable_toggled_cb"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkCheckButton" id="events_toggle">
|
||||
<property name="can_focus">yes</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Sounds for events</property>
|
||||
<property name="active">no</property>
|
||||
<property name="draw_indicator">yes</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</property>
|
||||
<property name="active">False</property>
|
||||
<property name="inconsistent">False</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
<signal name="toggled" handler="events_toggled_cb"/>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">no</property>
|
||||
<property name="fill">no</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_General</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
@ -86,23 +95,29 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="events_vbox">
|
||||
<property name="homogeneous">no</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
<property name="visible">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Sound _Events</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_CENTER</property>
|
||||
<property name="wrap">no</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="visible">yes</property>
|
||||
<property name="use_underline">yes</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">tab</property>
|
||||
|
@ -111,4 +126,5 @@
|
|||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
||||
</glade-interface>
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
bin_PROGRAMS = gnome-theme-properties
|
||||
|
||||
gnome_theme_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
|
||||
gnome_theme_properties_LDADD = \
|
||||
$(GNOMECC_CAPPLETS_LIBS) \
|
||||
-L$(top_builddir)/libwindow-settings/ -lgnome-window-settings
|
||||
|
||||
gnome_theme_properties_SOURCES = \
|
||||
theme-switcher.c
|
||||
gnome_theme_properties_LDFLAGS = -export-dynamic
|
||||
|
@ -15,6 +18,7 @@ gladedir = $(GNOMECC_GLADE_DIR)
|
|||
glade_DATA = theme-properties.glade theme-install.glade
|
||||
|
||||
INCLUDES = \
|
||||
-I$(top_srcdir) \
|
||||
$(GNOMECC_CAPPLETS_CFLAGS) \
|
||||
-DGLADEDIR=\""$(gladedir)"\"
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
|
||||
|
||||
<glade-interface>
|
||||
<requires lib="gnome"/>
|
||||
|
||||
<widget class="GtkDialog" id="theme_dialog">
|
||||
<property name="visible">True</property>
|
||||
|
@ -16,7 +15,6 @@
|
|||
|
||||
<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>
|
||||
|
@ -62,20 +60,25 @@
|
|||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkNotebook" id="notebook1">
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="show_tabs">True</property>
|
||||
<property name="show_border">True</property>
|
||||
<property name="tab_pos">GTK_POS_TOP</property>
|
||||
<property name="scrollable">False</property>
|
||||
<property name="tab_hborder">2</property>
|
||||
<property name="tab_vborder">2</property>
|
||||
<property name="enable_popup">False</property>
|
||||
|
||||
<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="frame1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<property name="label_yalign">0.5</property>
|
||||
<property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox4">
|
||||
<property name="border_width">8</property>
|
||||
|
@ -106,9 +109,6 @@
|
|||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">True</property>
|
||||
<accessibility>
|
||||
<atkproperty name="AtkObject::accessible_description" translatable="yes">List of available GTK+ themes</atkproperty>
|
||||
</accessibility>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -168,6 +168,13 @@
|
|||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox5">
|
||||
|
@ -215,17 +222,21 @@
|
|||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label9">
|
||||
<widget class="GtkLabel" id="label11">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Installed Themes</property>
|
||||
<property name="label" translatable="yes">Widget Theme</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
|
@ -237,7 +248,75 @@
|
|||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="type">label_item</property>
|
||||
<property name="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="vbox5">
|
||||
<property name="border_width">8</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkHBox" id="hbox7">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkScrolledWindow" id="window_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_IN</property>
|
||||
<property name="window_placement">GTK_CORNER_TOP_LEFT</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkTreeView" id="window_theme_treeview">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="headers_visible">False</property>
|
||||
<property name="rules_hint">False</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>
|
||||
<widget class="GtkVBox" id="vbox6">
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">8</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkButton" id="window_manage_button">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="label" translatable="yes">_Go to theme folder</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="relief">GTK_RELIEF_NORMAL</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>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
|
@ -248,6 +327,31 @@
|
|||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="tab_expand">False</property>
|
||||
<property name="tab_fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="label12">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">Window Border Theme</property>
|
||||
<property name="use_underline">False</property>
|
||||
<property name="use_markup">False</property>
|
||||
<property name="justify">GTK_JUSTIFY_LEFT</property>
|
||||
<property name="wrap">False</property>
|
||||
<property name="selectable">False</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="type">tab</property>
|
||||
</packing>
|
||||
</child>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
<property name="expand">True</property>
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#include <libgnomevfs/gnome-vfs-async-ops.h>
|
||||
#include <libgnomevfs/gnome-vfs-ops.h>
|
||||
|
||||
#include <libwindow-settings/gnome-wm-manager.h>
|
||||
|
||||
#include "theme-common.h"
|
||||
#include "capplet-util.h"
|
||||
#include "activate-settings-daemon.h"
|
||||
|
@ -18,6 +20,7 @@
|
|||
#include "file-transfer-dialog.h"
|
||||
|
||||
#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
|
||||
#define WINDOW_THEME_KEY "/desktop/gnome/applications/window_manager/theme"
|
||||
|
||||
#define MAX_ELEMENTS_BEFORE_SCROLLING 8
|
||||
|
||||
|
@ -40,8 +43,11 @@ static GtkTargetEntry drop_types[] =
|
|||
};
|
||||
|
||||
static gint n_drop_types = sizeof (drop_types) / sizeof (GtkTargetEntry);
|
||||
|
||||
static gboolean setting_model = FALSE;
|
||||
static gboolean initial_scroll = TRUE;
|
||||
static gboolean window_setting_model = FALSE;
|
||||
static gboolean window_initial_scroll = TRUE;
|
||||
|
||||
static GladeXML *
|
||||
create_dialog (void)
|
||||
|
@ -97,6 +103,50 @@ theme_selection_changed (GtkTreeSelection *selection,
|
|||
g_free (new_key);
|
||||
}
|
||||
|
||||
static void
|
||||
window_theme_selection_changed (GtkTreeSelection *selection,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
gchar *new_key;
|
||||
GConfClient *client;
|
||||
GtkTreeIter iter;
|
||||
|
||||
if (window_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, WINDOW_THEME_KEY, NULL);
|
||||
if (old_key && strcmp (old_key, new_key))
|
||||
{
|
||||
gconf_client_set_string (client, WINDOW_THEME_KEY, new_key, NULL);
|
||||
}
|
||||
g_free (old_key);
|
||||
}
|
||||
else
|
||||
{
|
||||
gconf_client_unset (client, WINDOW_THEME_KEY, NULL);
|
||||
}
|
||||
g_free (new_key);
|
||||
}
|
||||
|
||||
static void
|
||||
read_themes (GladeXML *dialog)
|
||||
{
|
||||
|
@ -194,6 +244,115 @@ read_themes (GladeXML *dialog)
|
|||
g_free (current_theme);
|
||||
}
|
||||
|
||||
static void
|
||||
window_read_themes (GladeXML *dialog)
|
||||
{
|
||||
GConfClient *client;
|
||||
GList *window_theme_list;
|
||||
GList *list;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeView *tree_view;
|
||||
gchar *current_theme;
|
||||
gint i = 0;
|
||||
gboolean current_theme_found = FALSE;
|
||||
GtkTreeRowReference *row_ref = NULL;
|
||||
GnomeWindowManager *wm;
|
||||
|
||||
client = gconf_client_get_default ();
|
||||
|
||||
wm = gnome_wm_manager_get_current ();
|
||||
window_theme_list = gnome_window_manager_get_theme_list (wm);
|
||||
g_object_unref (G_OBJECT (wm));
|
||||
|
||||
tree_view = GTK_TREE_VIEW (WID ("window_theme_treeview"));
|
||||
model = gtk_tree_view_get_model (tree_view);
|
||||
|
||||
window_setting_model = TRUE;
|
||||
gtk_list_store_clear (GTK_LIST_STORE (model));
|
||||
|
||||
current_theme = gconf_client_get_string (client, WINDOW_THEME_KEY, NULL);
|
||||
if (current_theme == NULL)
|
||||
current_theme = g_strdup ("Default");
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("window_theme_swindow")),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_NEVER);
|
||||
gtk_widget_set_usize (WID ("window_theme_swindow"), -1, -1);
|
||||
|
||||
for (list = window_theme_list; list; list = list->next)
|
||||
{
|
||||
char *theme_name = list->data;
|
||||
GtkTreeIter iter;
|
||||
|
||||
gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
|
||||
gtk_list_store_set (GTK_LIST_STORE (model), &iter,
|
||||
THEME_NAME_COLUMN, theme_name,
|
||||
-1);
|
||||
|
||||
if (strcmp (current_theme, theme_name) == 0)
|
||||
{
|
||||
GtkTreeSelection *selection;
|
||||
|
||||
selection = gtk_tree_view_get_selection (tree_view);
|
||||
gtk_tree_selection_select_iter (selection, &iter);
|
||||
if (window_initial_scroll)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
row_ref = gtk_tree_row_reference_new (model, path);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
current_theme_found = TRUE;
|
||||
}
|
||||
|
||||
if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
|
||||
{
|
||||
GtkRequisition rectangle;
|
||||
gtk_widget_size_request (GTK_WIDGET (tree_view), &rectangle);
|
||||
gtk_widget_set_usize (WID ("window_theme_swindow"), -1, rectangle.height);
|
||||
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("window_theme_swindow")),
|
||||
GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (! current_theme_found)
|
||||
{
|
||||
GtkTreeSelection *selection = gtk_tree_view_get_selection (tree_view);
|
||||
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);
|
||||
if (window_initial_scroll)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
row_ref = gtk_tree_row_reference_new (model, path);
|
||||
gtk_tree_path_free (path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (row_ref && window_initial_scroll)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
|
||||
path = gtk_tree_row_reference_get_path (row_ref);
|
||||
|
||||
gtk_tree_view_scroll_to_cell (tree_view, path, NULL, TRUE, 0.5, 0.0);
|
||||
|
||||
gtk_tree_path_free (path);
|
||||
gtk_tree_row_reference_free (row_ref);
|
||||
initial_scroll = FALSE;
|
||||
}
|
||||
window_setting_model = FALSE;
|
||||
|
||||
g_free (current_theme);
|
||||
}
|
||||
|
||||
static void
|
||||
theme_key_changed (GConfClient *client,
|
||||
guint cnxn_id,
|
||||
|
@ -206,6 +365,17 @@ theme_key_changed (GConfClient *client,
|
|||
read_themes ((GladeXML *)user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
window_theme_key_changed (GConfClient *client,
|
||||
guint cnxn_id,
|
||||
GConfEntry *entry,
|
||||
gpointer user_data)
|
||||
{
|
||||
if (strcmp (entry->key, WINDOW_THEME_KEY))
|
||||
return;
|
||||
|
||||
window_read_themes ((GladeXML *)user_data);
|
||||
}
|
||||
|
||||
static void
|
||||
theme_changed_func (gpointer uri,
|
||||
|
@ -273,6 +443,34 @@ transfer_done_idle_cb (gpointer data)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
window_show_manage_themes (GtkWidget *button, gpointer data)
|
||||
{
|
||||
gchar *path, *command;
|
||||
GnomeVFSURI *uri;
|
||||
GnomeWindowManager *wm;
|
||||
|
||||
wm = gnome_wm_manager_get_current ();
|
||||
|
||||
path = gnome_window_manager_get_user_theme_folder (wm);
|
||||
g_object_unref (G_OBJECT (wm));
|
||||
|
||||
uri = gnome_vfs_uri_new (path);
|
||||
|
||||
if (!gnome_vfs_uri_exists (uri)) {
|
||||
/* Create the directory */
|
||||
gnome_vfs_make_directory_for_uri (uri, 0775);
|
||||
}
|
||||
gnome_vfs_uri_unref (uri);
|
||||
|
||||
|
||||
command = g_strdup_printf ("nautilus --no-desktop %s", path);
|
||||
g_free (path);
|
||||
|
||||
g_spawn_command_line_async (command, NULL);
|
||||
g_free (command);
|
||||
}
|
||||
|
||||
static void
|
||||
transfer_done_cb (GtkWidget *dlg, gchar *path)
|
||||
{
|
||||
|
@ -435,37 +633,55 @@ cb_dialog_response (GtkDialog *dialog, gint response_id)
|
|||
gtk_main_quit ();
|
||||
}
|
||||
|
||||
void
|
||||
setup_theme_tree (GtkTreeView *tree_view, GCallback theme_selection_changed_cb)
|
||||
{
|
||||
GtkTreeModel *model;
|
||||
GtkTreeSelection *selection;
|
||||
|
||||
gtk_tree_view_insert_column_with_attributes (tree_view,
|
||||
-1, NULL,
|
||||
gtk_cell_renderer_text_new (),
|
||||
"text", THEME_NAME_COLUMN,
|
||||
NULL);
|
||||
|
||||
model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING);
|
||||
gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), 0, sort_func, NULL, NULL);
|
||||
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), 0, GTK_SORT_ASCENDING);
|
||||
gtk_tree_view_set_model (tree_view, model);
|
||||
selection = gtk_tree_view_get_selection (tree_view);
|
||||
gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
|
||||
g_signal_connect (G_OBJECT (selection), "changed", (GCallback) theme_selection_changed_cb, NULL);}
|
||||
|
||||
|
||||
static void
|
||||
setup_dialog (GladeXML *dialog)
|
||||
{
|
||||
GConfClient *client;
|
||||
GtkWidget *widget, *parent;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeSelection *selection;
|
||||
|
||||
client = gconf_client_get_default ();
|
||||
parent = WID ("theme_dialog");
|
||||
|
||||
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);
|
||||
setup_theme_tree (GTK_TREE_VIEW (WID ("theme_treeview")), (GCallback)theme_selection_changed);
|
||||
setup_theme_tree (GTK_TREE_VIEW (WID ("window_theme_treeview")), (GCallback)window_theme_selection_changed);
|
||||
|
||||
gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
|
||||
gconf_client_add_dir (client, "/desktop/gnome/applications/window_manager",
|
||||
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_sortable_set_sort_func (GTK_TREE_SORTABLE (model), 0, sort_func, NULL, NULL);
|
||||
gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (model), 0, GTK_SORT_ASCENDING);
|
||||
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);
|
||||
gconf_client_notify_add (client,
|
||||
WINDOW_THEME_KEY,
|
||||
(GConfClientNotifyFunc) &window_theme_key_changed,
|
||||
dialog, NULL, NULL);
|
||||
|
||||
read_themes (dialog);
|
||||
window_read_themes (dialog);
|
||||
|
||||
theme_common_register_theme_change (theme_changed_func, dialog);
|
||||
|
||||
widget = WID ("install_button");
|
||||
|
@ -474,6 +690,13 @@ setup_dialog (GladeXML *dialog)
|
|||
widget = WID ("manage_button");
|
||||
g_signal_connect (G_OBJECT (widget), "clicked",
|
||||
G_CALLBACK (show_manage_themes), dialog);
|
||||
g_signal_connect (G_OBJECT (WID ("window_manage_button")), "clicked",
|
||||
G_CALLBACK (window_show_manage_themes), dialog);
|
||||
|
||||
/*
|
||||
g_signal_connect (G_OBJECT (WID ("install_dialog")), "response",
|
||||
G_CALLBACK (install_dialog_response), dialog);
|
||||
*/
|
||||
|
||||
g_signal_connect (G_OBJECT (parent),
|
||||
"response",
|
||||
|
@ -512,6 +735,8 @@ main (int argc, char *argv[])
|
|||
activate_settings_daemon ();
|
||||
|
||||
dialog = create_dialog ();
|
||||
gnome_wm_manager_init (WID ("theme_dialog"));
|
||||
|
||||
setup_dialog (dialog);
|
||||
gtk_main ();
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<property name="default_width">400</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="has_separator">True</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
<widget class="GtkVBox" id="dialog-vbox2">
|
||||
|
@ -21,8 +21,10 @@
|
|||
|
||||
<child internal-child="action_area">
|
||||
<widget class="GtkHButtonBox" id="dialog-action_area2">
|
||||
<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">
|
||||
|
|
|
@ -1,3 +1,14 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* metacity-window-manager.c: (metacity_set_theme),
|
||||
(add_themes_from_dir), (metacity_get_theme_list),
|
||||
(metacity_set_font), (metacity_set_focus_follows_mouse),
|
||||
(metacity_get_user_theme_folder),
|
||||
(metacity_window_manager_class_init):
|
||||
|
||||
Implement all calls for metacity, and check more error
|
||||
stuff.
|
||||
|
||||
2002-06-17 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* Release 2.0.0
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
<child>
|
||||
<widget class="GtkVBox" id="prefs_widget">
|
||||
<property name="border_width">9</property>
|
||||
<property name="border_width">5</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">5</property>
|
||||
|
|
|
@ -7,6 +7,8 @@
|
|||
#define METACITY_THEME_KEY "/apps/metacity/general/theme"
|
||||
#define METACITY_FONT_KEY "/apps/metacity/general/titlebar_font"
|
||||
#define METACITY_FOCUS_KEY "/apps/metacity/general/focus_mode"
|
||||
#define METACITY_USE_SYSTEM_FONT_KEY "/apps/metacity/titlebar_uses_system_font"
|
||||
|
||||
static GnomeWindowManagerClass *parent_class;
|
||||
|
||||
struct _MetacityWindowManagerPrivate {
|
||||
|
@ -24,7 +26,7 @@ window_manager_new (void)
|
|||
}
|
||||
|
||||
static void
|
||||
metacity_set_theme (const char *theme_name)
|
||||
metacity_set_theme (GnomeWindowManager *wm, const char *theme_name)
|
||||
{
|
||||
gconf_client_set_string (gconf_client_get_default (),
|
||||
METACITY_THEME_KEY,
|
||||
|
@ -40,6 +42,10 @@ add_themes_from_dir (GList *current_list, const char *path)
|
|||
GList *node;
|
||||
gboolean found = FALSE;
|
||||
|
||||
if (!(g_file_test (path, G_FILE_TEST_EXISTS) && g_file_test (path, G_FILE_TEST_IS_DIR))) {
|
||||
return current_list;
|
||||
}
|
||||
|
||||
theme_dir = opendir (path);
|
||||
|
||||
for (entry = readdir (theme_dir); entry != NULL; entry = readdir (theme_dir)) {
|
||||
|
@ -66,7 +72,7 @@ add_themes_from_dir (GList *current_list, const char *path)
|
|||
}
|
||||
|
||||
static GList *
|
||||
metacity_get_theme_list (void)
|
||||
metacity_get_theme_list (GnomeWindowManager *wm)
|
||||
{
|
||||
GList *themes = NULL;
|
||||
char *home_dir_themes;
|
||||
|
@ -83,15 +89,18 @@ metacity_get_theme_list (void)
|
|||
}
|
||||
|
||||
static void
|
||||
metacity_set_font (const char *font)
|
||||
metacity_set_font (GnomeWindowManager *wm, const char *font)
|
||||
{
|
||||
gconf_client_set_string (gconf_client_get_default (),
|
||||
METACITY_FONT_KEY,
|
||||
font, NULL);
|
||||
GConfClient *client;
|
||||
|
||||
client = gconf_client_get_default ();
|
||||
|
||||
gconf_client_set_bool (client, METACITY_USE_SYSTEM_FONT_KEY, FALSE, NULL);
|
||||
gconf_client_set_string (client, METACITY_FONT_KEY, font, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
metacity_set_focus_follows_mouse (gboolean focus_follows_mouse)
|
||||
metacity_set_focus_follows_mouse (GnomeWindowManager *wm, gboolean focus_follows_mouse)
|
||||
{
|
||||
const char *focus_mode;
|
||||
|
||||
|
@ -106,6 +115,11 @@ metacity_set_focus_follows_mouse (gboolean focus_follows_mouse)
|
|||
focus_mode, NULL);
|
||||
}
|
||||
|
||||
static char *
|
||||
metacity_get_user_theme_folder (GnomeWindowManager *wm)
|
||||
{
|
||||
return g_build_filename (g_get_home_dir (), ".metacity/themes", NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
metacity_window_manager_init (MetacityWindowManager *metacity_window_manager, MetacityWindowManagerClass *class)
|
||||
|
@ -144,6 +158,7 @@ metacity_window_manager_class_init (MetacityWindowManagerClass *class)
|
|||
wm_class->get_theme_list = metacity_get_theme_list;
|
||||
wm_class->set_font = metacity_set_font;
|
||||
wm_class->set_focus_follows_mouse = metacity_set_focus_follows_mouse;
|
||||
wm_class->get_user_theme_folder = metacity_get_user_theme_folder;
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ dnl ==============================================
|
|||
COMMON_MODULES="gtk+-2.0 gconf-2.0 libgnomeui-2.0 libglade-2.0 >= 1.99.12 libbonobo-2.0 libbonoboui-2.0 libglade-2.0 gconf-2.0 gnome-desktop-2.0"
|
||||
PKG_CHECK_MODULES(CAPPLET, $COMMON_MODULES)
|
||||
PKG_CHECK_MODULES(GNOMECC, $COMMON_MODULES libxml-2.0 gnome-desktop-2.0 gnome-vfs-2.0)
|
||||
PKG_CHECK_MODULES(GNOME_SETTINGS_DAEMON, gtk+-2.0 gconf-2.0 libgnomeui-2.0 esound)
|
||||
PKG_CHECK_MODULES(GNOME_SETTINGS_DAEMON, gtk+-2.0 gconf-2.0 libgnomeui-2.0 esound gnome-desktop-2.0)
|
||||
PKG_CHECK_MODULES(OLD_CAPPLET, libgnomeui-2.0 libglade-2.0)
|
||||
PKG_CHECK_MODULES(GNOME, libgnomeui-2.0)
|
||||
PKG_CHECK_MODULES(VFS_CAPPLET, $COMMON_MODULES gnome-vfs-module-2.0 gnome-vfs-2.0)
|
||||
|
|
|
@ -44,6 +44,7 @@ gnome_settings_daemon_LDADD = \
|
|||
$(GNOME_SETTINGS_DAEMON_LIBS) \
|
||||
$(top_builddir)/libbackground/libbackground.la \
|
||||
$(top_builddir)/libsounds/libsounds.a \
|
||||
-L$(top_builddir)/libwindow-settings/ -lgnome-window-settings \
|
||||
$(XF86MISC_LIBS)
|
||||
|
||||
#AccessX_files = \
|
||||
|
|
|
@ -5,6 +5,8 @@
|
|||
#include <gdk/gdkx.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <libwindow-settings/gnome-wm-manager.h>
|
||||
|
||||
static void
|
||||
set_number_of_workspaces (int workspaces)
|
||||
{
|
||||
|
@ -61,6 +63,8 @@ set_workspace_names (GSList *values)
|
|||
static void
|
||||
wm_callback (GConfEntry *entry)
|
||||
{
|
||||
GnomeWindowManager *wm;
|
||||
|
||||
if (!strcmp (entry->key, "/desktop/gnome/applications/window_manager/number_of_workspaces")) {
|
||||
if (entry->value->type == GCONF_VALUE_INT)
|
||||
set_number_of_workspaces (gconf_value_get_int (entry->value));
|
||||
|
@ -70,11 +74,26 @@ wm_callback (GConfEntry *entry)
|
|||
gconf_value_get_list_type (entry->value) == GCONF_VALUE_STRING)
|
||||
set_workspace_names (gconf_value_get_list (entry->value));
|
||||
}
|
||||
else if (!strcmp (entry->key, "/desktop/gnome/applications/window_manager/theme")) {
|
||||
wm = gnome_wm_manager_get_current ();
|
||||
if (wm != NULL) {
|
||||
gnome_window_manager_set_theme (wm, gconf_value_get_string (entry->value));
|
||||
}
|
||||
}
|
||||
else if (!strcmp (entry->key, "/desktop/gnome/applications/window_manager/titlebar_font")) {
|
||||
wm = gnome_wm_manager_get_current ();
|
||||
gnome_window_manager_set_font (wm, gconf_value_get_string (entry->value));
|
||||
}
|
||||
else if (!strcmp (entry->key, "/desktop/gnome/applications/window_manager/focus_follows_mouse")) {
|
||||
wm = gnome_wm_manager_get_current ();
|
||||
gnome_window_manager_set_focus_follows_mouse (wm, gconf_value_get_bool (entry->value));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gnome_settings_wm_init (GConfClient *client)
|
||||
{
|
||||
gnome_wm_manager_init (NULL);
|
||||
gnome_settings_daemon_register_callback ("/desktop/gnome/applications/window_manager", wm_callback);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,15 @@
|
|||
2002-08-08 Seth Nickell <snickell@stanford.edu>
|
||||
|
||||
* gnome-window-manager.c: (gnome_window_manager_set_theme),
|
||||
(gnome_window_manager_get_theme_list),
|
||||
(gnome_window_manager_set_font),
|
||||
(gnome_window_manager_set_focus_follows_mouse),
|
||||
(gnome_window_manager_get_user_theme_folder),
|
||||
(gnome_window_manager_class_init):
|
||||
* gnome-window-manager.h:
|
||||
|
||||
Add get_user_theme_folder, fix some minor bugs.
|
||||
|
||||
2002-06-17 Jody Goldberg <jody@gnome.org>
|
||||
|
||||
* Release 2.0.0
|
||||
|
|
|
@ -62,28 +62,35 @@ void
|
|||
gnome_window_manager_set_theme (GnomeWindowManager *wm, const char *theme_name)
|
||||
{
|
||||
GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm);
|
||||
klass->set_theme (theme_name);
|
||||
klass->set_theme (wm, theme_name);
|
||||
}
|
||||
|
||||
GList *
|
||||
gnome_window_manager_get_theme_list (GnomeWindowManager *wm)
|
||||
{
|
||||
GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm);
|
||||
return klass->get_theme_list ();
|
||||
return klass->get_theme_list (wm);
|
||||
}
|
||||
|
||||
void
|
||||
gnome_window_manager_set_font (GnomeWindowManager *wm, const char *font)
|
||||
{
|
||||
GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm);
|
||||
klass->set_font (font);
|
||||
klass->set_font (wm, font);
|
||||
}
|
||||
|
||||
void
|
||||
gnome_window_manager_set_focus_follows_mouse (GnomeWindowManager *wm, gboolean focus_follows_mouse)
|
||||
{
|
||||
GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm);
|
||||
klass->set_focus_follows_mouse (focus_follows_mouse);
|
||||
klass->set_focus_follows_mouse (wm, focus_follows_mouse);
|
||||
}
|
||||
|
||||
char *
|
||||
gnome_window_manager_get_user_theme_folder (GnomeWindowManager *wm)
|
||||
{
|
||||
GnomeWindowManagerClass *klass = GNOME_WINDOW_MANAGER_GET_CLASS (wm);
|
||||
return klass->get_user_theme_folder (wm);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -123,6 +130,7 @@ gnome_window_manager_class_init (GnomeWindowManagerClass *class)
|
|||
wm_class->get_theme_list = NULL;
|
||||
wm_class->set_font = NULL;
|
||||
wm_class->set_focus_follows_mouse = NULL;
|
||||
wm_class->get_user_theme_folder = NULL;
|
||||
|
||||
parent_class = g_type_class_peek_parent (class);
|
||||
}
|
||||
|
|
|
@ -30,11 +30,11 @@ struct _GnomeWindowManagerClass
|
|||
{
|
||||
GObjectClass klass;
|
||||
|
||||
void (*set_theme) (const char *theme_name);
|
||||
GList * (*get_theme_list) (void);
|
||||
void (*set_font) (const char *font);
|
||||
void (*set_focus_follows_mouse) (gboolean focus_follows_mouse);
|
||||
|
||||
void (*set_theme) (GnomeWindowManager *wm, const char *theme_name);
|
||||
GList * (*get_theme_list) (GnomeWindowManager *wm);
|
||||
void (*set_font) (GnomeWindowManager *wm, const char *font);
|
||||
void (*set_focus_follows_mouse) (GnomeWindowManager *wm, gboolean focus_follows_mouse);
|
||||
char * (*get_user_theme_folder) (GnomeWindowManager *wm);
|
||||
};
|
||||
|
||||
|
||||
|
@ -48,6 +48,7 @@ void gnome_window_manager_set_theme (GnomeWindowMana
|
|||
GList * gnome_window_manager_get_theme_list (GnomeWindowManager *wm);
|
||||
void gnome_window_manager_set_font (GnomeWindowManager *wm, const char *font);
|
||||
void gnome_window_manager_set_focus_follows_mouse (GnomeWindowManager *wm, gboolean focus_follows_mouse);
|
||||
char * gnome_window_manager_get_user_theme_folder (GnomeWindowManager *wm);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue