summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
Diffstat (limited to 'capplets')
-rw-r--r--capplets/.cvsignore2
-rw-r--r--capplets/Makefile.am17
-rw-r--r--capplets/about-me/AUTHORS2
-rw-r--r--capplets/about-me/ChangeLog22
-rw-r--r--capplets/about-me/Makefile.am38
-rw-r--r--capplets/about-me/e-image-chooser.c522
-rw-r--r--capplets/about-me/e-image-chooser.h64
-rw-r--r--capplets/about-me/e-util-marshal.list3
-rw-r--r--capplets/about-me/gnome-about-me-password.c333
-rw-r--r--capplets/about-me/gnome-about-me-password.h7
-rw-r--r--capplets/about-me/gnome-about-me.c720
-rw-r--r--capplets/about-me/gnome-about-me.desktop.in13
-rw-r--r--capplets/about-me/gnome-about-me.glade2647
-rw-r--r--capplets/about-me/gnome-about-me.pngbin2280 -> 0 bytes
-rw-r--r--capplets/accessibility/.cvsignore2
-rw-r--r--capplets/accessibility/Makefile.am1
-rw-r--r--capplets/accessibility/at-properties/.cvsignore5
-rw-r--r--capplets/accessibility/at-properties/ChangeLog99
-rw-r--r--capplets/accessibility/at-properties/Makefile.am29
-rw-r--r--capplets/accessibility/at-properties/at-enable-capplet.pngbin2879 -> 0 bytes
-rw-r--r--capplets/accessibility/at-properties/at-enable-dialog.glade465
-rw-r--r--capplets/accessibility/at-properties/at-properties.desktop.in.in15
-rw-r--r--capplets/accessibility/at-properties/at-startup-session.c160
-rw-r--r--capplets/accessibility/at-properties/at-startup-session.h18
-rw-r--r--capplets/accessibility/at-properties/at-startup.pngbin2879 -> 0 bytes
-rw-r--r--capplets/accessibility/at-properties/at-support.pngbin2991 -> 0 bytes
-rw-r--r--capplets/accessibility/at-properties/main.c296
-rw-r--r--capplets/accessibility/keyboard/.cvsignore12
-rw-r--r--capplets/accessibility/keyboard/ChangeLog388
-rw-r--r--capplets/accessibility/keyboard/Makefile.am36
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-bouncekey.pngbin2245 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-capplet.pngbin3385 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-mousekey.pngbin3160 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-slowkey.pngbin3200 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-stickykey.pngbin2364 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard-togglekey.pngbin3239 -> 0 bytes
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard.c477
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard.desktop.in.in15
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard.h32
-rw-r--r--capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.c116
-rw-r--r--capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.glade2114
-rw-r--r--capplets/background/.cvsignore14
-rw-r--r--capplets/background/ChangeLog1267
-rw-r--r--capplets/background/Makefile.am48
-rw-r--r--capplets/background/background.desktop.in.in15
-rw-r--r--capplets/background/gnome-background-properties.glade483
-rw-r--r--capplets/background/gnome-wp-capplet.c1313
-rw-r--r--capplets/background/gnome-wp-capplet.h109
-rw-r--r--capplets/background/gnome-wp-info.c114
-rw-r--r--capplets/background/gnome-wp-info.h47
-rw-r--r--capplets/background/gnome-wp-item.c300
-rw-r--r--capplets/background/gnome-wp-item.h70
-rw-r--r--capplets/background/gnome-wp-utils.c198
-rw-r--r--capplets/background/gnome-wp-utils.h58
-rw-r--r--capplets/background/gnome-wp-xml.c375
-rw-r--r--capplets/background/gnome-wp-xml.h28
-rw-r--r--capplets/common/.cvsignore5
-rw-r--r--capplets/common/Bonobo_Control_Capplet_generic.oaf.in21
-rw-r--r--capplets/common/ChangeLog810
-rw-r--r--capplets/common/Makefile.am42
-rw-r--r--capplets/common/activate-settings-daemon.c58
-rw-r--r--capplets/common/activate-settings-daemon.h9
-rw-r--r--capplets/common/bonobo-property-editor-range.c70
-rw-r--r--capplets/common/bonobo-property-editor-range.h8
-rw-r--r--capplets/common/capplet-stock-icons.c137
-rw-r--r--capplets/common/capplet-stock-icons.h62
-rw-r--r--capplets/common/capplet-util.c400
-rw-r--r--capplets/common/capplet-util.h91
-rw-r--r--capplets/common/file-transfer-dialog.c420
-rw-r--r--capplets/common/file-transfer-dialog.h69
-rw-r--r--capplets/common/gconf-property-editor-marshal.c41
-rw-r--r--capplets/common/gconf-property-editor-marshal.h15
-rw-r--r--capplets/common/gconf-property-editor.c1764
-rw-r--r--capplets/common/gconf-property-editor.h157
-rw-r--r--capplets/common/gnome-theme-apply.c65
-rw-r--r--capplets/common/gnome-theme-apply.h33
-rw-r--r--capplets/common/gnome-theme-info.c1692
-rw-r--r--capplets/common/gnome-theme-info.h129
-rw-r--r--capplets/common/gnome-theme-test.c122
-rw-r--r--capplets/common/theme-thumbnail.c623
-rw-r--r--capplets/common/theme-thumbnail.h24
-rw-r--r--capplets/common/wm-common.c149
-rw-r--r--capplets/common/wm-common.h13
-rw-r--r--capplets/common/wrapper-script.in9
-rw-r--r--capplets/default-applications/.cvsignore7
-rw-r--r--capplets/default-applications/ChangeLog523
-rw-r--r--capplets/default-applications/Makefile.am18
-rw-r--r--capplets/default-applications/default-applications-capplet.pngbin4377 -> 0 bytes
-rw-r--r--capplets/default-applications/default-applications-properties.glade1
-rw-r--r--capplets/default-applications/default-applications.desktop.in.in15
-rw-r--r--capplets/default-applications/gnome-default-applications-properties-structs.c65
-rw-r--r--capplets/default-applications/gnome-default-applications-properties.c794
-rw-r--r--capplets/default-applications/gnome-default-applications-properties.glade1623
-rw-r--r--capplets/display/.cvsignore7
-rw-r--r--capplets/display/ChangeLog70
-rw-r--r--capplets/display/Makefile.am26
-rw-r--r--capplets/display/display-capplet.pngbin2824 -> 0 bytes
-rw-r--r--capplets/display/display-properties.desktop.in.in15
-rw-r--r--capplets/display/main.c828
-rw-r--r--capplets/file-types/.cvsignore6
-rw-r--r--capplets/file-types/ChangeLog1288
-rw-r--r--capplets/file-types/Makefile.am28
-rw-r--r--capplets/file-types/TODO_NOTES2
-rw-r--r--capplets/file-types/file-types-capplet.c323
-rw-r--r--capplets/file-types/file-types-capplet.desktop.in.in11
-rw-r--r--capplets/file-types/file-types-capplet.pngbin3085 -> 0 bytes
-rw-r--r--capplets/file-types/file-types-icon-entry.c618
-rw-r--r--capplets/file-types/file-types-icon-entry.h71
-rw-r--r--capplets/file-types/file-types-properties.glade1470
-rw-r--r--capplets/file-types/file-types-properties.glade11300
-rw-r--r--capplets/file-types/file-types.desktop.in.in15
-rw-r--r--capplets/file-types/libuuid/.cvsignore3
-rw-r--r--capplets/file-types/libuuid/Makefile.am27
-rw-r--r--capplets/file-types/libuuid/clear.c20
-rw-r--r--capplets/file-types/libuuid/compare.c32
-rw-r--r--capplets/file-types/libuuid/copy.c21
-rw-r--r--capplets/file-types/libuuid/gen_uuid.c265
-rw-r--r--capplets/file-types/libuuid/gen_uuid_nt.c92
-rw-r--r--capplets/file-types/libuuid/isnull.c25
-rw-r--r--capplets/file-types/libuuid/pack.c46
-rw-r--r--capplets/file-types/libuuid/parse.c52
-rw-r--r--capplets/file-types/libuuid/tst_uuid.c119
-rw-r--r--capplets/file-types/libuuid/unpack.c40
-rw-r--r--capplets/file-types/libuuid/unparse.c28
-rw-r--r--capplets/file-types/libuuid/uuid.h50
-rw-r--r--capplets/file-types/libuuid/uuidP.h40
-rw-r--r--capplets/file-types/libuuid/uuid_time.c138
-rw-r--r--capplets/file-types/mime-category-edit-dialog.c449
-rw-r--r--capplets/file-types/mime-category-edit-dialog.h59
-rw-r--r--capplets/file-types/mime-edit-dialog.c1000
-rw-r--r--capplets/file-types/mime-edit-dialog.h67
-rw-r--r--capplets/file-types/mime-type-info.c849
-rw-r--r--capplets/file-types/mime-type-info.h118
-rw-r--r--capplets/file-types/mime-types-model.c624
-rw-r--r--capplets/file-types/mime-types-model.h73
-rw-r--r--capplets/file-types/model-entry.c215
-rw-r--r--capplets/file-types/model-entry.h71
-rw-r--r--capplets/file-types/service-edit-dialog.c602
-rw-r--r--capplets/file-types/service-edit-dialog.h61
-rw-r--r--capplets/file-types/service-info.c390
-rw-r--r--capplets/file-types/service-info.h68
-rw-r--r--capplets/font/.cvsignore7
-rw-r--r--capplets/font/ChangeLog312
-rw-r--r--capplets/font/Makefile.am31
-rw-r--r--capplets/font/font-properties.desktop.in.in15
-rw-r--r--capplets/font/font-properties.glade1581
-rw-r--r--capplets/font/main.c939
-rw-r--r--capplets/font/subpixel-bgr.pngbin125 -> 0 bytes
-rw-r--r--capplets/font/subpixel-rgb.pngbin125 -> 0 bytes
-rw-r--r--capplets/font/subpixel-vbgr.pngbin138 -> 0 bytes
-rw-r--r--capplets/font/subpixel-vrgb.pngbin138 -> 0 bytes
-rw-r--r--capplets/keybindings/.cvsignore5
-rw-r--r--capplets/keybindings/ChangeLog484
-rw-r--r--capplets/keybindings/Makefile.am23
-rw-r--r--capplets/keybindings/eggaccelerators.c701
-rw-r--r--capplets/keybindings/eggaccelerators.h89
-rw-r--r--capplets/keybindings/eggcellrendererkeys.c695
-rw-r--r--capplets/keybindings/eggcellrendererkeys.h89
-rw-r--r--capplets/keybindings/gnome-keybinding-properties.c934
-rw-r--r--capplets/keybindings/gnome-keybinding-properties.glade168
-rw-r--r--capplets/keybindings/keybinding.desktop.in.in15
-rw-r--r--capplets/keyboard/.cvsignore11
-rw-r--r--capplets/keyboard/ChangeLog659
-rw-r--r--capplets/keyboard/Makefile.am34
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkb.c208
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkb.h109
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkblt.c581
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkbmc.c159
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkbot.c332
-rw-r--r--capplets/keyboard/gnome-keyboard-properties-xkbpv.c121
-rw-r--r--capplets/keyboard/gnome-keyboard-properties.c263
-rw-r--r--capplets/keyboard/gnome-keyboard-properties.glade1942
-rw-r--r--capplets/keyboard/keyboard-bell.pngbin4199 -> 0 bytes
-rw-r--r--capplets/keyboard/keyboard-cursor.pngbin261 -> 0 bytes
-rw-r--r--capplets/keyboard/keyboard-repeat.pngbin3852 -> 0 bytes
-rw-r--r--capplets/keyboard/keyboard-volume.pngbin4655 -> 0 bytes
-rw-r--r--capplets/keyboard/keyboard.desktop.in.in15
-rw-r--r--capplets/keyboard/use_cases.txt42
-rw-r--r--capplets/localization/.cvsignore3
-rw-r--r--capplets/localization/Makefile.am25
-rw-r--r--capplets/localization/gnome-localization-properties.c1105
-rw-r--r--capplets/localization/gnome-localization-properties.glade1024
-rw-r--r--capplets/localization/localization-capplet.pngbin1384 -> 0 bytes
-rw-r--r--capplets/localization/localization.desktop.in.in14
-rw-r--r--capplets/mime-type/ChangeLog112
-rw-r--r--capplets/mime-type/Makefile.am30
-rw-r--r--capplets/mime-type/edit-window.c578
-rw-r--r--capplets/mime-type/edit-window.h15
-rw-r--r--capplets/mime-type/mime-data.c661
-rw-r--r--capplets/mime-type/mime-data.h34
-rw-r--r--capplets/mime-type/mime-info.c492
-rw-r--r--capplets/mime-type/mime-info.h17
-rw-r--r--capplets/mime-type/mime-type-capplet.c143
-rw-r--r--capplets/mime-type/mime-type-capplet.pngbin2188 -> 0 bytes
-rw-r--r--capplets/mime-type/mime-type-properties.glade0
-rw-r--r--capplets/mime-type/mime-type.desktop.in.in7
-rw-r--r--capplets/mime-type/new-mime-window.c120
-rw-r--r--capplets/mime-type/new-mime-window.h14
-rw-r--r--capplets/mouse/.cvsignore10
-rw-r--r--capplets/mouse/ChangeLog491
-rw-r--r--capplets/mouse/Makefile.am36
-rw-r--r--capplets/mouse/cursor-large-white.pcfbin18636 -> 0 bytes
-rw-r--r--capplets/mouse/cursor-large.pcfbin17432 -> 0 bytes
-rw-r--r--capplets/mouse/cursor-white.pcfbin13848 -> 0 bytes
-rw-r--r--capplets/mouse/double-click-maybe.pngbin4643 -> 0 bytes
-rw-r--r--capplets/mouse/double-click-off.pngbin4751 -> 0 bytes
-rw-r--r--capplets/mouse/double-click-on.pngbin6360 -> 0 bytes
-rw-r--r--capplets/mouse/gnome-mouse-properties.c859
-rw-r--r--capplets/mouse/gnome-mouse-properties.glade1288
-rw-r--r--capplets/mouse/gnome-settings-mouse.desktop.in.in15
-rw-r--r--capplets/mouse/mouse-cursor-normal-large.pngbin251 -> 0 bytes
-rw-r--r--capplets/mouse/mouse-cursor-normal.pngbin241 -> 0 bytes
-rw-r--r--capplets/mouse/mouse-cursor-white-large.pngbin268 -> 0 bytes
-rw-r--r--capplets/mouse/mouse-cursor-white.pngbin221 -> 0 bytes
-rw-r--r--capplets/mouse/mouse-left.pngbin9676 -> 0 bytes
-rw-r--r--capplets/mouse/mouse-right.pngbin9572 -> 0 bytes
-rw-r--r--capplets/network/.cvsignore10
-rw-r--r--capplets/network/ChangeLog268
-rw-r--r--capplets/network/Makefile.am18
-rw-r--r--capplets/network/gnome-network-preferences.c448
-rw-r--r--capplets/network/gnome-network-preferences.desktop.in.in15
-rw-r--r--capplets/network/gnome-network-preferences.glade1266
-rw-r--r--capplets/rollback/.cvsignore9
-rw-r--r--capplets/rollback/ChangeLog196
-rw-r--r--capplets/rollback/Makefile.am34
-rw-r--r--capplets/rollback/TODO28
-rw-r--r--capplets/rollback/main.c80
-rw-r--r--capplets/rollback/rollback-capplet-dialog.c592
-rw-r--r--capplets/rollback/rollback-capplet-dialog.h58
-rw-r--r--capplets/rollback/rollback-capplet.pngbin1669 -> 0 bytes
-rw-r--r--capplets/rollback/rollback-control.c352
-rw-r--r--capplets/rollback/rollback-control.h56
-rw-r--r--capplets/rollback/rollback-widget.c229
-rw-r--r--capplets/rollback/rollback-widget.h69
-rw-r--r--capplets/rollback/rollback.desktop.in.in7
-rw-r--r--capplets/rollback/rollback.glade872
-rw-r--r--capplets/sound/.cvsignore11
-rw-r--r--capplets/sound/ChangeLog478
-rw-r--r--capplets/sound/Makefile.am23
-rw-r--r--capplets/sound/gnome-settings-sound.desktop.in.in15
-rw-r--r--capplets/sound/sound-properties-capplet.c291
-rw-r--r--capplets/sound/sound-properties.glade359
-rw-r--r--capplets/sound/visual-bell.pngbin2357 -> 0 bytes
-rw-r--r--capplets/theme-switcher/.cvsignore7
-rw-r--r--capplets/theme-switcher/ChangeLog955
-rw-r--r--capplets/theme-switcher/Makefile.am42
-rw-r--r--capplets/theme-switcher/TODO17
-rw-r--r--capplets/theme-switcher/gnome-ccthemes.pngbin2826 -> 0 bytes
-rw-r--r--capplets/theme-switcher/gnome-theme-details.c568
-rw-r--r--capplets/theme-switcher/gnome-theme-details.h9
-rw-r--r--capplets/theme-switcher/gnome-theme-installer.c631
-rw-r--r--capplets/theme-switcher/gnome-theme-installer.h29
-rw-r--r--capplets/theme-switcher/gnome-theme-manager.c1494
-rw-r--r--capplets/theme-switcher/gnome-theme-manager.h81
-rw-r--r--capplets/theme-switcher/gnome-theme-save-data.c9
-rw-r--r--capplets/theme-switcher/gnome-theme-save.c311
-rw-r--r--capplets/theme-switcher/gnome-theme-save.h12
-rw-r--r--capplets/theme-switcher/gtk-theme-selector-capplet.pngbin527 -> 0 bytes
-rw-r--r--capplets/theme-switcher/gtk-theme-selector.desktop.in.in15
-rw-r--r--capplets/theme-switcher/gtk-theme-switcher.schemas47
-rw-r--r--capplets/theme-switcher/theme-install.glade261
-rw-r--r--capplets/theme-switcher/theme-properties.glade1686
-rw-r--r--capplets/theme-switcher/theme-switcher-capplet.pngbin527 -> 0 bytes
-rw-r--r--capplets/theme-switcher/theme-thumbnailing.pngbin2038 -> 0 bytes
-rw-r--r--capplets/ui-properties/.cvsignore11
-rw-r--r--capplets/ui-properties/ChangeLog342
-rw-r--r--capplets/ui-properties/Makefile.am18
-rw-r--r--capplets/ui-properties/gnome-ui-properties.c310
-rw-r--r--capplets/ui-properties/gnome-ui-properties.desktop.in.in15
-rw-r--r--capplets/ui-properties/gnome-ui-properties.glade678
-rw-r--r--capplets/ui-properties/gnome-warning.pngbin771 -> 0 bytes
-rw-r--r--capplets/ui-properties/preferences.h156
-rw-r--r--capplets/url-properties/ChangeLog163
-rw-r--r--capplets/url-properties/Makefile.am25
-rw-r--r--capplets/url-properties/url-capplet.pngbin4264 -> 0 bytes
-rw-r--r--capplets/url-properties/url-properties.c309
-rw-r--r--capplets/url-properties/url-properties.desktop.in.in12
-rw-r--r--capplets/url-properties/url-properties.glade0
-rw-r--r--capplets/url-properties/url-properties_WITH_TRANSLATIONS57
-rw-r--r--capplets/url-properties/url.desktop.in.in7
-rw-r--r--capplets/windows/.cvsignore12
-rw-r--r--capplets/windows/ChangeLog392
-rw-r--r--capplets/windows/Makefile.am26
-rw-r--r--capplets/windows/gnome-window-properties.c706
-rw-r--r--capplets/windows/gnome-window-properties.glade507
-rw-r--r--capplets/windows/window-properties.desktop.in.in15
-rw-r--r--capplets/wm-properties/ChangeLog138
-rw-r--r--capplets/wm-properties/Makefile.am33
-rw-r--r--capplets/wm-properties/wm-capplet.pngbin3047 -> 0 bytes
-rw-r--r--capplets/wm-properties/wm-desktops/Enlightenment.desktop.in.in9
-rw-r--r--capplets/wm-properties/wm-desktops/IceWM.desktop.in.in7
-rw-r--r--capplets/wm-properties/wm-desktops/Makefile.am21
-rw-r--r--capplets/wm-properties/wm-desktops/Scwm.desktop.in.in7
-rw-r--r--capplets/wm-properties/wm-desktops/WindowMaker.desktop.in.in8
-rw-r--r--capplets/wm-properties/wm-desktops/twm.desktop.in.in7
-rw-r--r--capplets/wm-properties/wm-exec.c331
-rw-r--r--capplets/wm-properties/wm-list.c574
-rw-r--r--capplets/wm-properties/wm-properties-capplet.c1260
-rw-r--r--capplets/wm-properties/wm-properties.glade0
-rw-r--r--capplets/wm-properties/wm-properties.h63
-rw-r--r--capplets/wm-properties/wm.desktop.in.in61
301 files changed, 0 insertions, 70810 deletions
diff --git a/capplets/.cvsignore b/capplets/.cvsignore
deleted file mode 100644
index 3dda72986..000000000
--- a/capplets/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile.in
-Makefile
diff --git a/capplets/Makefile.am b/capplets/Makefile.am
deleted file mode 100644
index 31717d17d..000000000
--- a/capplets/Makefile.am
+++ /dev/null
@@ -1,17 +0,0 @@
-always_built_SUBDIRS = \
- common accessibility \
- default-applications font \
- background keyboard mouse sound \
- theme-switcher ui-properties \
- keybindings network windows
-
-if HAVE_RANDR
-randr_SUBDIRS = display
-else
-randr_SUBDIRS =
-endif
-
-SUBDIRS = $(always_built_SUBDIRS) $(randr_SUBDIRS)
-
-DIST_SUBDIRS = \
- $(always_built_SUBDIRS) display
diff --git a/capplets/about-me/AUTHORS b/capplets/about-me/AUTHORS
deleted file mode 100644
index c02ecb554..000000000
--- a/capplets/about-me/AUTHORS
+++ /dev/null
@@ -1,2 +0,0 @@
-Diego Gonzalez Gonzalez <diego@pemas.net>
-Chris Toshok <toshok@ximian.com> \ No newline at end of file
diff --git a/capplets/about-me/ChangeLog b/capplets/about-me/ChangeLog
deleted file mode 100644
index d6f4c833d..000000000
--- a/capplets/about-me/ChangeLog
+++ /dev/null
@@ -1,22 +0,0 @@
-2005-05-16 Olav Vitters <olav@bkor.dhs.org>
-
- * gnome-about-me.glade: Remove garbage text. Patch by Benjamin
- LeMasurier. Fixes bug #162492.
-
-2005-04-01 Diego Gonzalez <diego@pemas.net>
-
- * gnome-about-me.c: fix the case where the self uid is wrong
- and the edition when the self contact is created for the
- first time.
-
-2005-03-29 Diego Gonzalez <diego@pemas.net>
-
- * Makefile.am: fix tabs
-
-2005-02-09 Sebastien Bacher <seb128@debian.org>
-
- * Makefile.am: build e-util-marshal.c.
-
-2004-12-23 Sebastien Bacher <seb128@debian.org>
-
- * gnome-about-me.glade: fixed a typo (Closes: #162094).
diff --git a/capplets/about-me/Makefile.am b/capplets/about-me/Makefile.am
deleted file mode 100644
index 3133d05f2..000000000
--- a/capplets/about-me/Makefile.am
+++ /dev/null
@@ -1,38 +0,0 @@
-bin_PROGRAMS = gnome-about-me
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- gnome-about-me.png
-
-gnome_about_me_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBEBOOK_LIBS) -lutil
-gnome_about_me_SOURCES = \
- e-util-marshal.c \
- e-util-marshal.h \
- gnome-about-me-password.c \
- e-image-chooser.c \
- gnome-about-me.c
-
-e-util-marshal.h: e-util-marshal.list
- ( @GLIB_GENMARSHAL@ --prefix=e_util_marshal $(srcdir)/e-util-marshal.list \
- --header > util-marshal.tmp \
- && mv util-marshal.tmp e-util-marshal.h ) \
- || ( rm -f util-marshal.tmp && exit 1 )
-
-e-util-marshal.c: e-util-marshal.h
- ( @GLIB_GENMARSHAL@ --prefix=e_util_marshal $(srcdir)/e-util-marshal.list \
- --body > util-marshal.tmp \
- && mv util-marshal.tmp e-util-marshal.c ) \
- || ( rm -f util-marshal.tmp && exit 1 )
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gnome-about-me.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-about-me.glade
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBEBOOK_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = e-util-marshal.list $(Glade_DATA) $(Desktop_in_files) $(pixmap_DATA)
diff --git a/capplets/about-me/e-image-chooser.c b/capplets/about-me/e-image-chooser.c
deleted file mode 100644
index 436b95fb1..000000000
--- a/capplets/about-me/e-image-chooser.c
+++ /dev/null
@@ -1,522 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-image-chooser.c
- * Copyright (C) 2004 Novell, Inc.
- * Author: Chris Toshok <toshok@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <stdio.h>
-#include <string.h>
-
-#include <glib/gi18n.h>
-#include <gtk/gtkalignment.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtkimage.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkdnd.h>
-
-#include <libgnomevfs/gnome-vfs-ops.h>
-
-#include "e-image-chooser.h"
-#include "e-util-marshal.h"
-
-struct _EImageChooserPrivate {
-
- GtkWidget *frame;
- GtkWidget *image;
- GtkWidget *browse_button;
-
- char *image_buf;
- int image_buf_size;
- int image_width;
- int image_height;
-
- gboolean editable;
-};
-
-enum {
- CHANGED,
- LAST_SIGNAL
-};
-
-
-static gint image_chooser_signals [LAST_SIGNAL] = { 0 };
-
-static void e_image_chooser_init (EImageChooser *chooser);
-static void e_image_chooser_class_init (EImageChooserClass *klass);
-#if 0
-static void e_image_chooser_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec);
-static void e_image_chooser_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec);
-#endif
-static void e_image_chooser_dispose (GObject *object);
-
-static gboolean image_drag_motion_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EImageChooser *chooser);
-static void image_drag_leave_cb (GtkWidget *widget,
- GdkDragContext *context,
- guint time, EImageChooser *chooser);
-static gboolean image_drag_drop_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EImageChooser *chooser);
-static void image_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time, EImageChooser *chooser);
-
-static GtkObjectClass *parent_class = NULL;
-#define PARENT_TYPE GTK_TYPE_VBOX
-
-enum DndTargetType {
- DND_TARGET_TYPE_URI_LIST
-};
-#define URI_LIST_TYPE "text/uri-list"
-
-static GtkTargetEntry image_drag_types[] = {
- { URI_LIST_TYPE, 0, DND_TARGET_TYPE_URI_LIST },
-};
-static const int num_image_drag_types = sizeof (image_drag_types) / sizeof (image_drag_types[0]);
-
-GtkWidget *
-e_image_chooser_new (void)
-{
- return g_object_new (E_TYPE_IMAGE_CHOOSER, NULL);
-}
-
-GType
-e_image_chooser_get_type (void)
-{
- static GType eic_type = 0;
-
- if (!eic_type) {
- static const GTypeInfo eic_info = {
- sizeof (EImageChooserClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc) e_image_chooser_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EImageChooser),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_image_chooser_init,
- };
-
- eic_type = g_type_register_static (PARENT_TYPE, "EImageChooser", &eic_info, 0);
- }
-
- return eic_type;
-}
-
-
-static void
-e_image_chooser_class_init (EImageChooserClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (PARENT_TYPE);
-
- image_chooser_signals [CHANGED] =
- g_signal_new ("changed",
- G_OBJECT_CLASS_TYPE (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (EImageChooserClass, changed),
- NULL, NULL,
- e_util_marshal_NONE__NONE,
- GTK_TYPE_NONE, 0);
-
- /*
- object_class->set_property = e_image_chooser_set_property;
- object_class->get_property = e_image_chooser_get_property;
- */
- object_class->dispose = e_image_chooser_dispose;
-}
-
-#if UI_CHANGE_OK
-static void
-browse_for_image_cb (GtkWidget *button, gpointer data)
-{
-}
-#endif
-
-static void
-e_image_chooser_init (EImageChooser *chooser)
-{
- EImageChooserPrivate *priv;
- GtkWidget *alignment;
-
- priv = chooser->priv = g_new0 (EImageChooserPrivate, 1);
-
- alignment = gtk_alignment_new (0, 0, 0, 0);
- priv->frame = gtk_frame_new ("");
- priv->image = gtk_image_new ();
-
- gtk_container_add (GTK_CONTAINER (alignment), priv->image);
-
-#if UI_CHANGE_OK
- priv->browse_button = gtk_button_new_with_label (_("Choose Image"));
-#endif
-
- gtk_frame_set_shadow_type (GTK_FRAME (priv->frame), GTK_SHADOW_NONE);
-
- gtk_container_add (GTK_CONTAINER (priv->frame), alignment);
- gtk_box_set_homogeneous (GTK_BOX (chooser), FALSE);
- gtk_box_pack_start (GTK_BOX (chooser), priv->frame, TRUE, TRUE, 0);
-#if UI_CHANGE_OK
- gtk_box_pack_start (GTK_BOX (chooser), priv->browse_button, FALSE, FALSE, 0);
-
- g_signal_connect (priv->browse_button, "clicked", G_CALLBACK (browse_for_image_cb), NULL);
-#endif
-
- gtk_drag_dest_set (priv->image, 0, image_drag_types, num_image_drag_types, GDK_ACTION_COPY);
- g_signal_connect (priv->image,
- "drag_motion", G_CALLBACK (image_drag_motion_cb), chooser);
- g_signal_connect (priv->image,
- "drag_leave", G_CALLBACK (image_drag_leave_cb), chooser);
- g_signal_connect (priv->image,
- "drag_drop", G_CALLBACK (image_drag_drop_cb), chooser);
- g_signal_connect (priv->image,
- "drag_data_received", G_CALLBACK (image_drag_data_received_cb), chooser);
-
- gtk_widget_show_all (priv->frame);
-#if UI_CHANGE_OK
- gtk_widget_show (priv->browse_button);
-#endif
-
- /* we default to being editable */
- priv->editable = TRUE;
-}
-
-static void
-e_image_chooser_dispose (GObject *object)
-{
- EImageChooser *eic = E_IMAGE_CHOOSER (object);
-
- if (eic->priv) {
- EImageChooserPrivate *priv = eic->priv;
-
- if (priv->image_buf) {
- g_free (priv->image_buf);
- priv->image_buf = NULL;
- }
-
- g_free (eic->priv);
- eic->priv = NULL;
- }
-
- if (G_OBJECT_CLASS (parent_class)->dispose)
- (* G_OBJECT_CLASS (parent_class)->dispose) (object);
-}
-
-
-static gboolean
-set_image_from_data (EImageChooser *chooser,
- char *data, int length)
-{
- gboolean rv = FALSE;
- GdkPixbufLoader *loader = gdk_pixbuf_loader_new ();
- GdkPixbuf *pixbuf;
-
- gdk_pixbuf_loader_write (loader, data, length, NULL);
-
- pixbuf = gdk_pixbuf_loader_get_pixbuf (loader);
- if (pixbuf)
- gdk_pixbuf_ref (pixbuf);
- gdk_pixbuf_loader_close (loader, NULL);
- g_object_unref (loader);
-
- if (pixbuf) {
- GdkPixbuf *scaled;
- GdkPixbuf *composite;
-
- float scale;
- int new_height, new_width;
-
- new_height = gdk_pixbuf_get_height (pixbuf);
- new_width = gdk_pixbuf_get_width (pixbuf);
-
- if (chooser->priv->image_height == 0
- && chooser->priv->image_width == 0) {
- scale = 1.0;
- }
- else if (chooser->priv->image_height < new_height
- || chooser->priv->image_width < new_width) {
- /* we need to scale down */
- if (new_height > new_width)
- scale = (float)chooser->priv->image_height / new_height;
- else
- scale = (float)chooser->priv->image_width / new_width;
- }
- else {
- /* we need to scale up */
- printf ("we need to scale up\n");
- if (new_height > new_width)
- scale = (float)new_height / chooser->priv->image_height;
- else
- scale = (float)new_width / chooser->priv->image_width;
- }
-
- if (scale == 1.0) {
- gtk_image_set_from_pixbuf (GTK_IMAGE (chooser->priv->image), pixbuf);
-
- chooser->priv->image_width = new_width;
- chooser->priv->image_height = new_height;
- }
- else {
- new_width *= scale;
- new_height *= scale;
- new_width = MIN (new_width, chooser->priv->image_width);
- new_height = MIN (new_height, chooser->priv->image_height);
-
- scaled = gdk_pixbuf_scale_simple (pixbuf,
- new_width, new_height,
- GDK_INTERP_BILINEAR);
-
- composite = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, gdk_pixbuf_get_bits_per_sample (pixbuf),
- chooser->priv->image_width, chooser->priv->image_height);
-
- gdk_pixbuf_fill (composite, 0x00000000);
-
- gdk_pixbuf_copy_area (scaled, 0, 0, new_width, new_height,
- composite,
- chooser->priv->image_width / 2 - new_width / 2,
- chooser->priv->image_height / 2 - new_height / 2);
-
- gtk_image_set_from_pixbuf (GTK_IMAGE (chooser->priv->image), composite);
- gdk_pixbuf_unref (scaled);
- gdk_pixbuf_unref (composite);
- }
-
- gdk_pixbuf_unref (pixbuf);
-
- g_free (chooser->priv->image_buf);
- chooser->priv->image_buf = data;
- chooser->priv->image_buf_size = length;
-
- g_signal_emit (chooser,
- image_chooser_signals [CHANGED], 0);
-
- rv = TRUE;
- }
-
- return rv;
-}
-
-static gboolean
-image_drag_motion_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EImageChooser *chooser)
-{
- GList *p;
-
- if (!chooser->priv->editable)
- return FALSE;
-
- for (p = context->targets; p != NULL; p = p->next) {
- char *possible_type;
-
- possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data));
- if (!strcmp (possible_type, URI_LIST_TYPE)) {
- g_free (possible_type);
- gdk_drag_status (context, GDK_ACTION_COPY, time);
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_IN);
- return TRUE;
- }
-
- g_free (possible_type);
- }
-
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_NONE);
- return FALSE;
-}
-
-static void
-image_drag_leave_cb (GtkWidget *widget,
- GdkDragContext *context,
- guint time, EImageChooser *chooser)
-{
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_NONE);
-}
-
-static gboolean
-image_drag_drop_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y, guint time, EImageChooser *chooser)
-{
- GList *p;
-
- if (!chooser->priv->editable)
- return FALSE;
-
- if (context->targets == NULL) {
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_NONE);
- return FALSE;
- }
-
- for (p = context->targets; p != NULL; p = p->next) {
- char *possible_type;
-
- possible_type = gdk_atom_name (GDK_POINTER_TO_ATOM (p->data));
- if (!strcmp (possible_type, URI_LIST_TYPE)) {
- g_free (possible_type);
- gtk_drag_get_data (widget, context,
- GDK_POINTER_TO_ATOM (p->data),
- time);
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_NONE);
- return TRUE;
- }
-
- g_free (possible_type);
- }
-
- gtk_frame_set_shadow_type (GTK_FRAME (chooser->priv->frame), GTK_SHADOW_NONE);
- return FALSE;
-}
-
-static void
-image_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time, EImageChooser *chooser)
-{
- char *target_type;
- gboolean handled = FALSE;
-
- target_type = gdk_atom_name (selection_data->target);
-
- if (!strcmp (target_type, URI_LIST_TYPE)) {
- GnomeVFSResult result;
- GnomeVFSHandle *handle;
- char *uri;
- char *nl = strstr (selection_data->data, "\r\n");
- char *buf = NULL;
- GnomeVFSFileInfo info;
-
- if (nl)
- uri = g_strndup (selection_data->data, nl - (char*)selection_data->data);
- else
- uri = g_strdup (selection_data->data);
-
- printf ("uri == %s\n", uri);
-
- result = gnome_vfs_open (&handle, uri, GNOME_VFS_OPEN_READ);
- if (result == GNOME_VFS_OK) {
- result = gnome_vfs_get_file_info_from_handle (handle, &info, GNOME_VFS_FILE_INFO_DEFAULT);
- if (result == GNOME_VFS_OK) {
- GnomeVFSFileSize num_left;
- GnomeVFSFileSize num_read;
- GnomeVFSFileSize total_read;
-
- printf ("file size = %d\n", (int)info.size);
- buf = g_malloc (info.size);
-
- num_left = info.size;
- total_read = 0;
-
- while ((result = gnome_vfs_read (handle, buf + total_read, num_left, &num_read)) == GNOME_VFS_OK) {
- num_left -= num_read;
- total_read += num_read;
- }
-
- printf ("read %d bytes\n", (int)total_read);
- if (set_image_from_data (chooser, buf, total_read)) {
- handled = TRUE;
- }
- else {
- /* XXX we should pop up a warning dialog here */
- g_free (buf);
- }
- }
-
- gnome_vfs_close (handle);
- }
- else {
- printf ("gnome_vfs_open failed (%s)\n", gnome_vfs_result_to_string (result));
- }
-
- g_free (uri);
- }
-
- gtk_drag_finish (context, handled, FALSE, time);
-}
-
-
-
-gboolean
-e_image_chooser_set_from_file (EImageChooser *chooser, const char *filename)
-{
- gchar *data;
- gsize data_length;
-
- g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), FALSE);
- g_return_val_if_fail (filename, FALSE);
-
- if (!g_file_get_contents (filename, &data, &data_length, NULL)) {
- return FALSE;
- }
-
- if (!set_image_from_data (chooser, data, data_length))
- g_free (data);
-
- return TRUE;
-}
-
-void
-e_image_chooser_set_editable (EImageChooser *chooser, gboolean editable)
-{
- g_return_if_fail (E_IS_IMAGE_CHOOSER (chooser));
-
- chooser->priv->editable = editable;
-
- gtk_widget_set_sensitive (chooser->priv->browse_button, editable);
-}
-
-gboolean
-e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data_length)
-{
- g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), FALSE);
- g_return_val_if_fail (data != NULL, FALSE);
- g_return_val_if_fail (data_length != NULL, FALSE);
-
- *data_length = chooser->priv->image_buf_size;
- *data = g_malloc (*data_length);
- memcpy (*data, chooser->priv->image_buf, *data_length);
-
- return TRUE;
-}
-
-gboolean
-e_image_chooser_set_image_data (EImageChooser *chooser, char *data, gsize data_length)
-{
- char *buf;
-
- g_return_val_if_fail (E_IS_IMAGE_CHOOSER (chooser), FALSE);
- g_return_val_if_fail (data != NULL, FALSE);
-
- /* yuck, a copy... */
- buf = g_malloc (data_length);
- memcpy (buf, data, data_length);
-
- if (!set_image_from_data (chooser, buf, data_length)) {
- g_free (buf);
- return FALSE;
- }
-
- return TRUE;
-}
diff --git a/capplets/about-me/e-image-chooser.h b/capplets/about-me/e-image-chooser.h
deleted file mode 100644
index 852bd76db..000000000
--- a/capplets/about-me/e-image-chooser.h
+++ /dev/null
@@ -1,64 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-/* e-image-chooser.c
- * Copyright (C) 2004 Novell, Inc.
- * Author: Chris Toshok <toshok@ximian.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of version 2 of the GNU General Public
- * License as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef _E_IMAGE_CHOOSER_H_
-#define _E_IMAGE_CHOOSER_H_
-
-#include <gtk/gtkvbox.h>
-
-G_BEGIN_DECLS
-
-#define E_TYPE_IMAGE_CHOOSER (e_image_chooser_get_type ())
-#define E_IMAGE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), E_TYPE_IMAGE_CHOOSER, EImageChooser))
-#define E_IMAGE_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), E_TYPE_IMAGE_CHOOSER, EImageChooserClass))
-#define E_IS_IMAGE_CHOOSER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_IMAGE_CHOOSER))
-#define E_IS_IMAGE_CHOOSER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_IMAGE_CHOOSER))
-
-typedef struct _EImageChooser EImageChooser;
-typedef struct _EImageChooserClass EImageChooserClass;
-typedef struct _EImageChooserPrivate EImageChooserPrivate;
-
-struct _EImageChooser
-{
- GtkVBox parent;
-
- EImageChooserPrivate *priv;
-};
-
-struct _EImageChooserClass
-{
- GtkVBoxClass parent_class;
-
- /* signals */
- void (*changed) (EImageChooser *chooser);
-
-
-};
-
-GtkWidget *e_image_chooser_new (void);
-GType e_image_chooser_get_type (void);
-
-gboolean e_image_chooser_set_from_file (EImageChooser *chooser, const char *filename);
-gboolean e_image_chooser_set_image_data (EImageChooser *chooser, char *data, gsize data_length);
-void e_image_chooser_set_editable (EImageChooser *chooser, gboolean editable);
-
-gboolean e_image_chooser_get_image_data (EImageChooser *chooser, char **data, gsize *data_length);
-
-#endif /* _E_IMAGE_CHOOSER_H_ */
diff --git a/capplets/about-me/e-util-marshal.list b/capplets/about-me/e-util-marshal.list
deleted file mode 100644
index 0cb9a24af..000000000
--- a/capplets/about-me/e-util-marshal.list
+++ /dev/null
@@ -1,3 +0,0 @@
-NONE:NONE
-NONE:INT
-NONE:POINTER
diff --git a/capplets/about-me/gnome-about-me-password.c b/capplets/about-me/gnome-about-me-password.c
deleted file mode 100644
index 0f2faad3d..000000000
--- a/capplets/about-me/gnome-about-me-password.c
+++ /dev/null
@@ -1,333 +0,0 @@
-/* gnome-about-me.c
- * Copyright (C) 2002 Diego Gonzalez
- *
- * Written by: Diego Gonzalez <diego@pemas.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- *
- * Parts of this code come from Gnome-System-Tools.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <pwd.h>
-#include <glade/glade.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <sys/ioctl.h>
-#include <sys/wait.h>
-#include <termios.h>
-#include <pty.h>
-
-#include "capplet-util.h"
-
-typedef struct {
- GtkWidget *dialog;
- GtkWidget *old_password;
- GtkWidget *new_password;
- GtkWidget *retyped_password;
-
- /* Communication with the passwd program */
- FILE *backend_stream;
- int backend_master_fd;
- int backend_pid;
- guint timeout_id;
-} PasswordDialog;
-
-enum
-{
- RESPONSE_APPLY = 1,
- RESPONSE_CLOSE
-};
-
-static void passdlg_set_busy (PasswordDialog *dlg, gboolean busy);
-
-#define REDRAW_NCHARS 1
-
-static gboolean
-wait_child (PasswordDialog *pdialog)
-{
- GtkWidget *dialog;
- gint status, pid;
- gchar *primary_text = NULL;
- gchar *secondary_text = NULL;
-
- pid = waitpid (pdialog->backend_pid, &status, WNOHANG);
-
- if (pid > 0) {
-
- if (WIFEXITED (status) && (WEXITSTATUS(status) == 0)) {
- passdlg_set_busy (pdialog, FALSE);
- primary_text = g_strdup (_("Password changed successfully"));
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_CLOSE,
- primary_text, secondary_text);
- g_signal_connect (G_OBJECT (dialog), "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (dialog);
-
- return FALSE;
- } else if ((WIFEXITED (status)) && (WEXITSTATUS (status)) && (WEXITSTATUS(status) < 255)) {
- /* the proccess was running su */
- primary_text = g_strdup (_("The entered password is invalid"));
- secondary_text = g_strdup (_("Check that you typed it correctly "
- "and that you haven't activated the \"caps lock\" key"));
- } else if ((WIFEXITED (status)) && (WEXITSTATUS (status)) && (WEXITSTATUS (status) == 255)) {
- primary_text = g_strdup (_("Could not run passwd"));
- secondary_text = g_strdup (_("Check that you have permissions to run this command"));
- } else {
- primary_text = g_strdup (_("An unexpected error has ocurred"));
- }
-
- if (primary_text) {
- passdlg_set_busy (pdialog, FALSE);
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- primary_text, secondary_text);
-
- g_signal_connect (G_OBJECT (dialog), "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (dialog);
-
- g_free (primary_text);
- g_free (secondary_text);
- }
-
- return FALSE;
- }
-
- return TRUE;
-}
-
-static gboolean
-is_string_complete (gchar *str, GSList *list)
-{
- GSList *elem;
-
- if (strlen (str) == 0)
- return FALSE;
-
- for (elem = list; elem; elem = g_slist_next (elem))
- if (g_strrstr (str, elem->data) != NULL)
- return TRUE;
-
- return FALSE;
-}
-
-static char *
-read_from_backend_va (PasswordDialog *pdialog, gchar *needle, va_list ap)
-{
- GString *str = g_string_new ("");
- gboolean may_exit = FALSE;
- gint i = 0;
- gchar c, *ptr, *arg;
- GSList *list = NULL;
-
- list = g_slist_prepend (list, needle);
-
- while ((arg = va_arg (ap, char*)) != NULL)
- list = g_slist_prepend (list, arg);
- va_end (ap);
-
- while (!is_string_complete (str->str, list)) {
- c = fgetc (pdialog->backend_stream);
- i++;
-
- if (*str->str)
- g_string_append_c (str, c);
- else {
- /* the string is still empty, read with O_NONBLOCK until
- * it gets a char, this is done for not blocking the UI
- */
- if (c != EOF) {
- g_string_append_c (str, c);
- fcntl (pdialog->backend_master_fd, F_SETFL, 0);
- }
- usleep (500);
- }
-
- /* ugly hack for redrawing UI without too much overload */
- if (i == REDRAW_NCHARS) {
- while (gtk_events_pending ())
- gtk_main_iteration ();
- i = 0;
- }
- }
-
- fcntl (pdialog->backend_master_fd, F_SETFL, O_NONBLOCK);
- ptr = str->str;
- g_string_free (str, FALSE);
-
- return ptr;
-}
-
-static gchar*
-read_from_backend (PasswordDialog *pdialog, gchar *needle, ...)
-{
- va_list ap;
-
- va_start (ap, needle);
- return read_from_backend_va (pdialog, needle, ap);
-}
-
-static void
-write_to_backend (PasswordDialog *pdialog, char *str)
-{
- gint nread = 0;
- int ret;
-
- /* turn the descriptor blocking for writing the configuration */
- fcntl (pdialog->backend_master_fd, F_SETFL, 0);
-
- do {
- ret = fputc (str [nread], pdialog->backend_stream);
-
- if (ret != EOF)
- nread++;
-
- /* ugly hack for redrawing UI */
- if (nread % REDRAW_NCHARS == 0)
- while (gtk_events_pending ())
- gtk_main_iteration ();
- } while (nread < strlen (str));
-
- while (fflush (pdialog->backend_stream) != 0);
-
- fcntl (pdialog->backend_master_fd, F_SETFL, O_NONBLOCK);
-}
-
-static void
-passdlg_set_busy (PasswordDialog *pdialog, gboolean busy)
-{
- GtkWindow *toplevel = GTK_WINDOW (pdialog->dialog);
- GdkCursor *cursor = NULL;
- GdkDisplay *display;
-
- display = gtk_widget_get_display (GTK_WIDGET (toplevel));
- if (busy)
- cursor = gdk_cursor_new_for_display (display, GDK_WATCH);
-
- gdk_window_set_cursor (GTK_WIDGET (toplevel)->window, cursor);
- gdk_display_flush (display);
-
- if (busy)
- gdk_cursor_unref (cursor);
-}
-
-
-static void
-passdlg_button_clicked_cb (GtkDialog *dialog, gint response_id, PasswordDialog *pdialog)
-{
-
- char *new_password;
- char *retyped_password;
- char *old_password;
- char *args[2];
- gchar *s;
-
- if (response_id == GTK_RESPONSE_OK) {
- /* */
- old_password = g_strdup_printf ("%s\n", gtk_entry_get_text (GTK_ENTRY (pdialog->old_password)));
- new_password = g_strdup_printf ("%s\n", gtk_entry_get_text (GTK_ENTRY (pdialog->new_password)));
- retyped_password = g_strdup_printf ("%s\n", gtk_entry_get_text (GTK_ENTRY (pdialog->retyped_password)));
-
- /* Set the busy cursor as this can be a long process */
- passdlg_set_busy (pdialog, TRUE);
-
- /* Prepare the execution environment of passwd */
- args[0] = "/usr/bin/passwd";
- args[1] = NULL;
-
- pdialog->backend_pid = forkpty (&pdialog->backend_master_fd, NULL, NULL, NULL);
- if (pdialog->backend_pid < 0) {
- g_warning ("could not fork to backend");
- gtk_main_quit ();
- } else if (pdialog->backend_pid == 0) {
- execv (args[0], args);
- exit (255);
- } else {
- fcntl (pdialog->backend_master_fd, F_SETFL, O_NONBLOCK);
- pdialog->timeout_id = g_timeout_add (1000, (GSourceFunc) wait_child, pdialog);
- pdialog->backend_stream = fdopen (pdialog->backend_master_fd, "a+");
- }
-
- /* Send current password to backend */
- s = read_from_backend (pdialog, "assword:", ": ", NULL);
- write_to_backend (pdialog, old_password);
-
- s = read_from_backend (pdialog, "assword:", ": ", "\n", NULL);
- while (strlen(s) < 4) {
- usleep(1000);
- s = read_from_backend (pdialog, "assword:", ": ", "\n", NULL);
- }
-
- /* Send new password to backend */
- write_to_backend (pdialog, new_password);
-
- s = read_from_backend (pdialog, "assword:", ": ", "\n", NULL);
- while (strlen(s) < 4) {
- usleep(1000);
- s = read_from_backend (pdialog, "assword:", ": ", "\n", NULL);
- }
-
- /* Send new and retyped password to backend */
- write_to_backend (pdialog, retyped_password);
- s = read_from_backend (pdialog, "assword:", ": ", "\n", NULL);
- while (strlen(s) < 4) {
- usleep(1000);
- s = read_from_backend (pdialog, "\n", NULL);
- }
-
- } else {
- gtk_main_quit ();
- }
-}
-
-void
-gnome_about_me_password (void)
-{
- PasswordDialog *pdialog;
- GladeXML *dialog;
-
- pdialog = g_new0 (PasswordDialog, 1);
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-about-me.glade", "change-password", NULL);
-
- pdialog->dialog = WID ("change-password");
- g_signal_connect (G_OBJECT (pdialog->dialog), "response",
- G_CALLBACK (passdlg_button_clicked_cb), pdialog);
-
- pdialog->old_password = WID ("old-password");
- pdialog->new_password = WID ("new-password");
- pdialog->retyped_password = WID ("retyped-password");
-
- gtk_window_set_resizable (GTK_WINDOW (pdialog->dialog), FALSE);
- gtk_widget_show_all (pdialog->dialog);
- gtk_main ();
-
- gtk_widget_destroy (pdialog->dialog);
- g_object_unref (G_OBJECT (dialog));
- g_free (pdialog);
-}
diff --git a/capplets/about-me/gnome-about-me-password.h b/capplets/about-me/gnome-about-me-password.h
deleted file mode 100644
index adc9b9d1e..000000000
--- a/capplets/about-me/gnome-about-me-password.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __GNOME_ABOUT_ME_PASSWORD_H__
-#define __GNOME_ABOUT_ME_PASSWORD_H__
-
-void
-gnome_about_me_password (void);
-
-#endif /* __GNOME_ABOUT_ME_PASSWORD_H__ */
diff --git a/capplets/about-me/gnome-about-me.c b/capplets/about-me/gnome-about-me.c
deleted file mode 100644
index 0abf611cc..000000000
--- a/capplets/about-me/gnome-about-me.c
+++ /dev/null
@@ -1,720 +0,0 @@
-/* gnome-about-me.c
- * Copyright (C) 2002 Diego Gonzalez
- *
- * Written by: Diego Gonzalez <diego@pemas.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <pwd.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <pwd.h>
-#include <unistd.h>
-#include <bonobo/bonobo-main.h>
-#include <libebook/e-book.h>
-
-#include "e-image-chooser.h"
-#include "gnome-about-me-password.h"
-
-#include "capplet-util.h"
-
-typedef struct {
- EContact *contact;
- EBook *book;
-
- GladeXML *dialog;
-
- GtkWidget *fsel;
- GdkScreen *screen;
- GtkIconTheme *theme;
-
- EContactAddress *addr1;
- EContactAddress *addr2;
-
- gboolean have_image;
- gboolean image_changed;
- gboolean create_self;
-
- gchar *person;
-} GnomeAboutMe;
-
-static GnomeAboutMe *me;
-
-struct WidToCid{
- gchar *wid;
- guint cid;
-};
-
-enum {
- ADDRESS_STREET = 1,
- ADDRESS_POBOX,
- ADDRESS_LOCALITY,
- ADDRESS_CODE,
- ADDRESS_REGION,
- ADDRESS_COUNTRY
-};
-
-#define ADDRESS_HOME 21
-#define ADDRESS_WORK 27
-
-struct WidToCid ids[] = {
-
- { "email-work-e", E_CONTACT_EMAIL_1 }, /* 00 */
- { "email-home-e", E_CONTACT_EMAIL_2 }, /* 01 */
-
- { "phone-home-e", E_CONTACT_PHONE_HOME }, /* 02 */
- { "phone-mobile-e", E_CONTACT_PHONE_MOBILE }, /* 03 */
- { "phone-work-e", E_CONTACT_PHONE_BUSINESS }, /* 04 */
- { "phone-work-fax-e", E_CONTACT_PHONE_BUSINESS_FAX }, /* 05 */
-
- { "im-jabber-e", E_CONTACT_IM_JABBER_HOME_1 }, /* 06 */
- { "im-msn-e", E_CONTACT_IM_MSN_HOME_1 }, /* 07 */
- { "im-icq-e", E_CONTACT_IM_ICQ_HOME_1 }, /* 08 */
- { "im-yahoo-e", E_CONTACT_IM_YAHOO_HOME_1 }, /* 09 */
- { "im-aim-e", E_CONTACT_IM_AIM_HOME_1 }, /* 10 */
- { "im-groupwise-e", E_CONTACT_IM_GROUPWISE_HOME_1 }, /* 11 */
-
- { "web-homepage-e", E_CONTACT_HOMEPAGE_URL }, /* 12 */
- { "web-calendar-e", E_CONTACT_CALENDAR_URI }, /* 13 */
- { "web-weblog-e", E_CONTACT_BLOG_URL }, /* 14 */
-
- { "job-profession-e", E_CONTACT_ROLE }, /* 15 */
- { "job-title-e", E_CONTACT_TITLE }, /* 16 */
- { "job-dept-e", E_CONTACT_ORG_UNIT }, /* 17 */
- { "job-assistant-e", E_CONTACT_ASSISTANT }, /* 18 */
- { "job-company-e", E_CONTACT_ORG }, /* 19 */
- { "job-manager-e", E_CONTACT_MANAGER }, /* 20 */
-
- { "addr-street-1", ADDRESS_STREET }, /* 21 */
- { "addr-po-1", ADDRESS_POBOX }, /* 22 */
- { "addr-locality-1", ADDRESS_LOCALITY }, /* 23 */
- { "addr-code-1", ADDRESS_CODE }, /* 24 */
- { "addr-region-1", ADDRESS_REGION }, /* 25 */
- { "addr-country-1", ADDRESS_COUNTRY }, /* 26 */
-
- { "addr-street-2", ADDRESS_STREET }, /* 27 */
- { "addr-po-2", ADDRESS_POBOX }, /* 28 */
- { "addr-locality-2", ADDRESS_LOCALITY }, /* 29 */
- { "addr-code-2", ADDRESS_CODE }, /* 30 */
- { "addr-region-2", ADDRESS_REGION }, /* 31 */
- { "addr-country-2", ADDRESS_COUNTRY }, /* 32 */
-
- { NULL, 0 }
-};
-
-enum
-{
- RESPONSE_APPLY = 1,
- RESPONSE_CLOSE
-};
-
-static void about_me_set_address_field (EContactAddress *, guint, gchar *);
-
-
-/********************/
-static void
-about_me_commit (GnomeAboutMe *me)
-{
- GError *error = NULL;
- if (me->create_self) {
- e_contact_set (me->contact, E_CONTACT_FILE_AS, "asdffff");
- e_contact_set (me->contact, E_CONTACT_NICKNAME, "nickname");
- e_contact_set (me->contact, E_CONTACT_FULL_NAME, "fullname");
- }
-
- if (me->create_self) {
- e_book_add_contact (me->book, me->contact, &error);
- e_book_set_self (me->book, me->contact, &error);
- } else {
- if (e_book_commit_contact (me->book, me->contact, &error) == FALSE)
- g_print ("There was an undeterminad error\n");
- }
-
- me->create_self = FALSE;
-}
-
-static gboolean
-about_me_focus_out (GtkWidget *widget, GdkEventFocus *event, GnomeAboutMe *me)
-{
- gchar *str = NULL;
- const gchar *wid;
- gint i;
-
- wid = glade_get_widget_name (widget);
-
- for (i = 0; ids[i].wid != NULL; i++)
- if (g_ascii_strcasecmp (ids[i].wid, wid) == 0)
- break;
-
- if (ids[i].cid == 0) {
- g_warning ("returning at invalid point\n");
- return FALSE;
- }
-
- if (GTK_IS_ENTRY (widget)) {
- str = gtk_editable_get_chars (GTK_EDITABLE (widget), 0, -1);
- } else if (GTK_IS_TEXT_VIEW (widget)) {
- GtkTextBuffer *buffer;
- GtkTextIter iter_start;
- GtkTextIter iter_end;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- gtk_text_buffer_get_start_iter (buffer, &iter_start);
- iter_end = iter_start;
- gtk_text_iter_forward_to_end (&iter_end);
- str = gtk_text_iter_get_text (&iter_start, &iter_end);
- }
-
- str = str ? str : "";
-
- if (i >= ADDRESS_HOME && i < ADDRESS_WORK) {
- about_me_set_address_field (me->addr1, ids[i].cid, str);
- e_contact_set (me->contact, E_CONTACT_ADDRESS_HOME, me->addr1);
- } else if (i >= ADDRESS_WORK) {
- about_me_set_address_field (me->addr2, ids[i].cid, str);
- e_contact_set (me->contact, E_CONTACT_ADDRESS_WORK, me->addr2);
- } else {
- e_contact_set (me->contact, ids[i].cid, str);
- }
-
- g_free (str);
-
- about_me_commit (me);
-
- return FALSE;
-}
-
-/********************/
-
-static char *
-get_user_login (void)
-{
- char buf[LINE_MAX * 4];
- struct passwd pwd, *err;
-
- int i;
- i = getpwuid_r(getuid(), &pwd, buf, sizeof(buf), &err);
- return ((i == 0) && (err == &pwd)) ? g_strdup(pwd.pw_name) : NULL;
-}
-
-/*
- * Helpers
- */
-
-GtkWidget *
-about_me_get_widget (GladeXML *dialog, gchar *name, gint suffix)
-{
- GtkWidget *widget;
- gchar *str;
-
- str = g_strdup_printf ("%s-%d", name, suffix);
- widget = WID(str);
- g_free (str);
-
- return widget;
-}
-
-static gchar *
-about_me_get_address_field (EContactAddress *addr, guint cid)
-{
- gchar *str = NULL;
-
- if (addr == NULL)
- return NULL;
-
- switch (cid) {
- case ADDRESS_STREET:
- str = addr->street;
- break;
- case ADDRESS_POBOX:
- str = addr->po;
- break;
- case ADDRESS_LOCALITY:
- str = addr->locality;
- break;
- case ADDRESS_CODE:
- str = addr->code;
- break;
- case ADDRESS_REGION:
- str = addr->region;
- break;
- case ADDRESS_COUNTRY:
- str = addr->country;
- break;
- }
-
- return str;
-}
-
-static void
-about_me_set_address_field (EContactAddress *addr, guint cid, gchar *str)
-{
- switch (cid) {
- case ADDRESS_STREET:
- if (addr->street)
- g_free (addr->street);
- addr->street = g_strdup (str);
- break;
- case ADDRESS_POBOX:
- if (addr->po)
- g_free (addr->po);
- addr->po = g_strdup (str);
- break;
- case ADDRESS_LOCALITY:
- if (addr->locality)
- g_free (addr->locality);
- addr->locality = g_strdup (str);
- break;
- case ADDRESS_CODE:
- if (addr->code)
- g_free (addr->code);
- addr->code = g_strdup (str);
- break;
- case ADDRESS_REGION:
- if (addr->region)
- g_free (addr->region);
- addr->region = g_strdup (str);
- break;
- case ADDRESS_COUNTRY:
- if (addr->country)
- g_free (addr->country);
- addr->country = g_strdup (str);
- break;
- }
-}
-
-/**
- *
- * wid: glade widget name
- * cid: id of the field (EDS id)
- * aid: position in the array WidToCid
- **/
-
-static void
-about_me_load_string_field (GnomeAboutMe *me, const gchar *wid, guint cid, guint aid)
-{
- GtkWidget *widget;
- GladeXML *dialog;
- gchar *str;
-
- dialog = me->dialog;
-
- widget = WID (wid);
-
- if (me->create_self == TRUE) {
- g_signal_connect (widget, "focus-out-event", G_CALLBACK (about_me_focus_out), me);
- return;
- }
-
- if (aid >= ADDRESS_HOME && aid < ADDRESS_WORK) {
- str = about_me_get_address_field (me->addr1, cid);
- } else if (aid >= ADDRESS_WORK) {
- str = about_me_get_address_field (me->addr2, cid);
- } else {
- str = e_contact_get_const (me->contact, cid);
- }
-
- str = str ? str : "";
-
- if (GTK_IS_ENTRY (widget)) {
- gtk_entry_set_text (GTK_ENTRY (widget), str);
- } else if (GTK_IS_TEXT_VIEW (widget)) {
- GtkTextBuffer *buffer;
-
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
- gtk_text_buffer_set_text (buffer, str, -1);
- }
-
- g_signal_connect (widget, "focus-out-event", G_CALLBACK (about_me_focus_out), me);
-}
-
-static void
-about_me_load_photo (GnomeAboutMe *me, EContact *contact)
-{
-
- GtkWidget *widget;
- GladeXML *dialog;
- EContactPhoto *photo;
-
- dialog = me->dialog;
-
- widget = WID("image-chooser");
-
- e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), me->person);
-
- photo = e_contact_get (contact, E_CONTACT_PHOTO);
-
- if (photo) {
- me->have_image = TRUE;
- e_image_chooser_set_image_data (E_IMAGE_CHOOSER (widget), photo->data, photo->length);
- e_contact_photo_free (photo);
- } else {
- me->have_image = FALSE;
- }
-}
-
-static void
-about_me_update_photo (GnomeAboutMe *me)
-{
- GtkWidget *widget;
- GladeXML *dialog;
- EContactPhoto *photo;
- gchar *file;
- FILE *fp;
-
- dialog = me->dialog;
-
- if (me->image_changed && me->have_image) {
- widget = WID ("image-chooser");
-
- photo = g_new0 (EContactPhoto, 1);
- e_image_chooser_get_image_data (E_IMAGE_CHOOSER (widget), &photo->data, &photo->length);
- e_contact_set (me->contact, E_CONTACT_PHOTO, photo);
-
- /* Save the image for GDM */
- file = g_strdup_printf ("%s/.gnome2/face.png", g_get_home_dir ());
- fp = fopen (file, "wb");
- fwrite (photo->data, 1, photo->length, fp);
- fclose (fp);
-
- /* Update GDM configuration */
- gnome_config_set_string ("/gdmphotosetup/last/picture", file);
- gnome_config_set_string ("/gdm/face/picture", file);
- gnome_config_sync ();
- g_free (file);
-
- e_contact_photo_free (photo);
-
- } else if (me->image_changed && !me->have_image) {
- /* Update the image in the card */
- e_contact_set (me->contact, E_CONTACT_PHOTO, NULL);
-
- /* Update GDM configuration */
- gnome_config_set_string ("/gdmphotosetup/last/picture", "");
- gnome_config_set_string ("/gdm/face/picture", "");
- gnome_config_sync ();
- }
-
- about_me_commit (me);
-}
-
-static void
-about_me_load_info (GnomeAboutMe *me)
-{
- gint i;
-
- if (me->create_self == FALSE) {
- me->addr1 = e_contact_get (me->contact, E_CONTACT_ADDRESS_HOME);
- if (me->addr1 == NULL)
- me->addr1 = g_new0 (EContactAddress, 1);
- me->addr2 = e_contact_get (me->contact, E_CONTACT_ADDRESS_WORK);
- if (me->addr2 == NULL)
- me->addr2 = g_new0 (EContactAddress, 1);
- }
-
- for (i = 0; ids[i].wid != NULL; i++) {
- about_me_load_string_field (me, ids[i].wid, ids[i].cid, i);
- }
-}
-
-GtkWidget *
-eab_create_image_chooser_widget(gchar *name,
- gchar *string1, gchar *string2,
- gint int1, gint int2)
-{
- GtkWidget *w = NULL;
-
- w = e_image_chooser_new ();
- gtk_widget_show_all (w);
-
- return w;
-}
-
-/*
- * Functions to handle the photo changing stuff
- */
-
-static void
-image_selected (GnomeAboutMe *me)
-{
- GtkWidget *widget;
- GladeXML *dialog;
- gchar *image;
-
- me->have_image = TRUE;
- me->image_changed = TRUE;
-
- dialog = me->dialog;
-
- widget = WID ("image-chooser");
-
- /* obtener el fichero seleccionado */
- image = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (me->fsel));
- e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), image);
- g_free (image);
-
- about_me_update_photo (me);
-
- return;
-}
-
-static void
-image_cleared (GnomeAboutMe *me)
-{
- GtkWidget *widget;
- GladeXML *dialog;
-
- me->have_image = FALSE;
- me->image_changed = TRUE;
-
- dialog = me->dialog;
-
- widget = WID ("image-chooser");
-
- e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), me->person);
- about_me_update_photo (me);
-
- return;
-}
-
-static void
-about_me_file_chooser_response (GtkWidget *widget, gint response, GnomeAboutMe *me)
-{
- if (response == GTK_RESPONSE_ACCEPT)
- image_selected (me);
- else if (response == GTK_RESPONSE_NO)
- image_cleared (me);
-
- gtk_widget_hide (me->fsel);
-}
-
-static void
-about_me_image_clicked_cb (GtkWidget *button, GnomeAboutMe *me)
-{
- char *title = _("Select Image");
- char *noimage = _("No Image");
-
- me->fsel = gtk_file_chooser_dialog_new (title, NULL,
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
- noimage, GTK_RESPONSE_NO,
- NULL);
- gtk_dialog_set_default_response (GTK_DIALOG (me->fsel), GTK_RESPONSE_ACCEPT);
-
- gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (me->fsel), g_get_home_dir ());
-
- g_signal_connect (me->fsel, "response",
- G_CALLBACK (about_me_file_chooser_response), me);
-
- gtk_window_present (GTK_WINDOW (me->fsel));
-}
-
-
-
-/* About Me Dialog Callbacks */
-
-static void
-about_me_icon_theme_changed (GtkWindow *window,
- GtkIconTheme *theme)
-{
- GtkWidget *widget;
- GtkIconInfo *icon;
- GladeXML *dialog;
-
- icon = gtk_icon_theme_lookup_icon (me->theme, "stock_person", 80, 0);
- if (icon == NULL) {
- g_print ("Icon not found\n");
- }
- g_free (me->person);
- me->person = g_strdup (gtk_icon_info_get_filename (icon));
-
- gtk_icon_info_free (icon);
-
- if (me->have_image) {
- dialog = me->dialog;
-
- widget = WID ("image-chooser");
- e_image_chooser_set_from_file (E_IMAGE_CHOOSER (widget), me->person);
- }
-}
-
-static void
-about_me_button_clicked_cb (GtkDialog *dialog, gint response_id, GnomeAboutMe *me)
-{
- if (response_id == GTK_RESPONSE_HELP)
- g_print ("Help goes here");
- else {
- e_contact_address_free (me->addr1);
- e_contact_address_free (me->addr2);
-
- g_object_unref (me->contact);
- g_object_unref (me->book);
- g_object_unref (me->dialog);
-
- g_free (me->person);
- g_free (me);
-
- gtk_main_quit ();
- }
-}
-
-static void
-about_me_passwd_clicked_cb (GtkWidget *button, gpointer data)
-{
- gnome_about_me_password ();
-}
-
-static void
-about_me_setup_dialog (void)
-{
- GtkWidget *widget;
- GtkIconInfo *icon;
- GladeXML *dialog;
- GError *error = NULL;
-
- struct passwd *pwent;
- char *user = NULL;
- gchar *str;
-
- me = g_new0 (GnomeAboutMe, 1);
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-about-me.glade",
- "about-me-dialog", NULL);
-
- me->dialog = dialog;
-
- /* Setup theme details */
- me->screen = gtk_window_get_screen (WID ("about-me-dialog"));
- me->theme = gtk_icon_theme_get_for_screen (me->screen);
-
- icon = gtk_icon_theme_lookup_icon (me->theme, "stock_person", 80, 0);
- if (icon == NULL) {
- g_print ("Icon not found\n");
- }
-
- me->person = g_strdup (gtk_icon_info_get_filename (icon));
-
- gtk_icon_info_free (icon);
-
- g_signal_connect_object (me->theme, "changed",
- G_CALLBACK (about_me_icon_theme_changed),
- GTK_WIDGET (WID("about-me-dialog")),
- G_CONNECT_SWAPPED);
-
- /* Get the self contact */
- if (!e_book_get_self (&me->contact, &me->book, &error)) {
- me->create_self = TRUE;
-
- me->contact = e_contact_new ();
- g_print ("%s\n", error->message);
-
- g_clear_error (&error);
-
- if (me->book == NULL) {
- me->book = e_book_new_system_addressbook (&error);
- if (me->book == NULL)
- g_print ("error message: %s\n", error->message);
-
- if (e_book_open (me->book, FALSE, NULL) == FALSE)
- g_print ("unable to open book, bailing out\n");
- }
- }
-
- /************************************************/
- user = get_user_login ();
- setpwent ();
- pwent = getpwnam (user);
- if (pwent == NULL) {
- printf ("error\n");
- return ;
- }
- gchar **tok;
- tok = g_strsplit (pwent->pw_gecos, ",", 0);
-
- /************************************************/
-
- /* Fill in the blanks */
-
- /* Contact Tab */
- about_me_load_photo (me, me->contact);
-
- widget = WID ("fullname");
- if (tok[0] == NULL || strlen(tok[0]) == 0) {
- str = g_strdup ("<b><span size=\"xx-large\">COMO LO HAGO?</span></b>");
- } else {
- str = g_strdup_printf ("<b><span size=\"xx-large\">%s</span></b>", tok[0]);
- }
- gtk_label_set_markup (GTK_LABEL (widget), str);
- g_free (str);
-
- widget = WID ("login");
- gtk_label_set_text (GTK_LABEL (widget), user);
-
- widget = WID ("about-me-dialog");
- str = g_strdup_printf ("About %s", tok[0]);
- gtk_window_set_title (GTK_WINDOW (widget), str);
- g_free (str);
-
- widget = WID("password");
- g_signal_connect (G_OBJECT (widget), "clicked",
- G_CALLBACK (about_me_passwd_clicked_cb), NULL);
-
- widget = WID ("button-image");
- g_signal_connect (G_OBJECT (widget), "clicked",
- G_CALLBACK (about_me_image_clicked_cb), me);
-
- about_me_load_info (me);
-
- /* Connect the close button signal */
- widget = WID ("about-me-dialog");
- g_signal_connect (G_OBJECT (widget), "response",
- G_CALLBACK (about_me_button_clicked_cb), me);
-
- /* TODO: Set dialog icon */
- gtk_window_set_resizable (GTK_WINDOW (widget), FALSE);
-
- capplet_set_icon (widget, "gnome-about-me.png");
-
- gtk_widget_show_all (widget);
-}
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-about-me", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- if (bonobo_init (&argc, argv) == FALSE)
- g_error ("Could not initialize Bonobo");
-
- about_me_setup_dialog ();
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/about-me/gnome-about-me.desktop.in b/capplets/about-me/gnome-about-me.desktop.in
deleted file mode 100644
index cfbd292c6..000000000
--- a/capplets/about-me/gnome-about-me.desktop.in
+++ /dev/null
@@ -1,13 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=About me
-_Comment=Information about myself
-Exec=gnome-about-me
-Icon=gnome-about-me.png
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=other-capplets
diff --git a/capplets/about-me/gnome-about-me.glade b/capplets/about-me/gnome-about-me.glade
deleted file mode 100644
index 22bd4ec5e..000000000
--- a/capplets/about-me/gnome-about-me.glade
+++ /dev/null
@@ -1,2647 +0,0 @@
-<?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="about-me-dialog">
- <property name="visible">True</property>
- <property name="title" translatable="yes">About Me</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="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <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_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="focus_on_click">True</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="focus_on_click">True</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="vbox55">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox58">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox59">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="button-image">
- <property name="width_request">80</property>
- <property name="height_request">80</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="Custom" id="image-chooser">
- <property name="visible">True</property>
- <property name="creation_function">eab_create_image_chooser_widget</property>
- <property name="string1">stock_person</property>
- <property name="int1">0</property>
- <property name="int2">0</property>
- <property name="last_modification_time">Tue, 13 Apr 2004 20:51:33 GMT</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="fullname">
- <property name="visible">True</property>
- <property name="label" translatable="yes">gdsdfgsdfgsdfg</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.48</property>
- <property name="xpad">12</property>
- <property name="ypad">12</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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="GtkVBox" id="vbox56">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox60">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1012">
- <property name="visible">True</property>
- <property name="label" translatable="yes">User Name:</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="login">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Change Passwo_rd</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</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">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="hbox61">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment15">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook2">
- <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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox57">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">1</property>
-
- <child>
- <widget class="GtkFrame" id="frame989">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table121">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">13</property>
-
- <child>
- <widget class="GtkLabel" id="label1015">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Work:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">email-work-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1016">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Home:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">email-home-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="email-work-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="email-home-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1017">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Email&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</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="GtkFrame" id="frame990">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table122">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">14</property>
-
- <child>
- <widget class="GtkLabel" id="label1018">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Work:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">phone-work-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1019">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Home:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">phone-home-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="phone-work-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="phone-home-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="phone-mobile-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="phone-work-fax-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1020">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Mobile:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">phone-mobile-e</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1057">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Work _Fax:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">phone-work-fax-e</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1021">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Telephone&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</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="GtkFrame" id="frame991">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment10">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table123">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">9</property>
-
- <child>
- <widget class="GtkLabel" id="label1022">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Jabber:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-jabber-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="im-jabber-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="im-msn-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1052">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Yahoo:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-yahoo-e</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1053">
- <property name="visible">True</property>
- <property name="label" translatable="yes">M_SN:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-msn-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1054">
- <property name="visible">True</property>
- <property name="label" translatable="yes">IC_Q:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-icq-e</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="GtkLabel" id="label1055">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A_IM/iChat:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-aim-e</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1056">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Groupwise:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">im-groupwise-e</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</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="GtkEntry" id="im-icq-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</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="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="im-yahoo-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="im-aim-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="im-groupwise-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1023">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Instant Messaging&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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="label1024">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Contact</property>
- <property name="use_underline">True</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>
-
- <child>
- <widget class="GtkVBox" id="vbox60">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">1</property>
-
- <child>
- <widget class="GtkVBox" id="vbox61">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">10</property>
-
- <child>
- <widget class="GtkFrame" id="frame994">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table126">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label1037">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Address:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="addr-street-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1038">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_ity:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1039">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Zip/Postal Code:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1040">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_State/Province:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</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="GtkLabel" id="label1041">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Co_untry:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1042">
- <property name="visible">True</property>
- <property name="label" translatable="yes">P_O Box:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-po-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-locality-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-code-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-country-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-region-1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1043">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Home&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</property>
- </packing>
- </child>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame995">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment14">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table127">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label1044">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Address:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="shadow_type">GTK_SHADOW_ETCHED_OUT</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="addr-street-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1045">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Zip/Postal Code:</property>
- <property name="use_underline">True</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">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1046">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_State/Province:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</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="GtkLabel" id="label1047">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Co_untry:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1048">
- <property name="visible">True</property>
- <property name="label" translatable="yes">P_O Box:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1049">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_ity:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-po-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-locality-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-code-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-region-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="addr-country-2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1050">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Work&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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="label1051">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Address</property>
- <property name="use_underline">True</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>
-
- <child>
- <widget class="GtkVBox" id="vbox59">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkFrame" id="frame992">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table124">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">10</property>
-
- <child>
- <widget class="GtkLabel" id="label1025">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Home Page:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">web-homepage-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1026">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Web _Log:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">web-weblog-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1027">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cale_ndar:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">web-calendar-e</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="GtkEntry" id="web-homepage-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="web-weblog-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="web-calendar-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</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="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1028">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Web&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</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="GtkFrame" id="frame993">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkTable" id="table125">
- <property name="border_width">9</property>
- <property name="visible">True</property>
- <property name="n_rows">6</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">9</property>
-
- <child>
- <widget class="GtkLabel" id="label1029">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Profession:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-profession-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1030">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_ompany:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-company-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1031">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Manager:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-manager-e</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="GtkLabel" id="label1032">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Title:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-title-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1033">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Department:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-dept-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1034">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A_ssistant:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">job-assistant-e</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-profession-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-company-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-manager-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</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="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-title-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-dept-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="job-assistant-e">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1035">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Job&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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="label1036">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Personal Info</property>
- <property name="use_underline">True</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>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="change-password">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Change Password</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
- <property name="modal">False</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_CENTER</property>
- <property name="has_separator">True</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <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_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</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="vbox48">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">1</property>
-
- <child>
- <widget class="GtkVBox" id="vbox49">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">10</property>
-
- <child>
- <widget class="GtkFrame" id="frame80">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkTable" id="table104">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkEntry" id="old-password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label469">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New Password:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</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="GtkEntry" id="new-password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</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="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label472">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Retype New Password:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="retyped-password">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="hseparator12">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_padding">6</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label0987">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Old Password:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- </child>
- </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">True</property>
- <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>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/about-me/gnome-about-me.png b/capplets/about-me/gnome-about-me.png
deleted file mode 100644
index 2b1328b4e..000000000
--- a/capplets/about-me/gnome-about-me.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/.cvsignore b/capplets/accessibility/.cvsignore
deleted file mode 100644
index 282522db0..000000000
--- a/capplets/accessibility/.cvsignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
diff --git a/capplets/accessibility/Makefile.am b/capplets/accessibility/Makefile.am
deleted file mode 100644
index afaf9ad06..000000000
--- a/capplets/accessibility/Makefile.am
+++ /dev/null
@@ -1 +0,0 @@
-SUBDIRS = keyboard at-properties
diff --git a/capplets/accessibility/at-properties/.cvsignore b/capplets/accessibility/at-properties/.cvsignore
deleted file mode 100644
index 749ba8329..000000000
--- a/capplets/accessibility/at-properties/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-*.desktop
-Makefile
-Makefile.in
-gnome-at-properties
-at-properties.desktop.in
diff --git a/capplets/accessibility/at-properties/ChangeLog b/capplets/accessibility/at-properties/ChangeLog
deleted file mode 100644
index 0d08f7cc3..000000000
--- a/capplets/accessibility/at-properties/ChangeLog
+++ /dev/null
@@ -1,99 +0,0 @@
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install the .desktop file in
- $(datadir)/applications.
-
- * at-properties.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-Thu Sep 2 17:06:28 2004 Jonathan Blandford <jrb@redhat.com>
-
- * main.c: (cb_dialog_response): Change to use help docs instead of
- the "foo"/"bar" that's there.
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * main.c: (setup_dialog):
- Use themed icon for window hint.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2003-11-27 Muktha <muktha.narayan@wipro.com>
-
- * main.c: Do not popup the logout dialog when the close button (X) of
- window manager is clicked. Fixes bug #124032.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * at-enable-dialog.glade: Patch to add two more pixels of spacing
- between action area and vbox of preferences dialog.
-
-Fri Aug 1 14:28:52 2003 Jonathan Blandford <jrb@redhat.com>
-
- * main.c (init_startup_state): remove markup tags from translated
- strings, #118801.
-
-2003-07-18 Jonathan Blandford <jrb@gnome.org>
-
- * main.c: Add a check to confirm that the AT's are installed. Add
- a warning message if they are not. Change widget naming scheme.
-
- * at-enable-dialog.glade: Change widget naming scheme.
-
-2003-07-16 Dennis Cranston <dennis_cranston at yahoo com>
-
- * at-enable-dialog.glade: Make close the default button.
-
-2003-07-16 Dennis Cranston <dennis_cranston at yahoo com>
-
- * at-enable-dialog.glade: Adjust widget padding and remove
- separator per HIG.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-07-01 Daniel Baeyens <daniel.baeyens@hispalinux.es>
- * capplets/accessibility/at-properties/at-enable-dialog.glade:
- "Assistive" is misspelled.
diff --git a/capplets/accessibility/at-properties/Makefile.am b/capplets/accessibility/at-properties/Makefile.am
deleted file mode 100644
index 28537c63f..000000000
--- a/capplets/accessibility/at-properties/Makefile.am
+++ /dev/null
@@ -1,29 +0,0 @@
-bin_PROGRAMS = gnome-at-properties
-
-gnome_at_properties_LDADD = $(AT_CAPPLET_LIBS) $(top_builddir)/capplets/common/libcommon.la
-gnome_at_properties_SOURCES = \
- main.c \
- at-startup-session.h \
- at-startup-session.c
-gnome_at_properties_LDFLAGS = -export-dynamic
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = at-properties.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- at-startup.png \
- at-support.png
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = at-enable-dialog.glade
-
-INCLUDES = $(AT_CAPPLET_CFLAGS) \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DPIXMAPDIR=\""$(pixmapdir)"\"
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA) $(pixmap_DATA)
diff --git a/capplets/accessibility/at-properties/at-enable-capplet.png b/capplets/accessibility/at-properties/at-enable-capplet.png
deleted file mode 100644
index c09f8d496..000000000
--- a/capplets/accessibility/at-properties/at-enable-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/at-properties/at-enable-dialog.glade b/capplets/accessibility/at-properties/at-enable-dialog.glade
deleted file mode 100644
index cadda6dc8..000000000
--- a/capplets/accessibility/at-properties/at-enable-dialog.glade
+++ /dev/null
@@ -1,465 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="at_properties_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Assistive Technology Preferences</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">False</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="at_help_button">
- <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="at_close_logout_button">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="at_close_and_logout_image">
- <property name="visible">True</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Close and _Log Out</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="at_close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_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">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="at_support_frame">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Support&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="at_enable_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="at_enable_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable assistive technologies</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="at_warning_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;&lt;b&gt;Note:&lt;/b&gt; Changes to this setting will not take effect until you next log in.&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkVBox" id="at_applications_frame">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Applications&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="at_applications_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="at_applications_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Start these assistive technologies every time you log in:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">6</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="at_screenreader_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Screenreader</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="at_magnifier_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Magnifier</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="at_keyboard_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_On-screen keyboard</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHSeparator" id="at_applications_hseparator">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="at_applications_warning_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">True</property>
- <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>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/accessibility/at-properties/at-properties.desktop.in.in b/capplets/accessibility/at-properties/at-properties.desktop.in.in
deleted file mode 100644
index 3d52616d7..000000000
--- a/capplets/accessibility/at-properties/at-properties.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Assistive Technology Support
-_Comment=Enable support for GNOME assistive technologies at login
-Exec=gnome-at-properties
-Icon=gnome-settings-accessibility-technologies
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Settings;Accessibility;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=Assistive Technology Support
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/accessibility/at-properties/at-startup-session.c b/capplets/accessibility/at-properties/at-startup-session.c
deleted file mode 100644
index 31026204e..000000000
--- a/capplets/accessibility/at-properties/at-startup-session.c
+++ /dev/null
@@ -1,160 +0,0 @@
-#include <config.h>
-#include <string.h>
-#include <glib-object.h>
-#include <gconf/gconf-client.h>
-
-#include "at-startup-session.h"
-
-#define AT_STARTUP_KEY "/desktop/gnome/accessibility/startup/exec_ats"
-
-#define GNOPERNICUS_MAGNIFIER_KEY "/apps/gnopernicus/srcore/mag_active"
-#define GNOPERNICUS_SPEECH_KEY "/apps/gnopernicus/srcore/sp_active"
-#define GNOPERNICUS_BRAILLE_KEY "/apps/gnopernicus/srcore/br_active"
-
-static AtStartupState at_startup_state_recent;
-
-static GSList *
-at_startup_get_list (GConfClient *client)
-{
- GError *error = NULL;
- GSList *at_list = gconf_client_get_list (client, AT_STARTUP_KEY, GCONF_VALUE_STRING, &error);
- if (error) {
- g_warning ("Error getting value of " AT_STARTUP_KEY ": %s", error->message);
- g_error_free (error);
- return NULL;
- }
- return at_list;
-}
-
-gint
-at_startup_string_compare (gconstpointer s1, gconstpointer s2)
-{
- if (s1 && s2) {
- return strcmp (s1, s2);
- }
- else
- return ((char *)s2-(char *)s1);
-}
-
-static GSList *
-at_startup_list_add (GSList *list, const gchar *exec_name)
-{
- GSList *l = g_slist_find_custom (list, exec_name, at_startup_string_compare);
- if (!l) {
- list = g_slist_append (list, g_strdup (exec_name));
- }
- return list;
-}
-
-static GSList *
-at_startup_list_remove (GSList *list, const gchar *exec_name)
-{
- GSList *l = g_slist_find_custom (list, exec_name, at_startup_string_compare);
- if (l) {
- g_free (l->data);
- list = g_slist_delete_link (list, l);
- }
- return list;
-}
-
-void
-at_startup_state_init (AtStartupState *startup_state)
-{
- gboolean mag_active, speech_active, braille_active;
- GSList *l;
- GConfClient *client = gconf_client_get_default ();
- GSList *at_list = at_startup_get_list (client);
- gchar *prog;
-
- for (l = at_list; l; l = l->next) {
- gchar *exec_name = (char *) l->data;
- if (exec_name && !strcmp (exec_name, "gnopernicus")) {
- braille_active = gconf_client_get_bool (client,
- GNOPERNICUS_BRAILLE_KEY,
- NULL);
- mag_active = gconf_client_get_bool (client,
- GNOPERNICUS_MAGNIFIER_KEY,
- NULL);
- speech_active = gconf_client_get_bool (client,
- GNOPERNICUS_SPEECH_KEY,
- NULL);
-
- startup_state->enabled.screenreader = (braille_active || speech_active);
- startup_state->enabled.magnifier = mag_active;
- }
- else if (exec_name && !strcmp(exec_name, "gok")) {
- startup_state->enabled.osk = TRUE;
- }
- g_free (exec_name);
- }
-
- g_slist_free (at_list);
- g_object_unref (client);
- at_startup_state_recent.flags = startup_state->flags;
-
- prog = g_find_program_in_path ("gok");
- if (prog != NULL) {
- startup_state->enabled.osk_installed = TRUE;
- g_free (prog);
- } else {
- startup_state->enabled.osk_installed = FALSE;
- }
-
- prog = g_find_program_in_path ("gnopernicus");
- if (prog != NULL) {
- startup_state->enabled.magnifier_installed = TRUE;
- startup_state->enabled.screenreader_installed = TRUE;
- g_free (prog);
- } else {
- startup_state->enabled.magnifier_installed = FALSE;
- startup_state->enabled.screenreader_installed = FALSE;
- }
-}
-
-void
-at_startup_state_update (AtStartupState *startup_state)
-{
- GError *error = NULL;
- GConfClient *client = gconf_client_get_default ();
- GSList *at_list = at_startup_get_list (client);
-
- if (startup_state->enabled.screenreader != at_startup_state_recent.enabled.screenreader) {
- gconf_client_set_bool (client, GNOPERNICUS_SPEECH_KEY,
- startup_state->enabled.screenreader, NULL);
- gconf_client_set_bool (client, GNOPERNICUS_BRAILLE_KEY,
- startup_state->enabled.screenreader, NULL);
- }
-
- if (startup_state->enabled.magnifier != at_startup_state_recent.enabled.magnifier) {
- gconf_client_set_bool (client, GNOPERNICUS_MAGNIFIER_KEY,
- startup_state->enabled.magnifier, NULL);
- }
-
- if (startup_state->enabled.screenreader || startup_state->enabled.magnifier) {
- if (!(at_startup_state_recent.enabled.screenreader ||
- at_startup_state_recent.enabled.magnifier))
- /* new state includes SR or magnifier, initial one did not */
- at_list = at_startup_list_add (at_list, "gnopernicus");
- }
- else {
- if (at_startup_state_recent.enabled.screenreader ||
- at_startup_state_recent.enabled.magnifier)
- at_list = at_startup_list_remove (at_list, "gnopernicus");
- }
- if (startup_state->enabled.osk) {
- if (!at_startup_state_recent.enabled.osk)
- at_list = at_startup_list_add (at_list, "gok");
- }
- else {
- if (at_startup_state_recent.enabled.osk)
- at_list = at_startup_list_remove (at_list, "gok");
- }
- if (at_startup_state_recent.flags != startup_state->flags) {
- at_startup_state_recent.flags = startup_state->flags;
- gconf_client_set_list (client, AT_STARTUP_KEY, GCONF_VALUE_STRING, at_list, &error);
- }
- g_object_unref (client);
- g_slist_free (at_list);
-}
-
-
diff --git a/capplets/accessibility/at-properties/at-startup-session.h b/capplets/accessibility/at-properties/at-startup-session.h
deleted file mode 100644
index 603957ccb..000000000
--- a/capplets/accessibility/at-properties/at-startup-session.h
+++ /dev/null
@@ -1,18 +0,0 @@
-#include <glib.h>
-
-typedef union {
- guint flags;
- struct {
- guint support:1;
- guint osk:1;
- guint magnifier:1;
- guint screenreader:1;
- guint osk_installed:1;
- guint magnifier_installed:1;
- guint screenreader_installed:1;
- } enabled;
-} AtStartupState;
-
-void at_startup_state_init (AtStartupState *startup_state);
-
-void at_startup_state_update (AtStartupState *startup_state);
diff --git a/capplets/accessibility/at-properties/at-startup.png b/capplets/accessibility/at-properties/at-startup.png
deleted file mode 100644
index c09f8d496..000000000
--- a/capplets/accessibility/at-properties/at-startup.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/at-properties/at-support.png b/capplets/accessibility/at-properties/at-support.png
deleted file mode 100644
index 1a350a8e0..000000000
--- a/capplets/accessibility/at-properties/at-support.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
deleted file mode 100644
index 11cbe42e4..000000000
--- a/capplets/accessibility/at-properties/main.c
+++ /dev/null
@@ -1,296 +0,0 @@
-#include <config.h>
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "at-startup-session.h"
-
-#define ACCESSIBILITY_KEY "/desktop/gnome/interface/accessibility"
-#define ACCESSIBILITY_KEY_DIR "/desktop/gnome/interface"
-#define AT_STARTUP_DIR "/desktop/gnome/accessibility/startup"
-#define AT_STARTUP_KEY "/desktop/gnome/accessibility/startup/exec_ats"
-#define SR_PREFS_DIR "/apps/gnopernicus/srcore"
-
-static AtStartupState at_startup_state, at_startup_state_initial;
-
-static void
-init_startup_state (GladeXML *dialog)
-{
- GConfClient *client = gconf_client_get_default ();
-
- at_startup_state.flags = (gconf_client_get_bool (client,
- ACCESSIBILITY_KEY,
- NULL)) ? 1 : 0;
-
- at_startup_state_init (&at_startup_state);
-
- at_startup_state_initial.flags = at_startup_state.flags;
- g_object_unref (client);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle")),
- at_startup_state.enabled.osk);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle")),
- at_startup_state.enabled.screenreader);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle")),
- at_startup_state.enabled.magnifier);
-
- gtk_widget_set_sensitive (WID ("at_keyboard_toggle"),
- at_startup_state.enabled.osk_installed);
- gtk_widget_set_sensitive (WID ("at_screenreader_toggle"),
- at_startup_state.enabled.screenreader_installed);
- gtk_widget_set_sensitive (WID ("at_magnifier_toggle"),
- at_startup_state.enabled.magnifier_installed);
-
- if (at_startup_state.enabled.osk_installed &&
- at_startup_state.enabled.screenreader_installed &&
- at_startup_state.enabled.magnifier_installed) {
- gtk_widget_hide (WID ("at_applications_warning_label"));
- gtk_widget_hide (WID ("at_applications_hseparator"));
- } else {
- gchar *warning_label;
-
- gtk_widget_show (WID ("at_applications_warning_label"));
- gtk_widget_show (WID ("at_applications_hseparator"));
- if (!at_startup_state.enabled.osk_installed &&
- !(at_startup_state.enabled.screenreader_installed ||
- at_startup_state.enabled.magnifier_installed)) {
- warning_label = g_strdup_printf ("<i>%s</i>", _("No Assistive Technology is available on your system. The 'gok' package must be installed in order to get on-screen keyboard support, and the 'gnopernicus' package must be installed for screenreading and magnifying capabilities."));
- } else if (!at_startup_state.enabled.osk_installed) {
- warning_label = g_strdup_printf ("<i>%s</i>", _("Not all available assistive technologies are installed on your system. The 'gok' package must be installed in order to get on-screen keyboard support."));
- } else {
- warning_label = g_strdup_printf ("<i>%s</i>", _("Not all available assistive technologies are installed on your system. The 'gnopernicus' package must be installed for screenreading and magnifying capabilities."));
- }
- gtk_label_set_markup (GTK_LABEL (WID ("at_applications_warning_label")), warning_label);
- g_free (warning_label);
- }
-}
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
-
- dialog = glade_xml_new (GLADEDIR "/at-enable-dialog.glade", "at_properties_dialog", NULL);
-
- gtk_image_set_from_stock (GTK_IMAGE (WID ("at_close_and_logout_image")),
- GTK_STOCK_QUIT, GTK_ICON_SIZE_BUTTON);
-
- gtk_image_set_from_file (GTK_IMAGE (WID ("at_enable_image")),
- PIXMAPDIR "/at-support.png");
-
- gtk_image_set_from_file (GTK_IMAGE (WID ("at_applications_image")),
- PIXMAPDIR "/at-startup.png");
-
- return dialog;
-}
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id)
-{
- GnomeClient *client;
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustaccess-11");
- else if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT)
- gtk_main_quit ();
- else {
- g_message ("CLOSE AND LOGOUT!");
- if (!(client = gnome_master_client ())) {
-
- gtk_main_quit ();
- }
- gnome_client_request_save (client, GNOME_SAVE_GLOBAL, TRUE,
- GNOME_INTERACT_ANY, FALSE, TRUE);
- }
-}
-
-static void
-close_logout_update (GladeXML *dialog)
-{
- GConfClient *client = gconf_client_get_default ();
- gboolean has_changed =
- (at_startup_state.flags != at_startup_state_initial.flags) &&
- gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
-
- gtk_widget_set_sensitive (WID ("at_close_logout_button"), has_changed);
- g_object_unref (client);
-}
-
-static void
-at_startup_toggled (GtkToggleButton *toggle_button,
- GladeXML *dialog)
-{
- if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle"))) {
- at_startup_state.enabled.osk = gtk_toggle_button_get_active (toggle_button);
- }
- else if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle"))) {
- at_startup_state.enabled.magnifier = gtk_toggle_button_get_active (toggle_button);
- }
- else if (toggle_button == GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle"))) {
- at_startup_state.enabled.screenreader = gtk_toggle_button_get_active (toggle_button);
- }
-
- at_startup_state_update (&at_startup_state);
- close_logout_update (dialog);
-}
-
-static void
-at_enable_toggled (GtkToggleButton *toggle_button,
- GladeXML *dialog)
-{
- GConfClient *client = gconf_client_get_default ();
- gboolean is_enabled = gtk_toggle_button_get_active (toggle_button);
-
- gconf_client_set_bool (client, ACCESSIBILITY_KEY,
- is_enabled,
- NULL);
- at_startup_state.enabled.support = is_enabled;
- g_object_unref (client);
-}
-
-static void
-at_startup_update_ui (GConfClient *client,
- GladeXML *dialog)
-{
- at_startup_state_init (&at_startup_state);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_keyboard_toggle")),
- at_startup_state.enabled.osk);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_screenreader_toggle")),
- at_startup_state.enabled.screenreader);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_magnifier_toggle")),
- at_startup_state.enabled.magnifier);
-}
-
-static void
-at_enable_update (GConfClient *client,
- GladeXML *dialog)
-{
- gboolean is_enabled = gconf_client_get_bool (client, ACCESSIBILITY_KEY, NULL);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("at_enable_toggle")),
- is_enabled);
-
- gtk_widget_set_sensitive (WID ("at_applications_frame"), is_enabled);
-}
-
-static void
-at_startup_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- at_startup_state_init (&at_startup_state);
- at_startup_update_ui (client, user_data);
- close_logout_update (user_data);
-}
-
-static void
-at_enable_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- at_enable_update (client, user_data);
- close_logout_update (user_data);
-}
-
-static void
-setup_dialog (GladeXML *dialog)
-{
- GConfClient *client;
- GtkWidget *widget;
- GObject *peditor;
-
- client = gconf_client_get_default ();
-
- gconf_client_add_dir (client, ACCESSIBILITY_KEY_DIR,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- widget = WID ("at_enable_toggle");
- g_signal_connect (widget, "toggled",
- G_CALLBACK (at_enable_toggled),
- dialog);
-
- peditor = gconf_peditor_new_boolean (NULL, ACCESSIBILITY_KEY,
- widget,
- NULL);
-
- at_enable_update (client, dialog);
-
- gconf_client_notify_add (client, ACCESSIBILITY_KEY_DIR,
- at_enable_changed,
- dialog, NULL, NULL);
-
- gconf_client_add_dir (client, AT_STARTUP_DIR,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- gconf_client_add_dir (client, SR_PREFS_DIR,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- gconf_client_notify_add (client, AT_STARTUP_DIR,
- at_startup_changed,
- dialog, NULL, NULL);
-
- gconf_client_notify_add (client, SR_PREFS_DIR,
- at_startup_changed,
- dialog, NULL, NULL);
-
- widget = WID ("at_keyboard_toggle");
-
- g_signal_connect (widget, "toggled",
- G_CALLBACK (at_startup_toggled),
- dialog);
-
- widget = WID ("at_magnifier_toggle");
- g_signal_connect (widget, "toggled",
- G_CALLBACK (at_startup_toggled),
- dialog);
-
- widget = WID ("at_screenreader_toggle");
- g_signal_connect (widget, "toggled",
- G_CALLBACK (at_startup_toggled),
- dialog);
-
- widget = WID ("at_properties_dialog");
- capplet_set_icon (widget, "gnome-settings-accessibility-technologies");
-
- g_signal_connect (G_OBJECT (widget),
- "response",
- G_CALLBACK (cb_dialog_response), NULL);
-
- gtk_widget_show (widget);
-
- g_object_unref (client);
-}
-
-int
-main (int argc, char *argv[])
-{
- GladeXML *dialog;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-at-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- activate_settings_daemon ();
-
- dialog = create_dialog ();
-
- init_startup_state (dialog);
-
- setup_dialog (dialog);
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/accessibility/keyboard/.cvsignore b/capplets/accessibility/keyboard/.cvsignore
deleted file mode 100644
index 791871b58..000000000
--- a/capplets/accessibility/keyboard/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.o
-*.lo
-*.la
-*.gladep
-*.glade.bak
-gnome-accessibility-keyboard-properties
-accessibility-keyboard.desktop
-accessibility-keyboard.desktop.in
diff --git a/capplets/accessibility/keyboard/ChangeLog b/capplets/accessibility/keyboard/ChangeLog
deleted file mode 100644
index 0b0d46c6e..000000000
--- a/capplets/accessibility/keyboard/ChangeLog
+++ /dev/null
@@ -1,388 +0,0 @@
-2005-01-05 Sebastien Bacher <seb128@debian.org>
-
- * gnome-accessibility-keyboard-properties.glade: fixed a typo in the
- label-for for the "pixels/second" label (Part of #162368).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * accessibility-keyboard.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-accessibility-keyboard-properties.c: (main):
- Use themed icon for window hint.
-
-2004-07-06 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-accessibility-keyboard-properties.glade: Add label-for/
- labelled-by relations. Fixes bug #144174.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-16 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c (cb_load_CDE_file) : Add a kludge to set
- the vertical size based on the monitor size until the filesel can do
- a better job of doing it itself.
-
-2003-12-07 Jan Arne Petersen <jpetersen@uni-bonn.de>
-
- * accessibility-keyboard.c: (load_CDE_file),
- (fchooser_handle_response), (cb_load_CDE_file): replace
- GtkFileSelection with GtkFileChooser.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-accessibility-keyboard-properties.c: (dialog_response): Update
- help link to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-11-18 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-accessibility-keyboard-properties.glade: Add atk relations.
- Fixes bug #126718
-
-2003-11-03 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=120842
- * gnome-accessibility-keyboard-properties.c : older xservers require
- X11/Xlib.h too, its not sun specific.
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=120842
- * gnome-accessibility-keyboard-properties.glade : Remove bone headed
- spitting of checkbox and label.
- * accessibility-keyboard.c (setup_toggles) : It was probably done so
- that the headers could be made bold.
-
-Mon Aug 11 11:55:49 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-accessibility-keyboard-properties.glade: Patch from Elijah
- Newren <newren@math.utah.edu> to bring the possible repeat range
- in sync with the keyboard capplet.
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-accessibility-keyboard-properties.glade: Patch to add
- two more pixels of spacing between action area and vbox of
- preferences dialog.
-
-2003-07-24 Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
-
- * gnome-accessibility-keyboard-properties.glade:
- Allow only numeric values in spinbutton.
- Fixes bugzilla bug# 118175
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-accessibility-keyboard-properties.glade,
- accessibility-keyboard.c: HIG fixes for ui-review bug
- report #98915.
-
-2003-07-16 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-accessibility-keyboard-properties.glade: Adjust widget
- padding to make dialog a little more HIG compliant.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-05-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-accessibility-keyboard-properties.c: Merge fix
- for bug #110266.
-
-2003-04-30 Alex Duggan <aldug@astrolinux.com>
-
- * gnome-accessibility-keyboard-properties.c: use appropriate
- window border icon.
-
-2003-04-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-accessibility-keyboard-properties.c: Fix build
- on Solaris. Fixes bug #106196.
-
-2003-02-21 Calum Benson <calum.benson@sun.com>
-
- * gnome-accessibility-keyboard-properties.glade:
- HIG-ified frames and labels.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2003-01-08 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=96483
- * accessibility-keyboard.c : sigh. The defaults apparently need to be
- 0 too.
-
-2003-01-08 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=96484
- * accessibility-keyboard.c : make 0 min for slow and bounce
-
-2003-01-07 Abel Cheung <maddog@linux.org.hk>
-
- * gnome-accessibility-keyboard-properties.c (xkb_enabled): Fix typo
- in error msg dialog.
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-13 Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
-
- * accessibility-keyboard.c : Tweaked the incremental values
- of spin button to 10. Fixes #95511
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c : Merge in Calum's new layout
- * gnome-accessibility-keyboard-properties.glade : ditto.
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-11 Balamurali Viswanathan <balamurali.viswanathan@wipro.com>
-
- * gnome-accessibility-keyboard-properties.c (xkb_enabled): Dismiss
- the XKB extensions warning dialog. Fixes #95069
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-09-26 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade : add ellipsis for CDE
- import and Repeat key buttons.
-
-2002-09-25 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade : remove spaces before
- colons and fix the title.
-
-2002-09-24 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c (load_CDE_file) : blah the
- XrmGetFileDatabase is implementation specific in its handling of
- invalid files. Add a hack that if the imported file did not contain
- any resources it was invalid.
-
- * gnome-accessibility-keyboard-properties.glade : add mnemonic_widget
- for mousekeys_init_delay_title. Remove the atkrelations for things
- with mnemonic_widget.
-
-2002-09-11 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade : Fix conflicting
- accelerators.
-
- * accessibility-keyboard.c (setup_dialog) : connect the simple items
- before the master.
- (cb_master_enable_toggle) : desensitize the subfeature content if the
- master switch is disabled.
-
-2002-09-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.c (main) : add a warning if
- xkb is not available.
-
-2002-09-09 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c : on 2nd thought lets disable the 'beep on
- feature change' if the master switch is off.
-
- http://bugzilla.gnome.org/show_bug.cgi?id=92488
- * gnome-accessibility-keyboard-properties.glade : tweak accelerators
-
-2002-09-09 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=90936
- * gnome-accessibility-keyboard-properties.glade : Add mnemonic_widget
- assignments and fix a typo.
-
-2002-08-28 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=91854
- * accessibility-keyboard.c : the max slow key delay is 500ms.
- We clamp that in the settings daemon. Fix the ui to reflect that.
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * accessibility-keyboard.desktop.in: Fix the desktop file so that
- it validates.
-
-2002-08-05 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade : Restore the master
- toggle.
-
- * accessibility-keyboard.c (setup_dialog) : support the master toggle.
- (cb_master_enable_toggle) : new.
-
-2002-08-01 jacob berkman <jacob@ximian.com>
-
- * accessibility-keyboard.c (setup_accessX_dialog): fix widget name
- for the keyboard capplet button
-
- * gnome-accessibility-keyboard-properties.c (dialog_response):
- don't quit when the import accessx button is clicked (#89358)
-
-2002-06-21 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-accessibility-keyboard-properties.c :
- Changed the help link to point to the correct document (#85895)
-
-2002-06-10 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c : tweak the layout as requested and adjust
- the max slowkey delay to 500 to avoid losing the keyboard due to some
- sort of an X problem.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-Sun May 26 11:44:41 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-accessibility-keyboard-properties.c (main): use APPID
- instead of argv[0]
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.c (dialog_response) : fix
- path to help.
-
-2002-04-24 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c : adjust the defaults.
-
-2002-04-18 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c (setup_accessX_dialog) : Use 'clicked'
- rather than 'activated' for the file sel.
-
-2002-04-10 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade2 (</) : slim down the
- tooltips.
-
-Wed Apr 10 18:02:29 2002 Jonathan Blandford <jrb@gnome.org>
-
- * accessibility-keyboard.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-30 Jody Goldberg <jody@gnome.org>
-
- * gnome-accessibility-keyboard-properties.glade2 : rename Sample -> Text
- because that makes more sense.
-
- http://bugzilla.gnome.org/show_bug.cgi?id=76315
- * accessibility-keyboard.desktop.in : rename from AccessX -> Keyboard
-
-2002-03-29 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c (setup_dialog) : spelling error.
- (CONFIG_ROOT) : fix spelling error in the schema.
-
-2002-03-29 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c : tweak the mouse key slider ranges
- max_speed : 100 pixels every 10 msec is plenty fast Limit things to
- 1..100 default 10 step 5
- accel_time : 10..5000 default 300 step 100
- init_delay : 10..5000 default 300 step 100
-
-2002-03-28 jacob berkman <jacob@ximian.com>
-
- * accessibility-keyboard.c: on solaris Xresource.h sez /* You must
- include <X11/Xlib.h> before including this file */
-
-2002-03-25 Jody Goldberg <jody@gnome.org>
-
- * accessibility-keyboard.c (setup_accessX_dialog) : Only load the
- necessary toplevel widget in the non-dialog case.
- (setup_dialog) : pass as_dialog to the sub-init routines.
- (setup_images) : only load widgets appropriate for the current state.
- (setup_ranges) : ditto, and be more vocal about invalid glade.
- (setup_simple_toggles) : ditto.
- (setup_toggles) : ditto.
diff --git a/capplets/accessibility/keyboard/Makefile.am b/capplets/accessibility/keyboard/Makefile.am
deleted file mode 100644
index 1ee9af4f1..000000000
--- a/capplets/accessibility/keyboard/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-noinst_LIBRARIES = libaccessibility-keyboard.a
-
-libaccessibility_keyboard_a_SOURCES = \
- accessibility-keyboard.c \
- accessibility-keyboard.h
-
-# in case we need to forward port the sun accessX extension
-# AccessXcomm.c
-
-bin_PROGRAMS = gnome-accessibility-keyboard-properties
-
-gnome_accessibility_keyboard_properties_SOURCES = gnome-accessibility-keyboard-properties.c
-gnome_accessibility_keyboard_properties_LDADD = \
- libaccessibility-keyboard.a $(GNOMECC_CAPPLETS_LIBS)
-
-@INTLTOOL_DESKTOP_RULE@
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- accessibility-keyboard-togglekey.png \
- accessibility-keyboard-mousekey.png \
- accessibility-keyboard-slowkey.png \
- accessibility-keyboard-stickykey.png \
- accessibility-keyboard-bouncekey.png
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-accessibility-keyboard-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = accessibility-keyboard.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA) $(pixmap_DATA)
-
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-bouncekey.png b/capplets/accessibility/keyboard/accessibility-keyboard-bouncekey.png
deleted file mode 100644
index 62bccb7c7..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-bouncekey.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-capplet.png b/capplets/accessibility/keyboard/accessibility-keyboard-capplet.png
deleted file mode 100644
index 3304a77e7..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-mousekey.png b/capplets/accessibility/keyboard/accessibility-keyboard-mousekey.png
deleted file mode 100644
index 727236511..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-mousekey.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-slowkey.png b/capplets/accessibility/keyboard/accessibility-keyboard-slowkey.png
deleted file mode 100644
index fcd55325b..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-slowkey.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-stickykey.png b/capplets/accessibility/keyboard/accessibility-keyboard-stickykey.png
deleted file mode 100644
index dce2aa9a3..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-stickykey.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard-togglekey.png b/capplets/accessibility/keyboard/accessibility-keyboard-togglekey.png
deleted file mode 100644
index 81b0f766b..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard-togglekey.png
+++ /dev/null
Binary files differ
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard.c b/capplets/accessibility/keyboard/accessibility-keyboard.c
deleted file mode 100644
index fca91b479..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard.c
+++ /dev/null
@@ -1,477 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* accessibility-keyboard.c
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by: Jody Goldberg <jody@gnome.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <X11/Xlib.h>
-#include <X11/Xresource.h>
-#include <math.h>
-
-#include "capplet-util.h"
-#include "capplet-stock-icons.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-
-#define CONFIG_ROOT "/desktop/gnome/accessibility/keyboard"
-
-static struct {
- char const * const checkbox;
- char const * const image;
- char const * const image_file;
- char const * const gconf_key;
- char const * const content [3];
- gboolean always_enabled;
-} const features [] = {
- { "repeatkeys_enable", "repeatkeys_image", KEYBOARD_REPEAT,
- "/desktop/gnome/peripherals/keyboard/repeat",
- { "repeatkeys_table", NULL, NULL }, TRUE },
- { "bouncekeys_enable", "bouncekeys_image", ACCESSX_KEYBOARD_BOUNCE,
- CONFIG_ROOT "/bouncekeys_enable",
- { "bouncekey_table", NULL, NULL }, FALSE },
- { "slowkeys_enable", "slowkeys_image", ACCESSX_KEYBOARD_SLOW,
- CONFIG_ROOT "/slowkeys_enable",
- { "slowkeys_table", NULL, NULL }, FALSE },
- { "mousekeys_enable", "mousekeys_image", ACCESSX_KEYBOARD_MOUSE,
- CONFIG_ROOT "/mousekeys_enable",
- { "mousekeys_table", NULL, NULL }, FALSE },
- { "stickykeys_enable", "stickykeys_image", ACCESSX_KEYBOARD_STICK,
- CONFIG_ROOT "/stickykeys_enable",
- { "stickeykeys_table", NULL, NULL }, FALSE },
- { "togglekeys_enable", "togglekeys_image", ACCESSX_KEYBOARD_TOGGLE,
- CONFIG_ROOT "/togglekeys_enable",
- { NULL, NULL, NULL }, FALSE },
- { "timeout_enable", NULL, NULL,
- CONFIG_ROOT "/timeout_enable",
- { "timeout_slide", "timeout_spin", "timeout_label" }, FALSE },
- { "feature_state_change_beep", NULL, NULL,
- CONFIG_ROOT "/feature_state_change_beep",
- { NULL, NULL, NULL }, FALSE }
-};
-
-static struct {
- char const * const slide;
- char const * const spin;
- int default_val;
- int min_val;
- int max_val;
- int step_size;
- char const * const gconf_key;
-} const ranges [] = {
- { "repeatkeys_delay_slide", "repeatkeys_delay_spin", 500, 100, 1500, 10,
- "/desktop/gnome/peripherals/keyboard/delay" },
- { "repeatkeys_rate_slide", "repeatkeys_rate_spin", 90, 10, 110, 10,
- "/desktop/gnome/peripherals/keyboard/rate" },
- { "bouncekeys_delay_slide", "bouncekeys_delay_spin", 0, 0, 900, 10,
- CONFIG_ROOT "/bouncekeys_delay" },
- { "slowkeys_delay_slide", "slowkeys_delay_spin", 0, 0, 500, 10,
- CONFIG_ROOT "/slowkeys_delay" },
- /* WARNING anything larger than approx 512 seems to loose all keyboard input */
- { "mousekeys_max_speed_slide", "mousekeys_max_speed_spin", 300, 10, 500, 10,
- CONFIG_ROOT "/mousekeys_max_speed" },
- { "mousekeys_accel_time_slide", "mousekeys_accel_time_spin", 300, 10, 3000, 10,
- CONFIG_ROOT "/mousekeys_accel_time" },
- { "mousekeys_init_delay_slide", "mousekeys_init_delay_spin", 300, 10, 5000, 10,
- CONFIG_ROOT "/mousekeys_init_delay" },
- { "timeout_slide", "timeout_spin", 200, 10, 500, 10,
- CONFIG_ROOT "/timeout" },
-};
-
-static void
-set_sensitive (GladeXML *dialog, char const *name, gboolean state)
-{
- if (name != NULL)
- gtk_widget_set_sensitive (WID (name), state);
-}
-
-/**
- * cb_feature_toggled :
- *
- * NOTE : for this to work the toggle MUST be initialized to active in the
- * glade file. That way if the gconf setting is FALSE the toggle will fire.
- */
-static void
-cb_feature_toggled (GtkToggleButton *btn, gpointer feature_index)
-{
- gboolean const state =
- (GTK_WIDGET_STATE (btn) != GTK_STATE_INSENSITIVE) &&
- gtk_toggle_button_get_active (btn);
- GladeXML *dialog = g_object_get_data (G_OBJECT (btn), "dialog");
- int feature, i;
-
- g_return_if_fail (dialog != NULL);
-
- feature = GPOINTER_TO_INT (feature_index);
-
- if (features [feature].image != NULL)
- set_sensitive (dialog, features [feature].image, state);
- for (i = G_N_ELEMENTS (features [feature].content) ; i-- > 0 ; )
- set_sensitive (dialog, features [feature].content [i], state);
-}
-
-static void
-setup_toggles (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GObject *peditor;
- GtkWidget *checkbox;
- GtkWidget *checkbox_label;
- int i = G_N_ELEMENTS (features);
-
- while (i-- > 0) {
- checkbox = WID (features [i].checkbox);
-
- g_return_if_fail (checkbox != NULL);
-
- /* you can't do this from glade */
- checkbox_label = gtk_bin_get_child (GTK_BIN (checkbox));
- g_object_set (G_OBJECT (checkbox_label), "use_markup", TRUE, NULL);
-
- g_object_set_data (G_OBJECT (checkbox), "dialog", dialog);
- g_signal_connect (G_OBJECT (checkbox),
- "toggled",
- G_CALLBACK (cb_feature_toggled), GINT_TO_POINTER (i));
- peditor = gconf_peditor_new_boolean (changeset,
- (gchar *)features [i].gconf_key, checkbox, NULL);
- }
-}
-
-static void
-setup_simple_toggles (GladeXML *dialog, GConfChangeSet *changeset)
-{
- static struct {
- char const *gconf_key;
- char const *checkbox;
- } const simple_toggles [] = {
- { CONFIG_ROOT "/bouncekeys_beep_reject", "bouncekeys_beep_reject" },
-
- { CONFIG_ROOT "/slowkeys_beep_press", "slowkeys_beep_press" },
- { CONFIG_ROOT "/slowkeys_beep_accept", "slowkeys_beep_accept" },
- { CONFIG_ROOT "/slowkeys_beep_reject", "slowkeys_beep_reject" },
-
- { CONFIG_ROOT "/stickykeys_two_key_off", "stickykeys_two_key_off" },
- { CONFIG_ROOT "/stickykeys_modifier_beep", "stickykeys_modifier_beep" },
- };
- int i = G_N_ELEMENTS (simple_toggles);
- while (i-- > 0) {
- GtkWidget *w = WID (simple_toggles [i].checkbox);
-
- g_return_if_fail (w != NULL);
-
- gconf_peditor_new_boolean (changeset,
- (gchar *) simple_toggles [i].gconf_key,
- w, NULL);
- }
-}
-
-static void
-setup_ranges (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GObject *peditor;
- GtkWidget *slide, *spin;
- GtkAdjustment *adjustment;
- int i = G_N_ELEMENTS (ranges);
-
- while (i-- > 0) {
- slide = WID (ranges [i].slide);
- spin = WID (ranges [i].spin);
- g_return_if_fail (slide != NULL);
- g_return_if_fail (spin != NULL);
-
- adjustment = gtk_range_get_adjustment (GTK_RANGE (slide));
-
- g_return_if_fail (adjustment != NULL);
-
- adjustment->value = ranges [i].default_val;
- adjustment->lower = ranges [i].min_val;
- adjustment->upper = ranges [i].max_val + ranges [i].step_size;
- adjustment->step_increment = ranges [i].step_size;
- adjustment->page_increment = ranges [i].step_size;
- adjustment->page_size = ranges [i].step_size;
-
- gtk_adjustment_changed (adjustment);
- gtk_spin_button_configure (GTK_SPIN_BUTTON (spin), adjustment,
- ranges [i].step_size, 0);
- peditor = gconf_peditor_new_numeric_range (changeset,
- (gchar *)ranges [i].gconf_key, slide,
- NULL);
- }
-}
-
-static void
-setup_images (GladeXML *dialog)
-{
- int i = G_N_ELEMENTS (features);
- while (i-- > 0)
- if (features [i].image != NULL)
- gtk_image_set_from_stock (GTK_IMAGE (WID (features [i].image)),
- features [i].image_file,
- keyboard_capplet_icon_get_size ());
-}
-
-static void
-cb_launch_mouse_capplet (GtkButton *button, GtkWidget *dialog)
-{
- GError *err = NULL;
- if (!g_spawn_command_line_async ("gnome-mouse-properties", &err))
- capplet_error_dialog (GTK_WINDOW (gtk_widget_get_toplevel (dialog)),
- _("There was an error launching the mouse preferences dialog: %s"),
- err);
-}
-
-static void
-cb_master_enable_toggle (GtkToggleButton *btn, GladeXML *dialog)
-{
- int i = G_N_ELEMENTS (features);
- gboolean flag = gtk_toggle_button_get_active (btn);
- GtkWidget *w;
-
- while (i-- > 0) {
- if (!features [i].always_enabled) {
- w = WID (features [i].checkbox);
- gtk_widget_set_sensitive (w, flag);
- cb_feature_toggled (GTK_TOGGLE_BUTTON (w), GINT_TO_POINTER (i));
- }
- }
-}
-
-static void
-setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GtkWidget *master_enable = WID ("master_enable");
-
- capplet_init_stock_icons ();
- setup_images (dialog);
- setup_ranges (dialog, changeset);
- setup_toggles (dialog, changeset);
- setup_simple_toggles (dialog, changeset);
-
- g_signal_connect (master_enable,
- "toggled",
- G_CALLBACK (cb_master_enable_toggle), dialog);
- gconf_peditor_new_boolean (changeset,
- CONFIG_ROOT "/enable",
- GTK_WIDGET (master_enable), NULL);
-}
-
-/*******************************************************************************/
-
-static gboolean
-xrm_get_bool (GConfClient *client, XrmDatabase *db, char const *gconf_key,
- char const *res_str, char const *class_str)
-{
- XrmValue resourceValue;
- char *res;
-
- if (!XrmGetResource (*db, res_str, class_str, &res, &resourceValue))
- return FALSE;
- gconf_client_set_bool (client, gconf_key,
- !g_ascii_strcasecmp (resourceValue.addr, "True"), NULL);
-
- return TRUE;
-}
-
-static gboolean
-xrm_get_int (GConfClient *client, XrmDatabase *db, char const *gconf_key,
- char const *res_str, char const *class_str, float scale)
-{
- XrmValue resourceValue;
- char *res;
- int value, log_scale;
- char resource [256];
-
- snprintf (resource, sizeof (resource), "%s.value", res_str);
- if (!XrmGetResource (*db, resource, class_str, &res, &resourceValue))
- return FALSE;
- value = atoi (resourceValue.addr);
-
- snprintf (resource, sizeof (resource), "%s.decimalPoints", res_str);
- if (!XrmGetResource (*db, resource, class_str, &res, &resourceValue))
- return FALSE;
- log_scale = atoi (resourceValue.addr);
-
- while (log_scale-- > 0)
- scale /= 10.;
-
- gconf_client_set_int (client, gconf_key, value, NULL);
-
- return TRUE;
-}
-
-/* This loads the current users XKB settings from their file */
-static gboolean
-load_CDE_file (GtkFileChooser *fchooser)
-{
- char *file = gtk_file_chooser_get_filename (fchooser);
- GConfClient *client;
- XrmDatabase db;
- gboolean found = FALSE;
-
- if (!(db = XrmGetFileDatabase (file))) {
- GtkWidget *warn = gtk_message_dialog_new (
- gtk_window_get_transient_for (GTK_WINDOW (fchooser)),
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("Unable to import AccessX settings from file '%s'"),
- file);
- g_signal_connect (warn,
- "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_widget_show (warn);
- g_free (file);
- return FALSE;
- }
-
- client = gconf_client_get_default ();
- gconf_client_set_bool (client, CONFIG_ROOT "/enable", TRUE, NULL);
-
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/feature_state_change_beep",
- "*SoundOnOffToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/timeout_enable",
- "*TimeOutToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/stickykeys_enable",
- "*StickyKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/mousekeys_enable",
- "*MouseKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/togglekeys_enable",
- "*ToggleKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/slowkeys_enable",
- "*SlowKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/bouncekeys_enable",
- "*BounceKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/stickykeys_modifier_beep",
- "*StickyModSoundToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/stickykeys_two_key_off",
- "*StickyTwoKeysToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/slowkeys_beep_press",
- "*SlowKeysOnPressToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/slowkeys_beep_accept",
- "*SlowKeysOnAcceptToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/timeout",
- "*TimeOutScale", "AccessX*XmScale", 60);
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/mousekeys_max_speed",
- "*MouseMaxSpeedScale", "AccessX*XmScale", 1);
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/mousekeys_accel_time",
- "*MouseAccelScale", "AccessX*XmScale", 1);
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/mousekeys_init_delay",
- "*MouseDelayScale", "AccessX*XmScale", 1);
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/slowkeys_delay",
- "*KRGSlowKeysDelayScale", "AccessX*XmScale", 1000);
- found |= xrm_get_int (client, &db, CONFIG_ROOT "/bouncekeys_delay",
- "*KRGDebounceScale", "AccessX*XmScale", 1000);
-
- /* Set the master enable flag last */
- found |= xrm_get_bool (client, &db, CONFIG_ROOT "/enable",
- "*EnableAccessXToggle.set", "AccessX*ToggleButtonGadget.XmCSet");
-
- g_object_unref (client);
-
- if (!found) {
- /* it would be nice to have a better message bu that would
- * break string freeze
- */
- GtkWidget *warn = gtk_message_dialog_new (
- gtk_window_get_transient_for (GTK_WINDOW (fchooser)),
- GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("Unable to import AccessX settings from file '%s'"),
- file);
- g_signal_connect (warn,
- "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_widget_show (warn);
- g_free (file);
- return FALSE;
- }
- g_free(file);
- return TRUE;
-}
-
-static void
-fchooser_handle_response (GtkFileChooser *fchooser, gint response, gpointer data)
-{
- char *file_name;
-
- if (response == GTK_RESPONSE_OK) {
- file_name = gtk_file_chooser_get_filename (fchooser);
-
- /* Change into directory if that's what user selected */
- if (g_file_test (file_name, G_FILE_TEST_IS_DIR))
- gtk_file_chooser_set_current_folder (fchooser, file_name);
- else if (load_CDE_file (fchooser))
- gtk_widget_destroy (GTK_WIDGET (fchooser));
-
- g_free (file_name);
- } else {
- gtk_widget_destroy (GTK_WIDGET (fchooser));
- }
-}
-
-static void
-cb_load_CDE_file (GtkButton *button, GtkWidget *dialog)
-{
- GtkFileChooser *fchooser = GTK_FILE_CHOOSER (
- gtk_file_chooser_dialog_new (_("Import Feature Settings File"),
- GTK_WINDOW (gtk_widget_get_toplevel (dialog)),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- _("_Import"), GTK_RESPONSE_OK,
- NULL));
-
- gtk_window_set_position (GTK_WINDOW (fchooser), GTK_WIN_POS_MOUSE);
- gtk_window_set_modal (GTK_WINDOW (fchooser), TRUE);
- g_signal_connect (G_OBJECT (fchooser),
- "response",
- G_CALLBACK (fchooser_handle_response), NULL);
-
- gtk_widget_show (GTK_WIDGET (fchooser));
-}
-
-/*******************************************************************************/
-
-GtkWidget *
-setup_accessX_dialog (GConfChangeSet *changeset)
-{
- GConfClient *client;
- char const *toplevel_name = "accessX_dialog";
- GladeXML *dialog = glade_xml_new (GNOMECC_DATA_DIR
- "/interfaces/gnome-accessibility-keyboard-properties.glade",
- toplevel_name, NULL);
- GtkWidget *toplevel = WID (toplevel_name);
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, CONFIG_ROOT, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- g_object_unref (client);
-
- setup_dialog (dialog, changeset);
-
- g_signal_connect (G_OBJECT (WID ("load_CDE_file")),
- "clicked",
- G_CALLBACK (cb_load_CDE_file), toplevel);
- g_signal_connect (G_OBJECT (WID ("launch_mouse_capplet")),
- "clicked",
- G_CALLBACK (cb_launch_mouse_capplet), toplevel);
-
- return toplevel;
-}
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard.desktop.in.in b/capplets/accessibility/keyboard/accessibility-keyboard.desktop.in.in
deleted file mode 100644
index 39f7b6136..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Keyboard
-_Comment=Set your keyboard accessibility preferences
-Exec=gnome-accessibility-keyboard-properties
-Icon=gnome-settings-accessibility-keyboard
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;Accessibility;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=Keyboard Accessibility
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard.h b/capplets/accessibility/keyboard/accessibility-keyboard.h
deleted file mode 100644
index f08343c93..000000000
--- a/capplets/accessibility/keyboard/accessibility-keyboard.h
+++ /dev/null
@@ -1,32 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* accessibility-keyboard.c
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by: Jody Goldberg <jody@gnome.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef GNOME_ACCESSIBILITY_KEYBOARD_H
-#define GNOME_ACCESSIBILITY_KEYBOARD_H
-
-#include <gconf/gconf-changeset.h>
-#include <gtk/gtkwidget.h>
-
-GtkWidget *setup_accessX_dialog (GConfChangeSet *changeset);
-
-#endif /* GNOME_ACCESSIBILITY_KEYBOARD_H */
diff --git a/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.c b/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.c
deleted file mode 100644
index 8646e3d69..000000000
--- a/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.c
+++ /dev/null
@@ -1,116 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-accessibility-keyboard-properties.c
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by: Jody Goldberg <jody@gnome.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-
-#include <capplet-util.h>
-#include <activate-settings-daemon.h>
-#include "accessibility-keyboard.h"
-
-#ifdef HAVE_X11_EXTENSIONS_XKB_H
-# include <X11/X.h>
-# include <X11/Xlib.h>
-# include <X11/XKBlib.h>
-# include <X11/extensions/XKBstr.h>
-# include <gdk/gdk.h>
-# include <gdk/gdkx.h>
-
-static void
-xkb_enabled (void)
-{
- gboolean have_xkb = FALSE;
- int opcode, errorBase, major, minor, xkbEventBase;
-
- gdk_error_trap_push ();
- have_xkb = XkbQueryExtension (GDK_DISPLAY (),
- &opcode, &xkbEventBase, &errorBase, &major, &minor)
- && XkbUseExtension (GDK_DISPLAY (), &major, &minor);
- XSync (GDK_DISPLAY (), FALSE);
- gdk_error_trap_pop ();
-
- if (!have_xkb) {
- GtkWidget *warn = gtk_message_dialog_new (NULL, 0,
- GTK_MESSAGE_WARNING, GTK_BUTTONS_CLOSE,
- _("This system does not seem to have the XKB extension. The keyboard accessibility features will not operate without it."));
- gtk_dialog_run (GTK_DIALOG (warn));
- gtk_widget_destroy (warn);
- }
-}
-#endif
-
-static void
-dialog_response (GtkWidget *widget,
- gint response_id,
- GConfChangeSet *changeset)
-{
- switch (response_id) {
- case GTK_RESPONSE_HELP:
- capplet_help (GTK_WINDOW (widget),
- "user-guide.xml",
- "goscustaccess-6");
- break;
- case GTK_RESPONSE_DELETE_EVENT:
- case GTK_RESPONSE_CLOSE:
- gtk_main_quit ();
- break;
- default:
- /* Import CDE AccessX File */
- break;
- }
-}
-
-int
-main (int argc, char **argv)
-{
- GtkWidget *dialog;
- GConfChangeSet *changeset;
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-accessibility-keyboard-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
- activate_settings_daemon ();
-
-#ifdef HAVE_X11_EXTENSIONS_XKB_H
- xkb_enabled ();
-#endif
-
- changeset = NULL;
- dialog = setup_accessX_dialog (changeset);
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK (dialog_response), changeset);
- capplet_set_icon (dialog, "gnome-settings-accessibility-keyboard");
- gtk_widget_show_all (dialog);
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.glade b/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.glade
deleted file mode 100644
index 1ba4ea07e..000000000
--- a/capplets/accessibility/keyboard/gnome-accessibility-keyboard-properties.glade
+++ /dev/null
@@ -1,2114 +0,0 @@
-<?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="accessX_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Keyboard Accessibility Preferences (AccessX)</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">False</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="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="help_button">
- <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="close_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_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">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkCheckButton" id="master_enable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable keyboard accessibility features</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkNotebook" id="notebook1">
- <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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Features&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox22">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label88">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="timeout_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkCheckButton" id="timeout_enable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Disable if unused for:</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox25">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHScale" id="timeout_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="timeout_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="timeout_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 100 1 10 10</property>
- <accessibility>
- <atkrelation target="timeout_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="timeout_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="timeout_spin" type="label-for"/>
- <atkrelation target="timeout_slide" type="label-for"/>
- </accessibility>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="feature_state_change_beep">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Beep when _features turned on or off from keyboard</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkFixed" id="fixed1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="load_CDE_file">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-revert-to-saved</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label35">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Import Feature Settings...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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">True</property>
- </packing>
- </child>
- </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">True</property>
- <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="GtkVBox" id="vbox11">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="stickykeys_enable">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Perform multiple simultaneous key press operations by pressing modifier keys in sequence.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable _Sticky Keys&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="stickeykeys_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="stickykeys_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkVBox" id="vbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="stickykeys_modifier_beep">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Beep when _modifier is pressed</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="stickykeys_two_key_off">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Disa_ble if two keys pressed together</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="repeatkeys_enable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable _Repeat Keys&lt;/b&gt;</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox24">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="repeatkeys_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkTable" id="repeatkeys_table">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label78">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Del_ay:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">repeatkeys_delay_spin</property>
- <accessibility>
- <atkrelation target="repeatkeys_delay_spin" type="label-for"/>
- <atkrelation target="repeatkeys_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label77">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_peed:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">repeatkeys_rate_spin</property>
- <accessibility>
- <atkrelation target="repeatkeys_rate_spin" type="label-for"/>
- <atkrelation target="repeatkeys_rate_slide" type="label-for"/>
- </accessibility>
- </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="GtkLabel" id="label79">
- <property name="visible">True</property>
- <property name="label" translatable="yes">milliseconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="repeatkeys_delay_spin" type="label-for"/>
- <atkrelation target="repeatkeys_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label80">
- <property name="visible">True</property>
- <property name="label" translatable="yes">characters/second</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="repeatkeys_delay_spin" type="label-for"/>
- <atkrelation target="repeatkeys_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="repeatkeys_delay_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 100 1 10 10</property>
- <accessibility>
- <atkrelation target="label78" type="labelled-by"/>
- <atkrelation target="label79" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="repeatkeys_rate_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 100 1 10 10</property>
- <accessibility>
- <atkrelation target="label77" type="labelled-by"/>
- <atkrelation target="label80" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</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>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="repeatkeys_rate_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="label77" type="labelled-by"/>
- <atkrelation target="label80" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="repeatkeys_delay_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="label78" type="labelled-by"/>
- <atkrelation target="label79" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label70">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Type to test settings:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">basic_test_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkEntry" id="basic_test_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label55">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Basic</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>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="slowkeys_enable">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Only accept keys after they have been pressed and held for a user adjustable amount of time.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable Slo_w Keys&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="slowkeys_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="slowkeys_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkVBox" id="vbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="slowkeys_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Only accept keys held for:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">slowkeys_delay_spin</property>
- <accessibility>
- <atkrelation target="slowkeys_delay_spin" type="label-for"/>
- <atkrelation target="slowkeys_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox27">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHScale" id="slowkeys_delay_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="slowkeys_title" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="slowkeys_delay_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">True</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 0 100 1 10 10</property>
- <accessibility>
- <atkrelation target="slowkeys_title" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="slowkeys_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">milliseconds</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">2</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table8">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Beep when key is:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="slowkeys_beep_press">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_pressed</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="slowkeys_beep_accept">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_accepted</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="slowkeys_beep_reject">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_rejected</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</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>
- <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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox16">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="bouncekeys_enable">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Ignore all subsequent presses of the SAME key if they happen within a user selectable period of time.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable Bo_unce Keys&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox28">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="bouncekeys_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkVBox" id="bouncekey_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="bouncekeys_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">I_gnore duplicate keypresses within:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">bouncekeys_delay_spin</property>
- <accessibility>
- <atkrelation target="bouncekeys_delay_spin" type="label-for"/>
- <atkrelation target="bouncekeys_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox29">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHScale" id="bouncekeys_delay_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="bouncekeys_title" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="bouncekeys_delay_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 100 1 10 10</property>
- <accessibility>
- <atkrelation target="bouncekeys_title" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="bouncekeys_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">milliseconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">2</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="bouncekeys_beep_reject">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Beep if key is re_jected</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>
- </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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label37">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Toggle Keys&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox30">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="togglekeys_image">
- <property name="visible">True</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="togglekeys_enable">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Beep when an LED is turned on and two beeps when one is turned off.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">E_nable Toggle Keys</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label71">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Type to test settings:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">filters_test_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkViewport" id="viewport2">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkEntry" id="filters_test_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label54">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Filters</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>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox19">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="mousekeys_enable">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Turn the numeric keypad into a mouse control pad.</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Enable _Mouse Keys&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="mousekeys_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="mousekeys_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkTable" id="table9">
- <property name="visible">True</property>
- <property name="n_rows">6</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="mousekeys_max_speed_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Ma_ximum pointer speed:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">mousekeys_max_speed_spin</property>
- <accessibility>
- <atkrelation target="mousekeys_max_speed_spin" type="label-for"/>
- <atkrelation target="mousekeys_max_speed_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="mousekeys_accel_time_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Time to acce_lerate to maximum speed:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">mousekeys_accel_time_spin</property>
- <accessibility>
- <atkrelation target="mousekeys_accel_time_spin" type="label-for"/>
- <atkrelation target="mousekeys_accel_time_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</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="GtkLabel" id="mousekeys_init_delay_title">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Delay between keypress and pointer mo_vement:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">mousekeys_init_delay_spin</property>
- <accessibility>
- <atkrelation target="mousekeys_init_delay_spin" type="label-for"/>
- <atkrelation target="mousekeys_init_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">3</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="mousekeys_max_speed_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">pixels/second</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">2</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="mousekeys_max_speed_spin" type="label-for"/>
- <atkrelation target="mousekeys_max_speed_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="mousekeys_accel_time_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">milliseconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">2</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="mousekeys_accel_time_spin" type="label-for"/>
- <atkrelation target="mousekeys_accel_time_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="mousekeys_init_delay_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">milliseconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">2</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="mousekeys_init_delay_spin" type="label-for"/>
- <atkrelation target="mousekeys_init_delay_slide" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="mousekeys_max_speed_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">True</property>
- <property name="wrap">False</property>
- <property name="adjustment">100 0 1000 1 10 10</property>
- <accessibility>
- <atkrelation target="mousekeys_max_speed_title" type="labelled-by"/>
- <atkrelation target="mousekeys_max_speed_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="mousekeys_accel_time_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">True</property>
- <property name="wrap">False</property>
- <property name="adjustment">100 0 1000 1 10 10</property>
- <accessibility>
- <atkrelation target="mousekeys_accel_time_title" type="labelled-by"/>
- <atkrelation target="mousekeys_accel_time_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</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>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="mousekeys_init_delay_spin">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">True</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">True</property>
- <property name="wrap">False</property>
- <property name="adjustment">1000 0 1000 10 100 100</property>
- <accessibility>
- <atkrelation target="mousekeys_init_delay_title" type="labelled-by"/>
- <atkrelation target="mousekeys_init_delay_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="mousekeys_max_speed_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="mousekeys_max_speed_title" type="labelled-by"/>
- <atkrelation target="mousekeys_max_speed_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="mousekeys_accel_time_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="mousekeys_accel_time_title" type="labelled-by"/>
- <atkrelation target="mousekeys_accel_time_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="mousekeys_init_delay_slide">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">0 0 0 0 0 0</property>
- <accessibility>
- <atkrelation target="mousekeys_init_delay_title" type="labelled-by"/>
- <atkrelation target="mousekeys_init_delay_label" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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>
-
- <child>
- <widget class="GtkTable" id="table7">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">3</property>
-
- <child>
- <widget class="GtkImage" id="mouse_capplet_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkFixed" id="fixed3">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="launch_mouse_capplet">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox16">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label73">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mouse _Preferences...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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="label60">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mouse Keys</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/background/.cvsignore b/capplets/background/.cvsignore
deleted file mode 100644
index 2c4b4b066..000000000
--- a/capplets/background/.cvsignore
+++ /dev/null
@@ -1,14 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.o
-*.lo
-*.la
-background.desktop
-background.desktop.in
-gnome-background-properties
-gnome-wallpaper-properties
-*.oaf
-*.server
-
diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog
deleted file mode 100644
index c611d863f..000000000
--- a/capplets/background/ChangeLog
+++ /dev/null
@@ -1,1267 +0,0 @@
-2005-02-26 Rodney Dawes <dobey@novell.com>
-
- * *.[ch]: Update Copyright to include current year
-
-2005-02-26 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (gnome_wp_add_image): If the filename is not
- encoded in UTF-8, we just ignore it for now to avoid crashing
-
- * gnome-wp-xml.c (gnome_wp_xml_load_xml): Check to make sure that the
- filename and name tags that we read in, aren't NULL
- If the filename we read in is NULL, free the item, and continue on
-
- Fixes #146130 #146645 (resolving these as dups of #168604 )
- Fixes #159441
-
-2005-02-06 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Force using the gtk+
- backend for the file chooser since we don't support vfs yet
-
- Fixes #154978
-
-2005-02-06 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (gnome_wp_color_changed): Change the API to use
- the boolean argument to specify if we want to update gconf or not
- Always get the colors for both primary and secondary and update the
- thumbnail
- Only set the keys in gconf if we have the update boolean argument
- (gnome_wp_pcolor_changed): Removed this method, since we don't need
- to differentiate between primary/secondary for updating the thumbnail
- (gnome_wp_scolor_changed): When we change the color in the UI, we want
- to update gconf, we use this method for both color picker buttons now
- (gnome_wallpaper_properties_init): Use gnome_wp_scolor_changed for the
- callback on both color picker button widgets now
-
- Fixes #166486
-
-2005-01-10 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-xml.c (gnome_wp_xml_load_xml):
- Fix compile warning for syslangs declaration
- Wrap g_get_language_names in #if GLIB_CHECK_VERSION as it is 2.6 API
-
-2005-01-09 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.[ch] (gnome_wp_update_preview): Add new callback
- routine for when the preview widget in the file chooser needs an update
- (wallpaper_properties_init): Set the preview widget in the file chooser
- to a GtkImage object and connect to the update-preview signal for when
- the selected file changes
- - Based on patch from Sebastien Bacher <seb128@debian.org>
-
- Fixes #139714
-
-2005-01-08 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Preload the directory
- rather than nothing when adding directories for gconf notification
-
-2005-01-08 Rodney Dawes <dobey@novell.com>
-
- * background.desktop.in.in: Add %F to Exec command line
-
- * gnome-wp-capplet.[ch] (gnome_wp_remove_wp): Check that the tree path
- is not NULL before removing items from the list store
- (gnome_wp_load_stuffs): Don't duplicate the code from
- gnome_wp_add_image/gnome_wp_capplet_scroll_to_item here
- Load any images we were passed on the command line, and free the
- GSList that they were stored in after doing so
- (gnome_wp_file_changed): Clean up to just call gnome_wp_add_image and
- gnome_wp_capplet_scroll_to_item rather than duplicating the code
- (wallpaper_properties_init): Take a poptContext argument now
- Parse the poptContext into a GSList for loading the images from
- (main): Use a clearer variable name for the GnomeProgram object
- Get the poptContext from the GnomeProgram object and pass it through
- to wallpaper_properties_init
-
- Fixes #120720
-
-2005-01-08 Thomas Wood <thos@gnome.org>
-
- * gnome-wp-xml.c (gnome_wp_xml_load_xml): Load translated XML
- description elements if available
-
- Fixes #160700
-
-2005-01-08 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Fix the leaks
- in the scaling type option menu creation correctly
-
-2005-01-02 Thomas Cataldo <thomas.cataldo@aliacom.fr>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): plug icon
- filename leak.
-
-2004-12-11 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_update_description):
- Fix the ngettext calling bit to actually work, and move the %d into
- the format string for g_strdup_print, so we don't say "%d pixels"
-
-2004-12-10 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_update_description):
- Change the description to use "W pixels x H pixels" and ngettext for
- each individual part, instead of just "W x H pixels" (#151425)
-
- * gnome-wp-xml.c (gnome_wp_xml_load_xml): Don't duplicate check to
- make sure that the root element is not NULL
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * background.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-10-14 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_update_description):
- Use g_markup_printf_escaped () to fill in the description
-
- Fixes #155184
-
-2004-09-29 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_new): Unescape the filename so that
- we can laod the thumbnail and set the gconf key properly
-
- Fixes #154003
-
-2004-09-22 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_free):
- Check that the colors aren't NULL before calling gdk_color_free
-
- * gnome-wp-xml.c (gnome_wp_xml_load_xml):
- Check that the item isn't already listed, before we try to add
- the wallpaper to the list
- (gnome_wp_xml_load_list): Load XML files from the correct directory
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-wp-capplet.c: (gnome_wp_icon_theme_changed),
- (wallpaper_properties_init):
- Use themed icon for window hint.
-
-2004-08-16 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_clicked):
- Handle the GTK_RESPONSE_DELETE_EVENT case as well
-
- Fixes #150273
-
-2004-08-15 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_update_description):
- Add "W x H pixels" to description, and remove file size
- Mark the description string for translation as well
-
-2004-07-19 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-capplet.c (gnome_wp_remove_wallpaper, gnome_wp_list_sort):
- Free what we get with gtk_tree_model_get
-
- Fixes #147403
-
-2004-07-15 Rodney Dawes <dobey@novell.com>
-
- * gnome-wp-item.c (gnome_wp_item_new):
- Check that item->fileinfo is not NULL, before trying to use a
- string variable inside the struct for a strncmp
-
- Fixes #147373
-
-2004-06-28 Rodney Dawes <dobey@novell.com>
-
- * *.[ch]: Update copyright info to have correct years (2003-2004)
-
- * gnome-wp-capplet.c (gnome_wp_capplet_scroll_to_item):
- Abstract this code out so that we don't have to duplicated it every
- time we want to scroll to a particular item in the list
-
- (gnome_wp_add_image): Update this to return the new item that we
- created, and don't scroll to or set as the wallpaper, every time we
- call this function
- Use the new gnome_wp_item_new () call to create items
-
- (gnome_wp_add_images): Change the API to not use the files argument
- any longer, as we don't need it without the GTK+ 2.2 compat code
- Add all the items to the list and select the last one when finished
-
- (gnome_wp_file_open_dialog): Update to not pass in the files argument
- to gnome_wp_add_images () and free the GSList of filenames
-
- (bg_add_multiple_files): merge this code into the normal callback for
- when images are dragged to the dialog
-
- (bg_properties_dragged_image): Don't check if the list is more than
- 1 or not here, and always call gnome_wp_add_images () with the full
- list that we are given
- Convert the GList of GnomeVFSURIs that we get from gnome-vfs to a
- GSList of char * uris to pass into gnome_wp_add_images ()
-
- (gnome_wp_load_stuffs, gnome_wp_file_changed):
- Use the new gnome_wp_capplet_scroll_to_item () and gnome_wp_item_new ()
- API calls instead of duplicating code
-
- * gnome-wp-capplet.h: Remove the GConf key path defines from here
-
- * gnome-wp-item.[ch]: Add the gnome_wp_item_new () call to create the
- GnomeWPItem structure for storing wallpapers in
-
- * gnome-wp-utils.h: Put the GConf key path defines in here
-
- * gnome-wp-xml.c (gnome_wp_load_legacy): Use the gnome_wp_item_new ()
- call to create items from the old legacy (XD2 capplet) list file
-
-2004-05-14 Muktha Narayan <muktha.narayan@wipro.com>
-
- * gnome-wp-capplet.c (set_accessible_name): New
- (wallpaper_properties_init): Add accessible names.
-
- Fixes #142517
-
-2004-04-27 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (gnome_wp_file_open_dialog):
- (wallpaper_properties_init): Remove the #if checks for GTK+ 2.3.0 and
- get rid of the compatibility code for building against 2.2
-
-2004-04-24 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Use the more correct
- "Add Wallpaper" term for the file chooser window title
-
- Fixes #135084
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-10 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (gnome_wp_list_sort): Use g_utf8_collate to sort
- the descriptions, rather than a strcmp, so that we follow the locale
- settings for LC_COLLATE
-
- Fixes #139517
-
-2004-04-08 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Rever the previous
- patch to Fix #135084 as it breaks string freeze
-
-2004-04-05 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (wallpaper_properties_init): Change file chooser
- dialog title to say "Add Wallpaper" instead of "Add Wallpapers"
-
- Fixes #135084
-
-2004-04-05 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (gnome_wp_scale_type_changed): Regenerate the
- thumbnail in the list when we change scaling type now
- (wallpaper_properties_init): Add GtkFileFilter support (needs love)
- TreeView is buggy, so we need to not set the vertical-separator
- style property for it
- * gnome-wp-item.c: Include <config.h> and <gnome.h> here
- (collect_save_options): Add a function to set all of the pixbuf options
- for the thumbnail pixbuf properly, so we can save them back out
- (gnome_wp_item_get_thumbnail): Fix up the code to
- generate the thumbnails for the list a bit, so that we have sexy
- thumbnails that look exactly like how the image would, on-screen
- Initialize all of the width/height variables to 0
- Add a new pixbuf variable for loading the original image to get the
- dimensions of it, so we can do thumbnailing more properly
- Use a LIST_IMAGE_WIDTH define, for the width of the images in the list
- Just return the bgpixbuf if we are creating the "No Wallpaper" thumb
- Save the thumbnail back out with the dimensions for the original image
- If our image is smaller than the list thumbnail, then just use 1.0 as
- the ratio for scaling the image for tiling/etc...
- Use the new API to do scaling inside the center/tile functions
- Reload the thumbnail pixbuf after generating it with the thumbnail
- system, so that we get all of the pixbuf options set correctly
- * gnome-wp-item.h (GnomeWPItem): store the original image's width
- and height in the item, so we can avoid reopening the original image
- every time we generate the thumbnail, on systems where the thumbnail
- doesn't contain the appropriate information
- * gnome-wp-utils.c (gnome_wp_pixbuf_tile):
- (gnome_wp_pixbuf_center): Add API to do the scaling inside these calls
-
- Fixes #136691
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-03-04 Rodney Dawes <dobey@ximian.com>
-
- * background-properties-capplet.c:
- * background-properties.glade:
- * background-properties.glade1:
- * background-properties.xml: Removed these old files from the old
- background capplet
-
-2004-03-04 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (gnome_wp_add_image): Select the added image, and
- change the scaling type to "wallpaper" if it is "none" (#136228)
-
- Fixes #136228
-
-2004-02-29 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c (gnome_wp_add_image): Split out real image adding
- code into a separate call
- (gnome_wp_add_images):
- (gnome_wp_file_open_dialog):
- (gnome_wp_properties_init): Add support for GtkFileChooser (#135317)
- (bg_properties_dragged_image): Fix re-addition of deleted images
- * gnome-wp-capplet.h: Store the filesel widget in GnomeWPCapplet
- * gnome-wp-item.c: Fix warning about gnome_vfs_mime_get_description
-
- Fixes #135317
-
-2004-02-24 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-info.c (gnome_wp_info_new):
- * gnome-wp-item.c (gnome_wp_item_get_thumbnail): Escape the path for
- thumbnails and fileinfo (#135089)
-
- Fixes #135089
-
-2004-02-24 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-xml.c (gnome_wp_oad_legacy): Check that the file exists,
- and continue through the loop if it doesn't (#135251)
-
- Fixes #135251
-
-2004-02-24 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-item.c (gnome_wp_item_get_thumbnail): Add some explanatory
- comments to bits of the code
- Fix the ratio calculation to handle images of all sizes (#134541)
- Don't force tiling of square images
- Don't do _save_thumbnail () for the custom thumbnails
- If pixbuf is NULL, copy away bgpixbuf and return that instead
- * gnome-wp-utils.c (gnome_wp_tile_pixbuf):
- (gnome_wp_center_pixbuf): Return copied pixbufs
-
- Fixes #134541
-
-2004-02-17 Rodney Dawes <dobey@ximian.com>
-
- * gnome-background-properties.glade: Use untranslated strings for
- the color picker dialog titles (glade bug set them to the translated
- versions of the strings)
-
- Fixes #134171
-
-2003-12-07 Jan Arne Petersen <jpetersen@uni-bonn.de>
-
- * background-properties-capplet.c: remove unused
- "preview_file_selection.h" include.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * background-properties-capplet.c: (cb_dialog_response):
- * gnome-wp-capplet.c: (wallpaper_properties_clicked): Update help
- links to point to user-guide.xml
-
-2004-02-04 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am:
- * gnome-background-properties.glade:
- * gnome-wp-capplet.[ch]: Convert the main dialog UI to glade
-
-2004-02-04 Rodney Dawes <dobey@ximian.com>
-
- * background.desktop.in: Use "Desktop Background" as name and change
- the Comment line to a verb phrase as per the HIG
- * gnome-wp-capplet.c (gnome_wp_load_stuffs): Fix a little bug so that
- opening the capplet with "No Wallpaper" set, actually works
- (wallpaper_properties_init): "Desktop Background Preferences"
-
-2004-02-01 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Switch the binary name to gnome-background-properties,
- Based on patch from Seth Nickell
- * background.desktop.in: Use gnome-background-properties here also,
- based on patch from Seth Nickell
- * gnome-wp-capplet.c: Fix a bug where you can't re-add a wallpaper
- after you remove it
- Use the new gnome_wp_item_update_description () call
- Use a GConfChangeSet to change the gconf keys, based on a patch
- from Seth Nickell
- Select the first item in the list ("No Wallpaper") when the wallpaper
- is removed, based on a patch from Seth Nickell
- Do the rc string parsing before creating the window, and change some
- defaults so we can fix the spacing between widgets and the border
- Fix spacing between widgets and window border
- * gnome-wp-item.[ch]: Add update_description function to clean up
- code, based on patch from Seth Nickell
- Fix a crash when trying to thumbnail very wide images that are very
- short, while trying to maintain aspect ratio
- * gnome-wp-xml.c: Use backgrounds.xml instead of wp-list.xml, and
- migrate the old wp-list.xml over if backgrounds.xml doesn't exist
- yet, based on patch from Seth Nickell
-
-2004-01-18 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-capplet.c: Enable the Help button (#131286)
-
-2004-01-16 Christophe Merlet <redfox@redfoxcenter.org>
-
- * Makefile.am: add DESTDIR variable in install-data-local section.
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2004-01-12 Rodney Dawes <dobey@ximian.com>
-
- * gnome-wp-xml.c (gnome_wp_load_legacy): Fix previous change to
- use gnome_wp_item_free () instead of g_free (), and fix tab width
-
-2004-01-12 Diego Gonzalez <diego@pemas.net>
-
- * gnome-wp-xml.c (gnome_wp_load_legacy): don't crash if we could
- not get the file information.
-
-2004-01-12 Jody Goldberg <jody@gnome.org>
-
- * Makefile.am : As long as we're hard coding the path hard code it in
- only one place. Passing in datadir then adding the magic subdir in
- C then building in Makefile seems unnecessary.
- Use GNOMECC_CAPPLETS_*
-
-2004-01-12 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Add install hook to create data directory
-
-2004-01-12 Rodney Dawes <dobey@ximian.com>
-
- * Makefile.am: Update for new capplet
- * background.desktop.in: Update Name/Comment/Exec entries
- * gnome-wp-capplet.[ch]:
- * gnome-wp-info.[ch]:
- * gnome-wp-item.[ch]:
- * gnome-wp-utils.[ch]:
- * gnome-wp-xml.[ch]: Add new capplet code to CVS
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-Fri Nov 21 09:42:19 2003 Jonathan Blandford <jrb@gnome.org>
-
- * background-properties.glade: Remove translatable radiobutton
- strings, #119288
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * background-properties-capplet.c, background-properties.glade:
- Patch to fix spacing between action area and vbox of preferences
- dialog.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * background-properties.glade,
- background-properties-capplet.c: Fixes for ui-review
- bug report #98916 and duplicate mnemonic fixes.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-13 Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
-
- * background-properties-capplet.c (drag_data_received_cb):
- Reset Picture option to "Wall paper" only in the case of
- "none" while DnD. Fixes #94329
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * background.desktop.in: Fix the desktop file so that it
- validates.
-
-2002-07-12 Jody Goldberg <jody@gnome.org>
-
- * background-properties.glade : The last of the ui-review.
-
-2002-07-02 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=84014
- * background-properties-capplet.c (drag_data_received_cb) : unescape
- the path.
-
-2002-06-27 Jody Goldberg <jody@gnome.org>
-
- * background-properties-capplet.c (main) : use capplet_set_icon.
-
-2002-06-18 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=85628
- * background-properties-capplet.c (main) : The dialog
- - should not be modal
- - has no parent to destroy with
- - and should have a seperator
- - set default response
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-06-05 Gediminas Paulauskas <menesis@delfi.lt>
-
- * background-properties.glade: radiobutton1 and similar things should
- not be translatable.
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * background-properties-capplet.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * background-properties-capplet.c (cb_dialog_response) : improve
- handling of help failures.
-
-Sun May 26 11:29:14 2002 Jonathan Blandford <jrb@gnome.org>
-
- * background-properties-capplet.c (main): use APPID instead of
- argv[0]
-
-Thu May 16 02:25:03 2002 Jonathan Blandford <jrb@gnome.org>
-
- * background-properties-capplet.c (drag_data_received_cb): accept
- drops from the nautilus patterns pallet. There's something broken
- here, though.
-
-2002-05-10 Jody Goldberg <jody@gnome.org>
-
- * background-properties.glade : merge in the missing atk patch.
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * background-properties-capplet.c (main) : add a help button.
-
-2002-05-02 Dennis Cranston <dennis_cranston@yahoo.com>
-
- * background-properties.glade: add a stock information image
- to the "You can drag image files..." text.
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * background-properties-capplet.c (cb_dialog_response) : new.
- (main) : support help.
-
-2002-04-27 Seth Nickell <snickell@stanford.edu>
-
- * background.desktop.in:
-
- Improve the comment.
-
-2002-04-21 Rachel Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Update for
- new enum peditor prototypes.
-
-Wed Apr 10 18:06:35 2002 Jonathan Blandford <jrb@gnome.org>
-
- * background.desktop.in (Exec): s/gnome2/gnome
-
-Mon Apr 1 19:19:39 2002 Jonathan Blandford <jrb@redhat.com>
-
- * background-properties-capplet.c (dialog_button_clicked_cb):
- handle GTK_RESPONSE_DELETE_EVENT
-
- * Makefile.am (bin_PROGRAMS):
- s/gnome2-background-properties/gnome-background-properties
-
-
-2002-03-28 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c (create_dialog),
- background-properties.glade: Add mnemonics.
- (main): Set title to "Background Preferences".
-
-2002-03-21 Seth Nickell <snickell@stanford.edu>
-
- * background-properties-capplet.c: (main):
-
- Set the window icon.
-
-2002-03-21 Seth Nickell <snickell@stanford.edu>
-
- * background-properties-capplet.c: (string_to_orientation),
- (update_color_widget_labels_and_visibility),
- (peditor_value_changed), (setup_dialog), (create_dialog):
- * background-properties.glade:
-
- Recapture some of the more subtle interactions of "Seth's UI".
- Change colour labels when the gradient orientation changes,
- and use mnemonics so the capplet is accessible. Pad and space
- as designed.
-
- There are still at least two things wrong:
-
- 1) Havoc & Jonathan convinced me that the large button with
- label was wrong. This should instead look like:
- http://beauty.stanford.edu/bg_button.png
- The new format should be right for all image selectors, the
- old mechanism had serious usability problems.
- 2) "No Picture" should be the first toggle
-
-2002-03-19 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c:
- (everywhere): Use an ApplierSet instead of passing around
- BGPreferences.
- (real_realize_cb): Call applier_set_redraw.
- (peditor_value_changed): Merge entry in set->prefs,
- and call applier_set_redraw if realized. Also, hide the second
- color option if shading type is solid.
- (setup_dialog): Set data for the second color selector.
- Also, update peditors for new UI.
- (create_dialog): Add previews and labels to radio buttons.
- (main): Create applier set. Also, connect to DnD signals.
-
- * background-properties.glade: Implement seth's new UI.
-
-2002-03-14 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Use new enum
- peditors, and convert to using the #defined gconf keys from
- preferences.h.
-
-2002-03-09 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Hook up
- the previewing file selector to the FileEntry.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * background-properties-capplet.c (main): s/PACKAGE/GETTEXT_PACKAGE/g
- * main.c: Same here.
-
-2002-02-17 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (main)
- (dialog_button_clicked_cb): Switch to instant apply; remove apply
- button
-
-2002-02-12 Lauris Kaplinski <lauris@ximian.com>
-
- * background-properties-capplet.c (dialog_button_clicked_cb): Use
- GtkDialog instead of GnomeDialog
-
-2002-02-06 Seth Nickell <snickell@stanford.edu>
-
- * background-properties-capplet.c: (drag_motion_cb),
- (drag_leave_cb), (drag_data_received_cb),
- (change_background_type_toggles), (set_background_picture),
- (quit_cb), (main):
- * background-properties.glade:
- * background-properties.glade1:
-
- More fixes. Change layout in glade a bit, make DND work,
- fix widget previews.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * background-properties-capplet.c (setup_color_widgets): Kill warning
- (set_background_image_preview): Use g_file_test, use g_object_unref
- instead of gdk_pixbuf_unref
- (image_filename_clicked): Use g_signal_connect
- (dialog_button_clicked_cb): Use GtkDialog instead of GnomeDialog
- (realize_2_cb): Comment out to kill warning
- (realize_cb): Ditto
- (real_realize_cb): Ditto
- (string_to_background_type): Treat NULL string as default
- (string_to_orientation): Ditto
-
-2002-01-13 Seth Nickell <snickell@stanford.edu>
-
- reviewed by: <delete if not using a buddy>
-
- * .cvsignore:
- * Makefile.am:
- * background-properties-capplet.c: (set_picture_is_present),
- (string_to_background_type), (background_type_to_string),
- (orientation_to_string), (string_to_orientation),
- (peditor_string_to_orientation), (peditor_orientation_to_string),
- (update_preview_widgets), (get_legacy_settings),
- (setup_color_widgets), (peditor_value_changed),
- (set_background_image_preview), (file_selector_cb),
- (image_filename_clicked), (background_type_toggled),
- (change_background_type_toggles), (background_type_changed),
- (create_dialog), (idle_draw), (dialog_button_clicked_cb), (main):
- * background-properties.glade:
- * background-properties.glade1:
- * background-properties.xml:
-
-2002-01-28 Richard Hestilow <hestilow@ximian.com>
-
- * Link to libbackground.la.
-
-2002-01-17 Jakub Steiner <jimmac@ximian.com>
-
- * background-capplet.png: minor tweaks
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (bin_PROGRAMS): Rename binary gnome2-background-properties
-
-2002-01-02 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (main): Removed call to set up
- session management - obsolete
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c: Update
- (main): Use a GtkDialog rather than a GnomeDialog
- (main): Don't put weak ref on gtk_main_quit
- (dialog_button_clicked_cb): Update
- Eliminate compiler warnings
-
- * Makefile.am: Update
-
- * background.desktop.in.in (Exec): Update
-
- * background-properties-capplet.c (dialog_button_clicked_cb):
- Remove call to apply_settings
- (apply_settings): Remove
- (main): Remove apply_only support
-
-2001-12-19 Seth Nickell <snickell@stanford.edu>
-
- * background.desktop.in.in:
-
- Add Categories field so it goes into the right location
- in the panel menus.
-
-2001-12-18 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c: Use gconf_client rather than
- gconf_engine
- (setup_dialog): Use correct path for enabled
- (main): Preload the background settings directory for performance
- Don't #include bonobo.h
-
- * background.schema: Update keys to use /desktop/gnome/background
-
- * background-properties-capplet.c (property_change_cb): Remove
- (create_dialog): Return GladeXML, not GtkWidget
- (setup_dialog): Put GladeXML in the signature rather than
- GtkWidget
- (peditor_value_changed): Retrieve color_frame directory rather
- than through Glade
- (real_realize_cb): Ditto
- (setup_dialog): Set color-frame rather than glade-data
- (main): Construct the preview applier here rather than in
- create_dialog
- (main): Unref the applier object when the dialog is destroyed
- (setup_dialog, create_dialog): Put the applier in the signature
- Use weak_ref rather than the destroy signal for all relevant
- objects
- Update GConf keys to use /desktop/gnome/background
-
-2001-12-17 Bradford Hovinen <hovinen@ximian.com>
-
- * background.desktop.in.in (Exec): Update
-
- * background-properties-capplet.c (setup_dialog): Don't hide
- opacity controls
- (dialog_button_clicked_cb): Apply settings after commiting the
- change set
- (peditor_value_changed): Implement
- (setup_dialog): Connect value-changed signals
- (setup_dialog): Store the applier in the preferences object
- (peditor_value_changed): Retrieve the applier from the preferences
- object and use it to apply settings on the preview widget
- (setup_dialog): Connect missing signal
- (setup_dialog): Enabled set_guard call
- (peditor_value_changed): Set the sensitivity of the color frame
- depending on the settings
- (peditor_value_changed): Use correct keys
-
- * background.schema: Added wallpaper-enabled
-
- * background-properties-capplet.c (create_dialog): Use
- prefs_widget rather than preview placeholder widget
-
-2001-12-07 Bradford Hovinen <hovinen@ximian.com>
-
- * background.schema: Fix default values
-
- * background-properties-capplet.c (main): Connect the destroy
- signal
-
- * background.schema: Fix type on opacity schema
-
- * background-properties-capplet.c (main): Remove use of
- capplet_init, instead do the initialization ourselves (note: this
- means we are no longer a Bonobo control)
- (dialog_button_clicked_cb): Implement
- (main): Show the dialog when we are done constructing it
- (main): NULL-terminate the dialog construction parameters
-
-2001-10-19 Jakub Steiner <jimmac@ximian.com>
-
- * background-capplet.png: more clear brush
-
-2001-10-12 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am ($(oaffile)): Make creation of the .oaf file generic
-
- * applier.c (render_to_screen): Use standard gdk and gdk_pixbuf
- rather than xlib and gdk_pixbuf_xlib
- (make_root_pixmap): Create a GdkPixmap
- (set_root_pixmap): Accept GdkPixmap and convert to X id
-
-2001-09-28 Bradford Hovinen <hovinen@ximian.com>
-
- * preferences.c (preferences_load_from_bonobo_db):
- (preferences_load_from_bonobo_pbag): Use BONOBO_RET_EX rather than
- RETURN_IF_EX; remove the definition of the latter macro
-
- * applier.c (fill_gradient): Copied from control center 1.4.0
- (render_background): Create the pixbuf first and then pass to
- fill_gradient
- (render_to_screen): Use XLIB_RGB_DITHER_MAX rather than
- GDK_RGB_DITHER_NORMAL
-
- * Makefile.am: Change the binary name to
- background-properties-control and create a wrapper script from
- ../common/wrapper-script.in to be named
- background-properties-capplet
- Remove support for disabling bonobo-conf build
-
-2001-09-22 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c (run_render_pipeline): Create the root pixmap after we
- know about the gradient geometry
- (place_pixbuf):
- (tile_pixbuf): Fix calls to gdk_pixbuf_composite[_color]
- (render_wallpaper): Fix setting of pixbuf_xlate
- (render_background): Fix pixbuf_render_geom here in case the
- gradient geometry is small
-
-2001-09-21 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c: Total reorganization
-
-2001-09-17 Bradford Hovinen <hovinen@ximian.com>
-
- * preferences.c (preferences_save): Move from
- applier.c:output_compat_prefs; it really belongs here
- (preferences_class_init): Don't construct an applier here
-
- * background-properties-capplet.c (setup_dialog): Create a new
- applier for every dialog
- (create_dialog): Create applier locally, just for this one widget
- (apply_settings): Create applier locally and destroy on exit
- (main): Remove call to gnome_window_set_...
-
-2001-09-14 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (property_change_cb): Use
- applier_render_color_p
- (real_realize_cb): Ditto
- (get_legacy_settings): Set the wallpaper_enabled flag based on the
- value of wallpaper_filename; use (none) as the default for
- wallpaper_filename
- (setup_dialog): Removed unused variable
-
- * applier.c (applier_render_color_p): Renamed from
- applier_render_gradient_p; check both solid color and gradient
-
- * preferences.c (preferences_need_color_opts): Removed; use
- applier_render_color_p instead
-
-2001-09-13 Bradford Hovinen <hovinen@ximian.com>
-
- * preferences.c (preferences_load_from_bonobo_db):
- (preferences_load_from_bonobo_pbag): Default to TRUE on enabled;
- check value of wallpaper_filename to set wallpaper_enabled if
- wallpaper_enabled could not be found
-
- * background-properties-capplet.c (setup_dialog):
- (apply_settings): Check for error condition after creating
- preferences object
-
- * preferences.c (preferences_destroy): Make this static
- (read_color_from_string): Made argument const
- (bonobo_color_to_gdk): Made argument const
- (DB_GET_VALUE): Removed
- (PB_GET_VALUE): Removed
- (preferences_load_from_bonobo_pbag): Use
- local_bonobo_property_bag_client_get_value_{color|filename}
- (preferences_new_from_bonobo_db):
- (preferences_new_from_bonobo_pbag): Deallocate object and return
- NULL if there was an error
- (local_bonobo_property_bag_client_get_value_color):
- (local_bonobo_property_bag_client_get_value_filename): Implement
- (MAKE_GET_SIMPLE): Implement (copy from bonobo-conf)
- (preferences_load_from_bonobo_pbag): Read enabled property
- (preferences_load_from_bonobo_pbag): Forgive wallpaper_enabled and
- enabled not being found
-
- * applier.c (applier_render_gradient_p): Implement
- (applier_destroy): Make this static
-
- * preferences.c (preferences_load_from_bonobo_db): Use
- bonobo_config_get_boolean rather than BONOBO_ARG_GET_BOOLEAN
- (DB_GET_VALUE ()). Ditto bonobo_config_get_long
- (preferences_load_from_bonobo_db): Pass ev pointer to each call to
- bonobo_config_get_*
- (preferences_load_from_bonobo_db): Check ev pointer after each
- call to bonobo_config_get_* and return if an exception is set
- (preferences_load_from_bonobo_db): Allow the enabled flag not to
- be present in the database since some older configurations don't
- have it included
- (all): Remove support for compiling without bonobo-conf
-
-2001-09-07 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties.glade: Redid UI a bit to add new enabled
- checkbox.
-
- * background-properties.xml: Add default for "wallpaper_enabled".
-
- * preferences.[ch]: New function preferences_need_color_opts.
- (preferences_load_from_bonobo_db): Load wallpaper_enabled from
- bonobo-conf.
- (preferences_load_from_bonobo_pbag): Ditto.
-
- * applier.[ch]: New function applier_get_wallpaper_pixbuf
- (needed by preferences_need_color_opts, else pixbuf gets created
- twice).
-
- * background-properties-capplet.c (real_realize_cb): Set
- color frame sensitivity based on preferences_need_color_opts.
- (property_change_cb): Ditto.
- (setup_dialog): Add peditor/guard for wallpaper_enabled. Also,
- set glade object data on the preferences structure as well.
-
-2001-09-03 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Apply
- preferences now if the preview widget is already realized
-
-2001-08-28 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (get_legacy_settings): Retrieve
- the correct value for wallpaper_types
-
- * applier.c (output_compat_prefs): Output the correct value for
- wallpaperAlign
-
- * preferences.c (preferences_load_from_bonobo_pbag): Don't adjust
- the opacity if the opacity setting is invalid
- (preferences_load_from_bonobo_db): Ditto
-
-2001-08-27 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Initialize/free
- the CORBA environment structure
- (real_realize_cb): Put into an idle handler, called by
- realize_2_cb, the new timeout handler
-
- * preferences.c (preferences_load_from_bonobo_pbag):
- (preferences_load_from_bonobo_db): Extract from preferences_new_*
-
- * background-properties-capplet.c (property_change_cb):
- (realize_cb): Accept prefs structure in lieu of
- Bonobo_PropertyBag; don't reload the preferences structure from
- the property bag
- (property_change_cb): Call preferences_apply_event to modify the
- preferences structure appropriately
- (property_change_cb):
- (realize_cb): If the preferences structure is marked destroyed,
- just return
- (setup_dialog): Create a preferences structure from the property
- bag given and use that as the extra data passed to callbacks
- (realize_cb): Put into an idle handler real_realize_cb
-
- * preferences.c (preferences_apply_event): Implement
-
- * applier.c (output_compat_prefs): Make prefs const
-
- * applier.[ch]: Have applier_apply_prefs take a const Preferences
- structure
-
- * preferences.[ch]: Make preferences_clone take a const
- Preferences structure
-
-2001-08-26 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c (renderer_render_background): Remove debugging message
- (renderer_render_wallpaper): Ditto
-
-2001-08-17 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c (renderer_render_wallpaper): Adjust opacity value to
- 0...255 scale
-
- * preferences.c (preferences_new_from_bonobo_pbag):
- (preferences_new_from_bonobo_db): Use correct check to disable
- opacity
-
-2001-08-13 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties-capplet.c (setup_dialog): Really
- override enabled this time. Really.
-
-2001-08-13 Richard Hestilow <hestilow@ximian.com>
-
- * applier.c (applier_apply_prefs): Only draw disabled message
- if do_preview. Actually, the user will never see this because
- the correct behavior (which is done) is to assume if they're
- running capplet, prefs->enable should be TRUE. This is because
- we are only honoring enable as a hacker-only setting.
- (output_compat_prefs): Output the correct "Enable" setting.
-
- * background-properties-capplet.c (get_legacy_settings): Support
- the "Enabled" flag.
-
- * preferences.c (preferences_new_from_bonobo_db): Import the
- "enabled" flag. Note that this is not bothered with in the _pbag
- function, because that's from the Proxy settings, which is only
- used for the GUI capplet, which always sets enabled to True, because
- this is a hacker-only option. Got it?
-
- * background-properties.xml: Add "enabled".
-
-2001-07-31 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): add DISTDIR to install-data-local
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties-capplet.c (get_legacy_settings): Fix
- val_ulong in the gradient case
-
- * RELEASE : 1.5.2
-
-2001-07-26 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c (applier_apply_prefs): Don't try to load the wallpaper
- if it's not enabled
-
- * preferences.c (preferences_new_from_bonobo_pbag): Use
- bonobo_property_editor_client_get_value_*
- (preferences_new_from_bonobo_pbag): Set gradient_enabled properly
- from property bag
- (preferences_new_from_bonobo_pbag): Check for wallpaper == "(none)"
- (preferences_new_from_bonobo_db): Ditto above
-
- * applier.c (renderer_render_wallpaper): Restore some lost tweaks
- from earlier.
-
- * preferences.c (preferences_init): strdup the home directory
-
- * applier.c: Store preview widget in the renderer, not the applier
- itself
-
- * background-properties-capplet.c (create_dialog): Add a "(none)"
- string to the history
-
-2001-07-26 Richard Hestilow <hestilow@ximian.com>
-
- * applier.c: Remove all bonobo-conf stuff.
-
- * preferences.[ch]: New functions preferences_new_from_bonobo_pbag
- and preferences_new_from_bonobo_db.
-
-2001-07-26 Bradford Hovinen <hovinen@ximian.com>
-
- * background-properties.glade: Tweak borders and padding
-
- * applier.c (get_geometry): Tweak geometry settings
- (renderer_render_wallpaper): Rendering geometry fixes
- (renderer_render_wallpaper): Remove debugging code
-
- * background-properties-capplet.c (property_change_cb): Accept
- applier as argument; retrieve property bag from applier
- (realize_cb): Retrieve applier from widget
- (setup_dialog): Store property bag in applier
-
- * applier.c (renderer_new): Store applier inside renderer; accept
- applier as function parameter
-
- * background-properties-capplet.c (create_dialog): Store the
- applier inside the widget
-
- * applier.c (struct _ApplierPrivate ): Define preview_widget here
- rather than globally
- (applier_get_preview_widget): Make this a method of the applier class
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am ($(oaffile)): remove the oaffile_IN_RULE macro and copy
- it here
- * Makefile.am: remove the DESKTOP_IN_RULE and copy the sed here
-
-2001-07-24 Bradford Hovinen <hovinen@ximian.com>
-
- * main.c (setup_dialog): Use bonobo_peditor_option_menu_construct
-
-2001-07-25 Richard Hestilow <hestilow@ximian.com>
-
- * main.c (setup_dialog): Hide opacity settings for now.
-
- * background-properties.glade: Rename opacity label.
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * applier.c (output_compat_prefs): Write to gnome-config to make
- nautilus happy.
- (applier_apply_prefs): Change of is_nautilus_running handling
- logic to still output legacy settings. Also, call
- output_compat_prefs if is_root
-.
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * main.c (main): Pass in legacy files to capplet_init.
-
-2001-07-23 Bradford Hovinen <hovinen@ximian.com>
-
- * applier.c (renderer_render_wallpaper): Don't adjust pixmap width
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): make distcheck love
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * main.c: Add compatibility "-b" argument.
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * applier.c: remove debugging spew
-
- * main.c (get_legacy_settings): Fix for FileName corba type.
- (apply_settings): Check to make sure applier exists.
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Rename binary to background-properties
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * background-properties.desktop.in.in: Change exec string for
- bonobo-conf.
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * bonobo-conf rewrite.
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove SUBDIRS
- (background_properties_SOURCES): Added missing applier.h
-
- * prefs-widget.c: Remove references to auto apply feature
-
- * applier.c (get_geometry): Use vwidth and vheight rather than
- dwidth and dheight when computing aspect ratio
- (get_geometry): Adjust rwidth and rheight according to above change
-
- * preferences.c (preferences_changed): Disable auto-apply
-
- * background-properties.glade: Remove apply automatically check
- button; change "More Solid" to "More Opaque"
-
-2001-07-17 Chema Celorio <chema@celorio.com>
-
- * start
-
diff --git a/capplets/background/Makefile.am b/capplets/background/Makefile.am
deleted file mode 100644
index d965715a9..000000000
--- a/capplets/background/Makefile.am
+++ /dev/null
@@ -1,48 +0,0 @@
-WALLPAPER_DATADIR = $(datadir)/gnome-background-properties
-
-INCLUDES = \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- -DWALLPAPER_DATADIR=\""$(WALLPAPER_DATADIR)"\"
-
-bin_PROGRAMS = gnome-background-properties
-
-noinst_LTLIBRARIES = libgnomewp.la
-
-gnome_background_properties_LDADD = \
- $(GNOMECC_CAPPLETS_LIBS) \
- libgnomewp.la
-
-gnome_background_properties_SOURCES = \
- gnome-wp-capplet.c gnome-wp-capplet.h \
- gnome-wp-info.c gnome-wp-info.h
-
-libgnomewp_la_SOURCES = \
- gnome-wp-item.c gnome-wp-item.h \
- gnome-wp-utils.c gnome-wp-utils.h \
- gnome-wp-xml.c gnome-wp-xml.h
-
-libgnomewp_la_LIBADD = \
- $(GNOMECC_CAPPLETS_LIBS)
-
-desktopdir = $(datadir)/applications
-desktop_in_files = background.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-
-@INTLTOOL_DESKTOP_RULE@
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = gnome-background-properties.glade
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(WALLPAPER_DATADIR)
-
-EXTRA_DIST = \
- background.desktop.in.in \
- $(glade_DATA)
-
-CLEANFILES = \
- $(desktop_in_files) $(desktop_DATA)
-
-MAINTAINERCLEANFILES = \
- Makefile.in
-
diff --git a/capplets/background/background.desktop.in.in b/capplets/background/background.desktop.in.in
deleted file mode 100644
index c140fb1ff..000000000
--- a/capplets/background/background.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Desktop Background
-_Comment=Change your Desktop Background settings
-Exec=gnome-background-properties %F
-Icon=gnome-settings-background
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Settings;Appearance;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=background
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/background/gnome-background-properties.glade b/capplets/background/gnome-background-properties.glade
deleted file mode 100644
index c351c99b2..000000000
--- a/capplets/background/gnome-background-properties.glade
+++ /dev/null
@@ -1,483 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="gnome_wp_properties">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Desktop Background Preferences</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="default_width">360</property>
- <property name="default_height">418</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Desktop _Wallpaper&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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">wp_tree</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="wp_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="wp_tree">
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Style:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">style_menu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="style_menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="rem_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">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>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="add_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Add Wallpaper</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </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">True</property>
- <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="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Desktop Colors&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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">color_menu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="color_menu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="pcpicker">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeColorPicker" id="scpicker">
- <property name="can_focus">True</property>
- <property name="dither">True</property>
- <property name="use_alpha">False</property>
- <property name="title" translatable="yes">Pick a color</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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/background/gnome-wp-capplet.c b/capplets/background/gnome-wp-capplet.c
deleted file mode 100644
index 0ba5e4dbb..000000000
--- a/capplets/background/gnome-wp-capplet.c
+++ /dev/null
@@ -1,1313 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include "gnome-wp-capplet.h"
-
-enum {
- TARGET_URI_LIST,
- TARGET_URL,
- TARGET_COLOR,
- TARGET_BGIMAGE,
- TARGET_BACKGROUND_RESET
-};
-
-static GtkTargetEntry drop_types[] = {
- {"text/uri-list", 0, TARGET_URI_LIST},
- /* { "application/x-color", 0, TARGET_COLOR }, */
- { "property/bgimage", 0, TARGET_BGIMAGE },
- /* { "x-special/gnome-reset-background", 0, TARGET_BACKGROUND_RESET }*/
-};
-
-static void wp_props_load_wallpaper (gchar * key,
- GnomeWPItem * item,
- GnomeWPCapplet * capplet);
-
-static void wp_properties_error_dialog (GtkWindow * parent, char const * msg,
- GError * err) {
- if (err != NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- msg, err->message);
-
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (dialog);
- g_error_free (err);
- }
-}
-
-static void wp_properties_help (GtkWindow * parent, char const * helpfile,
- char const * section) {
- GError *error = NULL;
-
- g_return_if_fail (helpfile != NULL);
- g_return_if_fail (section != NULL);
-
- gnome_help_display_desktop (NULL, "user-guide", helpfile, section, &error);
- if (error != NULL) {
- wp_properties_error_dialog (parent,
- _("There was an error displaying help: %s"),
- error);
- }
-}
-
-static void gnome_wp_capplet_scroll_to_item (GnomeWPCapplet * capplet,
- GnomeWPItem * item) {
- GtkTreePath * path;
-
- g_return_if_fail (capplet != NULL);
- g_return_if_fail (item != NULL);
-
- path = gtk_tree_row_reference_get_path (item->rowref);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (capplet->treeview), path,
- NULL, FALSE);
- gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (capplet->treeview),
- path, NULL, TRUE, 0.5, 0.0);
- gtk_tree_path_free (path);
-}
-
-static GnomeWPItem * gnome_wp_add_image (GnomeWPCapplet * capplet,
- const gchar * filename) {
- GnomeWPItem * item;
-
- if (!g_utf8_validate (filename, -1, NULL))
- return NULL;
-
- item = g_hash_table_lookup (capplet->wphash, filename);
- if (item != NULL) {
- if (item->deleted) {
- item->deleted = FALSE;
- wp_props_load_wallpaper (item->filename, item, capplet);
- }
- } else {
- item = gnome_wp_item_new (filename, capplet->wphash, capplet->thumbs);
- if (item != NULL) {
- wp_props_load_wallpaper (item->filename, item, capplet);
- }
- }
-
- return item;
-}
-
-static void gnome_wp_add_images (GnomeWPCapplet * capplet,
- GSList * images) {
- GdkCursor * cursor;
- GnomeWPItem * item;
-
- item = NULL;
- cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
- GDK_WATCH);
- gdk_window_set_cursor (capplet->window->window, cursor);
- gdk_cursor_unref (cursor);
-
- if (images != NULL) {
- for (; images != NULL; images = images->next) {
- item = gnome_wp_add_image (capplet, images->data);
- }
- }
-
- gdk_window_set_cursor (capplet->window->window, NULL);
-
- if (item != NULL) {
- gnome_wp_capplet_scroll_to_item (capplet, item);
- }
-}
-
-static void gnome_wp_file_open_dialog (GtkWidget * widget,
- GnomeWPCapplet * capplet) {
- GSList * files;
-
- switch (gtk_dialog_run (GTK_DIALOG (capplet->filesel))) {
- case GTK_RESPONSE_OK:
- files = gtk_file_chooser_get_filenames (GTK_FILE_CHOOSER (capplet->filesel));
- gnome_wp_add_images (capplet, files);
- g_slist_free (files);
- case GTK_RESPONSE_CANCEL:
- default:
- gtk_widget_hide (capplet->filesel);
- break;
- }
-}
-
-static void bg_properties_dragged_image (GtkWidget * widget,
- GdkDragContext * context,
- gint x, gint y,
- GtkSelectionData * selection_data,
- guint info, guint time,
- GnomeWPCapplet * capplet) {
-
- if (info == TARGET_URI_LIST || info == TARGET_BGIMAGE) {
- GList * uris;
- GSList * realuris = NULL;
-
- uris = gnome_vfs_uri_list_parse ((gchar *) selection_data->data);
-
- if (uris != NULL && uris->data != NULL) {
- GdkCursor * cursor;
-
- cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
- GDK_WATCH);
- gdk_window_set_cursor (capplet->window->window, cursor);
- gdk_cursor_unref (cursor);
-
- for (; uris != NULL; uris = uris->next) {
- realuris = g_slist_append (realuris,
- g_strdup (gnome_vfs_uri_get_path (uris->data)));
- }
- gnome_wp_add_images (capplet, realuris);
- gdk_window_set_cursor (capplet->window->window, NULL);
- }
- gnome_vfs_uri_list_free (uris);
- g_slist_free (realuris);
- }
-}
-
-static void wp_props_load_wallpaper (gchar * key,
- GnomeWPItem * item,
- GnomeWPCapplet * capplet) {
- GtkTreeIter iter;
- GtkTreePath * path;
- GdkPixbuf * pixbuf;
-
- if (item->deleted == TRUE) {
- return;
- }
-
- gtk_list_store_append (GTK_LIST_STORE (capplet->model), &iter);
-
- pixbuf = gnome_wp_item_get_thumbnail (item, capplet->thumbs);
- gnome_wp_item_update_description (item);
-
- if (pixbuf != NULL) {
- gtk_list_store_set (GTK_LIST_STORE (capplet->model), &iter,
- 0, pixbuf,
- 1, item->description,
- 2, item->filename,
- -1);
- g_object_unref (pixbuf);
- } else {
- gtk_list_store_set (GTK_LIST_STORE (capplet->model), &iter,
- 1, item->description,
- 2, item->filename,
- -1);
- }
- path = gtk_tree_model_get_path (capplet->model, &iter);
- item->rowref = gtk_tree_row_reference_new (capplet->model, path);
- gtk_tree_path_free (path);
-}
-
-static gint gnome_wp_option_menu_get (GtkOptionMenu * menu) {
- GtkWidget * widget;
-
- g_return_val_if_fail (GTK_IS_OPTION_MENU (menu), -1);
-
- widget = gtk_menu_get_active (GTK_MENU (menu->menu));
-
- if (widget != NULL) {
- return g_list_index (GTK_MENU_SHELL (menu->menu)->children, widget);
- }
-
- return -1;
-}
-
-static void gnome_wp_option_menu_set (GnomeWPCapplet * capplet,
- const gchar * value,
- gboolean shade_type) {
- if (shade_type) {
- if (!strcmp (value, "horizontal-gradient")) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->color_opt),
- GNOME_WP_SHADE_TYPE_HORIZ);
- gtk_widget_show (capplet->sc_picker);
- } else if (!strcmp (value, "vertical-gradient")) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->color_opt),
- GNOME_WP_SHADE_TYPE_VERT);
- gtk_widget_show (capplet->sc_picker);
- } else {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->color_opt),
- GNOME_WP_SHADE_TYPE_SOLID);
- gtk_widget_hide (capplet->sc_picker);
- }
- } else {
- if (!strcmp (value, "centered")) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->wp_opts),
- GNOME_WP_SCALE_TYPE_CENTERED);
- } else if (!strcmp (value, "stretched")) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->wp_opts),
- GNOME_WP_SCALE_TYPE_STRETCHED);
- } else if (!strcmp (value, "scaled")) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->wp_opts),
- GNOME_WP_SCALE_TYPE_SCALED);
- } else {
- gtk_option_menu_set_history (GTK_OPTION_MENU (capplet->wp_opts),
- GNOME_WP_SCALE_TYPE_TILED);
- }
- }
-}
-
-static gboolean gnome_wp_props_wp_set (GnomeWPCapplet * capplet) {
- GtkTreeIter iter;
- GtkTreeModel * model;
- GtkTreeSelection * selection;
- GnomeWPItem * item;
- GConfChangeSet * cs;
- gchar * wpfile;
- GdkPixbuf * pixbuf;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- cs = gconf_change_set_new ();
-
- if (!strcmp (item->filename, "(none)")) {
- gconf_change_set_set_string (cs, WP_OPTIONS_KEY, "none");
- gtk_widget_set_sensitive (capplet->wp_opts, FALSE);
- gtk_widget_set_sensitive (capplet->rm_button, FALSE);
- } else {
- gtk_widget_set_sensitive (capplet->wp_opts, TRUE);
- gtk_widget_set_sensitive (capplet->rm_button, TRUE);
- gconf_change_set_set_string (cs, WP_FILE_KEY, item->filename);
- gconf_change_set_set_string (cs, WP_OPTIONS_KEY, item->options);
- gnome_wp_option_menu_set (capplet, item->options, FALSE);
- }
-
- gconf_change_set_set_string (cs, WP_SHADING_KEY, item->shade_type);
- gnome_wp_option_menu_set (capplet, item->shade_type, TRUE);
-
- gconf_change_set_set_string (cs, WP_PCOLOR_KEY, item->pri_color);
- gconf_change_set_set_string (cs, WP_SCOLOR_KEY, item->sec_color);
-
- gconf_client_commit_change_set (capplet->client, cs, TRUE, NULL);
-
- gconf_change_set_unref (cs);
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->pc_picker),
- item->pcolor->red,
- item->pcolor->green,
- item->pcolor->blue, 65535);
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->sc_picker),
- item->scolor->red,
- item->scolor->green,
- item->scolor->blue, 65535);
-
- g_free (wpfile);
-
- pixbuf = gnome_wp_pixbuf_new_solid (item->pcolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->smenuitem), pixbuf);
- g_object_unref (pixbuf);
-
- pixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_HORIZONTAL,
- item->pcolor, item->scolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->hmenuitem), pixbuf);
- g_object_unref (pixbuf);
-
- pixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_VERTICAL,
- item->pcolor, item->scolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->vmenuitem), pixbuf);
- g_object_unref (pixbuf);
- } else {
- gtk_widget_set_sensitive (capplet->rm_button, FALSE);
- }
-
- return FALSE;
-}
-
-static void gnome_wp_props_wp_selected (GtkTreeSelection * selection,
- GnomeWPCapplet * capplet) {
- if (capplet->idleid > 0) {
- g_source_remove (capplet->idleid);
- }
- capplet->idleid = g_timeout_add (capplet->delay + 100,
- (GSourceFunc) gnome_wp_props_wp_set,
- capplet);
-}
-
-static void gnome_wp_remove_wp (gchar * key, GnomeWPItem * item,
- GnomeWPCapplet * capplet) {
- GtkTreePath * path;
- GtkTreeIter iter;
-
- if (item->rowref != NULL && item->deleted == FALSE) {
- path = gtk_tree_row_reference_get_path (item->rowref);
- if (path != NULL) {
- gtk_tree_model_get_iter (capplet->model, &iter, path);
- gtk_tree_path_free (path);
-
- gtk_list_store_remove (GTK_LIST_STORE (capplet->model), &iter);
- }
- }
-}
-
-void gnome_wp_main_quit (GnomeWPCapplet * capplet) {
- g_hash_table_foreach (capplet->wphash, (GHFunc) gnome_wp_remove_wp,
- capplet);
-
- gnome_wp_xml_save_list (capplet);
-
- g_object_unref (capplet->thumbs);
-
- g_hash_table_destroy (capplet->wphash);
-
- gtk_main_quit ();
-}
-
-static void wallpaper_properties_clicked (GtkWidget * dialog,
- gint response_id,
- GnomeWPCapplet * capplet) {
- switch (response_id) {
- case GTK_RESPONSE_HELP:
- wp_properties_help (GTK_WINDOW (dialog),
- "user-guide.xml", "goscustdesk-7");
- break;
- case GTK_RESPONSE_DELETE_EVENT:
- case GTK_RESPONSE_CLOSE: {
- gtk_widget_destroy (dialog);
- gnome_wp_main_quit (capplet);
- break;
- }
- }
-}
-
-static void gnome_wp_scale_type_changed (GtkMenuShell * shell,
- GnomeWPCapplet * capplet) {
- GnomeWPItem * item = NULL;
- GdkPixbuf * pixbuf;
- GtkTreeIter iter;
- GtkTreeModel * model;
- GtkTreeSelection * selection;
- gchar * wpfile;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- g_free (wpfile);
- }
-
- if (item == NULL) {
- return;
- }
- switch (gnome_wp_option_menu_get (GTK_OPTION_MENU (capplet->wp_opts))) {
- case GNOME_WP_SCALE_TYPE_CENTERED:
- item->options = g_strdup ("centered");
- break;
- case GNOME_WP_SCALE_TYPE_STRETCHED:
- item->options = g_strdup ("stretched");
- break;
- case GNOME_WP_SCALE_TYPE_SCALED:
- item->options = g_strdup ("scaled");
- break;
- case GNOME_WP_SCALE_TYPE_TILED:
- item->options = g_strdup ("wallpaper");
- break;
- default:
- break;
- }
- pixbuf = gnome_wp_item_get_thumbnail (item, capplet->thumbs);
- gtk_list_store_set (GTK_LIST_STORE (capplet->model), &iter,
- 0, pixbuf,
- -1);
- g_object_unref (pixbuf);
- gconf_client_set_string (capplet->client, WP_OPTIONS_KEY,
- item->options, NULL);
-}
-
-static void gnome_wp_shade_type_changed (GtkMenuShell * shell,
- GnomeWPCapplet * capplet) {
- GnomeWPItem * item = NULL;
- GtkTreeIter iter;
- GtkTreeModel * model;
- GtkTreeSelection * selection;
- gchar * wpfile;
- GdkPixbuf * pixbuf;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- g_free (wpfile);
- }
-
- if (item == NULL) {
- return;
- }
-
- switch (gnome_wp_option_menu_get (GTK_OPTION_MENU (capplet->color_opt))) {
- case GNOME_WP_SHADE_TYPE_HORIZ:
- item->shade_type = g_strdup ("horizontal-gradient");
- gtk_widget_show (capplet->sc_picker);
- break;
- case GNOME_WP_SHADE_TYPE_VERT:
- item->shade_type = g_strdup ("vertical-gradient");
- gtk_widget_show (capplet->sc_picker);
- break;
- case GNOME_WP_SHADE_TYPE_SOLID:
- item->shade_type = g_strdup ("solid");
- gtk_widget_hide (capplet->sc_picker);
- break;
- default:
- break;
- }
- pixbuf = gnome_wp_item_get_thumbnail (item, capplet->thumbs);
- gtk_list_store_set (GTK_LIST_STORE (capplet->model), &iter,
- 0, pixbuf,
- -1);
- g_object_unref (pixbuf);
- gconf_client_set_string (capplet->client, WP_SHADING_KEY,
- item->shade_type, NULL);
-}
-
-static void gnome_wp_color_changed (GnomeWPCapplet * capplet,
- gboolean update) {
- GnomeWPItem * item = NULL;
- GtkTreeIter iter;
- GtkTreeModel * model;
- GtkTreeSelection * selection;
- gchar * wpfile;
- GdkPixbuf * pixbuf;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- g_free (wpfile);
- }
-
- if (item == NULL) {
- return;
- }
-
- g_free (item->pri_color);
- gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (capplet->pc_picker),
- &item->pcolor->red,
- &item->pcolor->green,
- &item->pcolor->blue, NULL);
- item->pri_color = g_strdup_printf ("#%02X%02X%02X",
- item->pcolor->red >> 8,
- item->pcolor->green >> 8,
- item->pcolor->blue >> 8);
-
- g_free (item->sec_color);
- gnome_color_picker_get_i16 (GNOME_COLOR_PICKER (capplet->sc_picker),
- &item->scolor->red,
- &item->scolor->green,
- &item->scolor->blue, NULL);
- item->sec_color = g_strdup_printf ("#%02X%02X%02X",
- item->scolor->red >> 8,
- item->scolor->green >> 8,
- item->scolor->blue >> 8);
-
- if (update) {
- gconf_client_set_string (capplet->client, WP_PCOLOR_KEY,
- item->pri_color, NULL);
- gconf_client_set_string (capplet->client, WP_SCOLOR_KEY,
- item->sec_color, NULL);
- }
-
- gnome_wp_shade_type_changed (NULL, capplet);
-
- pixbuf = gnome_wp_pixbuf_new_solid (item->pcolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->smenuitem), pixbuf);
- g_object_unref (pixbuf);
-
- pixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_HORIZONTAL,
- item->pcolor, item->scolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->hmenuitem), pixbuf);
- g_object_unref (pixbuf);
-
- pixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_VERTICAL,
- item->pcolor, item->scolor, 14, 12);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->vmenuitem), pixbuf);
- g_object_unref (pixbuf);
-}
-
-static void gnome_wp_scolor_changed (GtkWidget * widget,
- guint r, guint g, guint b, guint a,
- GnomeWPCapplet * capplet) {
- gnome_wp_color_changed (capplet, TRUE);
-}
-
-static void gnome_wp_remove_wallpaper (GtkWidget * widget,
- GnomeWPCapplet * capplet) {
- GtkTreeIter iter;
- GtkTreeModel * model;
- GtkTreePath * first;
- GtkTreeSelection * selection;
- gchar * wpfile;
-
- if (capplet->idleid > 0) {
- g_source_remove (capplet->idleid);
- }
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- GnomeWPItem * item;
-
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
- item->deleted = TRUE;
-
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
-
- g_free (wpfile);
- }
- first = gtk_tree_path_new_first ();
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (capplet->treeview),
- first, NULL, FALSE);
- gtk_tree_path_free (first);
-}
-
-static gboolean gnome_wp_load_stuffs (void * data) {
- GnomeWPCapplet * capplet = (GnomeWPCapplet *) data;
- gchar * imagepath, * style;
- GnomeWPItem * item;
-
- style = gconf_client_get_string (capplet->client,
- WP_OPTIONS_KEY,
- NULL);
-
- gnome_wp_xml_load_list (capplet);
- g_hash_table_foreach (capplet->wphash, (GHFunc) wp_props_load_wallpaper,
- capplet);
-
- gdk_window_set_cursor (capplet->window->window, NULL);
-
- imagepath = gconf_client_get_string (capplet->client,
- WP_FILE_KEY,
- NULL);
-
- item = g_hash_table_lookup (capplet->wphash, imagepath);
- if (item != NULL && strcmp (style, "none") != 0) {
- if (item->deleted == TRUE) {
- item->deleted = FALSE;
- wp_props_load_wallpaper (item->filename, item, capplet);
- }
-
- gnome_wp_capplet_scroll_to_item (capplet, item);
-
- gnome_wp_option_menu_set (capplet, item->options, FALSE);
- gnome_wp_option_menu_set (capplet, item->shade_type, TRUE);
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->pc_picker),
- item->pcolor->red,
- item->pcolor->green,
- item->pcolor->blue, 65535);
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->sc_picker),
- item->scolor->red,
- item->scolor->green,
- item->scolor->blue, 65535);
- } else if (strcmp (style, "none") != 0) {
- item = gnome_wp_add_image (capplet, imagepath);
- gnome_wp_capplet_scroll_to_item (capplet, item);
- }
-
- item = g_hash_table_lookup (capplet->wphash, "(none)");
- if (item == NULL) {
- item = gnome_wp_item_new ("(none)", capplet->wphash, capplet->thumbs);
- if (item != NULL) {
- wp_props_load_wallpaper (item->filename, item, capplet);
- }
- } else {
- if (item->deleted == TRUE) {
- item->deleted = FALSE;
- wp_props_load_wallpaper (item->filename, item, capplet);
- }
-
- if (!strcmp (style, "none")) {
- gnome_wp_capplet_scroll_to_item (capplet, item);
- }
- }
- g_free (imagepath);
- g_free (style);
-
- if (capplet->uri_list) {
- gnome_wp_add_images (capplet, capplet->uri_list);
- g_slist_free (capplet->uri_list);
- }
-
- return FALSE;
-}
-
-static gint gnome_wp_list_sort (GtkTreeModel * model,
- GtkTreeIter * a, GtkTreeIter * b,
- GnomeWPCapplet * capplet) {
- gchar * foo, * bar;
- gchar * desca, * descb;
- gint retval;
-
- gtk_tree_model_get (model, a, 1, &desca, 2, &foo, -1);
- gtk_tree_model_get (model, b, 1, &descb, 2, &bar, -1);
-
- if (!strcmp (foo, "(none)")) {
- retval = -1;
- } else if (!strcmp (bar, "(none)")) {
- retval = 1;
- } else {
- retval = g_utf8_collate (desca, descb);
- }
-
- g_free (desca);
- g_free (descb);
- g_free (foo);
- g_free (bar);
-
- return retval;
-}
-
-static void gnome_wp_file_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- GtkTreeSelection * selection;
- GtkTreeModel * model;
- GtkTreeIter iter;
- GnomeWPItem * item;
- gchar * wpfile, * selected;
-
- wpfile = g_strdup (gconf_value_get_string (entry->value));
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &selected, -1);
- if (strcmp (selected, wpfile) != 0) {
- if (item != NULL) {
- gnome_wp_capplet_scroll_to_item (capplet, item);
- } else {
- item = gnome_wp_add_image (capplet, wpfile);
- gnome_wp_capplet_scroll_to_item (capplet, item);
- }
- }
- g_free (wpfile);
- g_free (selected);
- }
-}
-
-static void gnome_wp_options_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- GtkTreeSelection * selection;
- GtkTreeModel * model;
- GtkTreeIter iter;
- GnomeWPItem * item;
- gchar * wpfile;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- if (item != NULL) {
- item->options = g_strdup (gconf_value_get_string (entry->value));
- gnome_wp_option_menu_set (capplet, item->options, FALSE);
- }
- g_free (wpfile);
- }
-}
-
-static void gnome_wp_shading_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- GtkTreeSelection * selection;
- GtkTreeModel * model;
- GtkTreeIter iter;
- GnomeWPItem * item;
- gchar * wpfile;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- if (gtk_tree_selection_get_selected (selection, &model, &iter)) {
- gtk_tree_model_get (model, &iter, 2, &wpfile, -1);
-
- item = g_hash_table_lookup (capplet->wphash, wpfile);
-
- if (item != NULL) {
- item->shade_type = g_strdup (gconf_value_get_string (entry->value));
- gnome_wp_option_menu_set (capplet, item->shade_type, TRUE);
- }
- g_free (wpfile);
- }
-}
-
-static void gnome_wp_color1_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- GdkColor color;
- const gchar * colorhex;
-
- colorhex = gconf_value_get_string (entry->value);
-
- gdk_color_parse (colorhex, &color);
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->pc_picker),
- color.red,
- color.green,
- color.blue, 65535);
-
- gnome_wp_color_changed (capplet, FALSE);
-}
-
-static void gnome_wp_color2_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- GdkColor color;
- const gchar * colorhex;
-
- colorhex = gconf_value_get_string (entry->value);
-
- gdk_color_parse (colorhex, &color);
-
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (capplet->sc_picker),
- color.red,
- color.green,
- color.blue, 65535);
-
- gnome_wp_color_changed (capplet, FALSE);
-}
-
-static void gnome_wp_delay_changed (GConfClient * client, guint id,
- GConfEntry * entry,
- GnomeWPCapplet * capplet) {
- capplet->delay = gconf_value_get_int (entry->value);
-}
-
-static void gnome_wp_icon_theme_changed (GnomeIconTheme * theme,
- GnomeWPCapplet * capplet) {
- GdkPixbuf * pixbuf;
- gchar * icofile;
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "gnome-settings-background",
- 48, NULL, NULL);
- if (icofile != NULL) {
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_window_set_icon (GTK_WINDOW (capplet->window), NULL);
- gtk_window_set_default_icon_from_file (icofile, NULL);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-center",
- 16, NULL, NULL);
- if (icofile != NULL) {
- GdkPixbuf * pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->citem), pixbuf);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-fill",
- 16, NULL, NULL);
- if (icofile != NULL) {
- GdkPixbuf * pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->fitem), pixbuf);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-scale",
- 16, NULL, NULL);
- if (icofile != NULL) {
- GdkPixbuf * pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->sitem), pixbuf);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-tile",
- 16, NULL, NULL);
- if (icofile != NULL) {
- GdkPixbuf * pixbuf;
-
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->witem), pixbuf);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-}
-
-static GladeXML * gnome_wp_create_dialog (void) {
- GladeXML * new;
- gchar * gladefile;
-
- gladefile = g_build_filename (GNOMECC_DATA_DIR,
- "interfaces",
- "gnome-background-properties.glade",
- NULL);
-
- if (!g_file_test (gladefile, G_FILE_TEST_EXISTS)) {
- gladefile = g_build_filename (g_get_current_dir (),
- "gnome-background-properties.glade",
- NULL);
- }
- new = glade_xml_new (gladefile, NULL, NULL);
- g_free (gladefile);
-
- return new;
-}
-
-static void set_accessible_name (GtkWidget *widget, const gchar *name) {
- AtkObject *obj;
-
- obj = gtk_widget_get_accessible (widget);
- if (!GTK_IS_ACCESSIBLE (obj))
- return;
- if (name)
- atk_object_set_name (obj, name);
-}
-
-static void gnome_wp_update_preview (GtkFileChooser *chooser,
- GnomeWPCapplet *capplet) {
- gchar *uri;
-
- uri = gtk_file_chooser_get_preview_uri (chooser);
-
- if (uri) {
- GdkPixbuf *pixbuf;
- gchar *mime_type;
-
- mime_type = gnome_vfs_get_mime_type (uri);
- pixbuf = gnome_thumbnail_factory_generate_thumbnail (capplet->thumbs,
- uri,
- mime_type);
-
- if(pixbuf != NULL) {
- gtk_image_set_from_pixbuf (GTK_IMAGE (capplet->image), pixbuf);
- g_object_unref (pixbuf);
- } else {
- gtk_image_set_from_stock (GTK_IMAGE (capplet->image),
- "gtk-dialog-question",
- GTK_ICON_SIZE_DIALOG);
- }
- g_free (mime_type);
- }
- gtk_file_chooser_set_preview_widget_active (chooser, TRUE);
-}
-
-static void wallpaper_properties_init (poptContext ctx) {
- GnomeWPCapplet * capplet;
- GladeXML * dialog;
- GtkWidget * menu, * label;
- GtkWidget * mbox, * mitem;
- GtkWidget * add_button;
- GtkCellRenderer * renderer;
- GtkTreeViewColumn * column;
- GtkTreeSelection * selection;
- GdkPixbuf * pixbuf;
- GdkCursor * cursor;
- gchar * icofile;
- const gchar ** args;
-
- gtk_rc_parse_string ("style \"wp-tree-defaults\" {\n"
- " GtkTreeView::horizontal-separator = 6\n"
- "} widget_class \"*TreeView*\""
- " style \"wp-tree-defaults\"\n\n"
- "style \"wp-dialog-defaults\" {\n"
- " GtkDialog::action-area-border = 0\n"
- " GtkDialog::content-area-border = 0\n"
- "} widget_class \"*GtkDialog*\""
- " style \"wp-dialog-defaults\"");
-
- capplet = g_new0 (GnomeWPCapplet, 1);
-
- if (capplet->client == NULL) {
- capplet->client = gconf_client_get_default ();
- }
-
- capplet->delay = gconf_client_get_int (capplet->client,
- WP_DELAY_KEY,
- NULL);
- gconf_client_add_dir (capplet->client, WP_KEYBOARD_PATH,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (capplet->client, WP_PATH_KEY,
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- gconf_client_notify_add (capplet->client,
- WP_DELAY_KEY,
- (GConfClientNotifyFunc) gnome_wp_delay_changed,
- capplet, NULL, NULL);
- gconf_client_notify_add (capplet->client,
- WP_FILE_KEY,
- (GConfClientNotifyFunc) gnome_wp_file_changed,
- capplet, NULL, NULL);
- gconf_client_notify_add (capplet->client,
- WP_OPTIONS_KEY,
- (GConfClientNotifyFunc) gnome_wp_options_changed,
- capplet, NULL, NULL);
- gconf_client_notify_add (capplet->client,
- WP_SHADING_KEY,
- (GConfClientNotifyFunc) gnome_wp_shading_changed,
- capplet, NULL, NULL);
- gconf_client_notify_add (capplet->client,
- WP_PCOLOR_KEY,
- (GConfClientNotifyFunc) gnome_wp_color1_changed,
- capplet, NULL, NULL);
- gconf_client_notify_add (capplet->client,
- WP_SCOLOR_KEY,
- (GConfClientNotifyFunc) gnome_wp_color2_changed,
- capplet, NULL, NULL);
-
- capplet->wphash = g_hash_table_new_full (g_str_hash, g_str_equal,
- g_free,
- (GDestroyNotify)
- gnome_wp_item_free);
-
- capplet->thumbs = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
- capplet->theme = gnome_icon_theme_new ();
- gnome_icon_theme_set_allow_svg (capplet->theme, TRUE);
-
- g_signal_connect (G_OBJECT (capplet->theme), "changed",
- G_CALLBACK (gnome_wp_icon_theme_changed), capplet);
-
- dialog = gnome_wp_create_dialog ();
- capplet->window = glade_xml_get_widget (dialog,"gnome_wp_properties");
-
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "gnome-settings-background",
- 48, NULL, NULL);
- if (icofile != NULL) {
- pixbuf = gdk_pixbuf_new_from_file (icofile, NULL);
- gtk_window_set_default_icon_from_file (icofile, NULL);
- gtk_window_set_icon (GTK_WINDOW (capplet->window), pixbuf);
- g_object_unref (pixbuf);
- }
- g_free (icofile);
-
- gtk_widget_realize (capplet->window);
-
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (capplet->window)->action_area), 12);
-
- /* Drag and Drop Support */
- gtk_drag_dest_unset (capplet->window);
- gtk_drag_dest_set (capplet->window, GTK_DEST_DEFAULT_ALL, drop_types,
- sizeof (drop_types) / sizeof (drop_types[0]),
- GDK_ACTION_COPY | GDK_ACTION_MOVE);
- g_signal_connect (G_OBJECT (capplet->window), "drag_data_received",
- G_CALLBACK (bg_properties_dragged_image), capplet);
-
- capplet->treeview = glade_xml_get_widget (dialog,"wp_tree");
-
- capplet->model = GTK_TREE_MODEL (gtk_list_store_new (3, GDK_TYPE_PIXBUF,
- G_TYPE_STRING,
- G_TYPE_STRING));
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (capplet->treeview), capplet->model);
-
- column = gtk_tree_view_column_new ();
- renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_attributes (column, renderer,
- "pixbuf", 0,
- NULL);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_attributes (column, renderer,
- "markup", 1,
- NULL);
- gtk_tree_view_column_set_spacing (column, 6);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (capplet->treeview), column);
-
- gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (capplet->model), 2,
- (GtkTreeIterCompareFunc) gnome_wp_list_sort,
- capplet, NULL);
-
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (capplet->model),
- 2, GTK_SORT_ASCENDING);
-
- capplet->wp_opts = glade_xml_get_widget (dialog,"style_menu");
-
- menu = gtk_menu_new ();
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Centered"));
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-center",
- 16, NULL, NULL);
-
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- if (icofile != NULL) {
- capplet->citem = gtk_image_new_from_file (icofile);
- gtk_box_pack_start (GTK_BOX (mbox), capplet->citem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->citem);
- }
- g_free (icofile);
-
- label = gtk_label_new (_("Centered"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_menu_append (GTK_MENU (menu), mitem);
- gtk_widget_show (mitem);
-
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Fill Screen"));
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-fill",
- 16, NULL, NULL);
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- if (icofile != NULL) {
- capplet->fitem = gtk_image_new_from_file (icofile);
- gtk_box_pack_start (GTK_BOX (mbox), capplet->fitem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->fitem);
- }
- g_free (icofile);
-
- label = gtk_label_new (_("Fill Screen"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_menu_append (GTK_MENU (menu), mitem);
- gtk_widget_show (mitem);
-
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Scaled"));
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-scale",
- 16, NULL, NULL);
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- if (icofile != NULL) {
- capplet->sitem = gtk_image_new_from_file (icofile);
- gtk_box_pack_start (GTK_BOX (mbox), capplet->sitem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->sitem);
- }
- g_free (icofile);
-
- label = gtk_label_new (_("Scaled"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_menu_append (GTK_MENU (menu), mitem);
- gtk_widget_show (mitem);
-
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Tiled"));
- icofile = gnome_icon_theme_lookup_icon (capplet->theme,
- "stock_wallpaper-tile",
- 16, NULL, NULL);
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- if (icofile != NULL) {
- capplet->witem = gtk_image_new_from_file (icofile);
- gtk_box_pack_start (GTK_BOX (mbox), capplet->witem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->witem);
- }
- g_free (icofile);
-
- label = gtk_label_new (_("Tiled"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_menu_append (GTK_MENU (menu), mitem);
- gtk_widget_show (mitem);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (capplet->wp_opts), menu);
-
- g_signal_connect (G_OBJECT (menu), "deactivate",
- G_CALLBACK (gnome_wp_scale_type_changed), capplet);
-
- add_button = glade_xml_get_widget (dialog,"add_button");
- capplet->rm_button = glade_xml_get_widget (dialog,"rem_button");
-
- g_signal_connect (G_OBJECT (add_button), "clicked",
- G_CALLBACK (gnome_wp_file_open_dialog), capplet);
- g_signal_connect (G_OBJECT (capplet->rm_button), "clicked",
- G_CALLBACK (gnome_wp_remove_wallpaper), capplet);
-
- capplet->color_opt = glade_xml_get_widget (dialog,"color_menu");
-
- menu = gtk_menu_new ();
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Solid Color"));
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- capplet->smenuitem = gtk_image_new ();
- gtk_box_pack_start (GTK_BOX (mbox), capplet->smenuitem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->smenuitem);
-
- label = gtk_label_new (_("Solid Color"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_widget_show (mitem);
- gtk_menu_append (GTK_MENU (menu), mitem);
-
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Horizontal Gradient"));
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- capplet->hmenuitem = gtk_image_new ();
- gtk_box_pack_start (GTK_BOX (mbox), capplet->hmenuitem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->hmenuitem);
-
- label = gtk_label_new (_("Horizontal Gradient"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_widget_show (mitem);
- gtk_menu_append (GTK_MENU (menu), mitem);
-
- mitem = gtk_menu_item_new ();
- set_accessible_name (mitem, _("Vertical Gradient"));
- mbox = gtk_hbox_new (FALSE, 6);
- gtk_container_add (GTK_CONTAINER (mitem), mbox);
- gtk_widget_show (mbox);
-
- capplet->vmenuitem = gtk_image_new ();
- gtk_box_pack_start (GTK_BOX (mbox), capplet->vmenuitem, FALSE, FALSE, 0);
- gtk_widget_show (capplet->vmenuitem);
-
- label = gtk_label_new (_("Vertical Gradient"));
- gtk_misc_set_alignment (GTK_MISC (label), 0, 0.5);
- gtk_box_pack_start (GTK_BOX (mbox), label, TRUE, TRUE, 0);
- gtk_widget_show (label);
- gtk_widget_show (mitem);
- gtk_menu_append (GTK_MENU (menu), mitem);
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (capplet->color_opt), menu);
- g_signal_connect (G_OBJECT (menu), "deactivate",
- G_CALLBACK (gnome_wp_shade_type_changed), capplet);
-
- capplet->pc_picker = glade_xml_get_widget (dialog,"pcpicker");
- g_signal_connect (G_OBJECT (capplet->pc_picker), "color_set",
- G_CALLBACK (gnome_wp_scolor_changed), capplet);
-
- capplet->sc_picker = glade_xml_get_widget (dialog,"scpicker");
- g_signal_connect (G_OBJECT (capplet->sc_picker), "color_set",
- G_CALLBACK (gnome_wp_scolor_changed), capplet);
-
- g_signal_connect (G_OBJECT (capplet->window), "response",
- G_CALLBACK (wallpaper_properties_clicked), capplet);
-
- gtk_widget_show (capplet->window);
-
- cursor = gdk_cursor_new_for_display (gdk_display_get_default (),
- GDK_WATCH);
- gdk_window_set_cursor (capplet->window->window, cursor);
- gdk_cursor_unref (cursor);
-
- args = poptGetArgs (ctx);
- if (args != NULL) {
- const gchar ** p;
-
- for (p = args; *p != NULL; p++) {
- capplet->uri_list = g_slist_append (capplet->uri_list, (gchar *) *p);
- }
- }
-
- poptFreeContext (ctx);
-
- g_idle_add (gnome_wp_load_stuffs, capplet);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (capplet->treeview));
- g_signal_connect (G_OBJECT (selection), "changed",
- G_CALLBACK (gnome_wp_props_wp_selected), capplet);
-
- /* Create the file chooser dialog stuff here */
- capplet->filesel = gtk_file_chooser_dialog_new_with_backend (_("Add Wallpaper"),
- GTK_WINDOW (capplet->window),
- GTK_FILE_CHOOSER_ACTION_OPEN,
- "gtk+",
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN,
- GTK_RESPONSE_OK,
- NULL);
- gtk_file_chooser_set_select_multiple (GTK_FILE_CHOOSER (capplet->filesel),
- TRUE);
-
- gtk_file_chooser_set_use_preview_label (GTK_FILE_CHOOSER (capplet->filesel),
- FALSE);
-
- capplet->image = gtk_image_new ();
- gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (capplet->filesel),
- capplet->image);
- gtk_widget_set_size_request (capplet->image, 128, -1);
-
- gtk_widget_show (capplet->image);
-
- g_signal_connect (capplet->filesel, "update-preview",
- G_CALLBACK (gnome_wp_update_preview), capplet);
-}
-
-gint main (gint argc, gchar *argv[]) {
- GnomeProgram * program;
- GValue context = { 0 };
- poptContext ctx;
-
-#ifdef ENABLE_NLS
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-#endif
-
- program = gnome_program_init (PACKAGE, VERSION, LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_POPT_TABLE,
- NULL, NULL);
-
- g_object_get_property (G_OBJECT (program), GNOME_PARAM_POPT_CONTEXT,
- g_value_init (&context, G_TYPE_POINTER));
- ctx = g_value_get_pointer (&context);
-
- wallpaper_properties_init (ctx);
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/background/gnome-wp-capplet.h b/capplets/background/gnome-wp-capplet.h
deleted file mode 100644
index 872cf56bd..000000000
--- a/capplets/background/gnome-wp-capplet.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _GNOME_WP_CAPPLET_H_
-#define _GNOME_WP_CAPPLET_H_
-
-#include <config.h>
-#include <gnome.h>
-#include <glib.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs-mime-utils.h>
-#include <libgnomeui/gnome-thumbnail.h>
-#include <gconf/gconf-client.h>
-#include <libxml/parser.h>
-#include <glade/glade.h>
-
-typedef struct _GnomeWPCapplet GnomeWPCapplet;
-
-#include "gnome-wp-info.h"
-#include "gnome-wp-item.h"
-#include "gnome-wp-utils.h"
-#include "gnome-wp-xml.h"
-
-struct _GnomeWPCapplet {
- GtkWidget * window;
-
- /* List of files passed to command line */
- GSList * uri_list;
-
- /* The Tree View */
- GtkWidget * treeview;
- GtkTreeModel * model;
-
- /* Option Menu for Scaling Options */
- GtkWidget * wp_opts;
- GtkWidget * rm_button;
-
- /* Menu Items for Fill/Scale/Center/Tile Options */
- GtkWidget * fitem;
- GtkWidget * sitem;
- GtkWidget * citem;
- GtkWidget * witem;
-
- /* Widgets for Color Options */
- GtkWidget * color_opt;
- GtkWidget * pc_picker;
- GtkWidget * sc_picker;
-
- /* Menu Items for Color Style Options */
- GtkWidget * smenuitem;
- GtkWidget * hmenuitem;
- GtkWidget * vmenuitem;
-
- /* GConf Client */
- GConfClient * client;
-
- /* Thumbnailing and Icon Theme stuff */
- GnomeThumbnailFactory * thumbs;
- GnomeIconTheme * theme;
-
- /* Hash Table of Wallpapers */
- GHashTable * wphash;
-
- /* Keyboard Delay */
- gint delay;
-
- /* The Timeout ID for Setting the Wallpaper */
- gint idleid;
-
- /* File Chooser Dialog */
- GtkWidget * filesel;
- GtkWidget * image;
-};
-
-typedef enum {
- GNOME_WP_SHADE_TYPE_SOLID,
- GNOME_WP_SHADE_TYPE_HORIZ,
- GNOME_WP_SHADE_TYPE_VERT
-} GnomeWPShadeType;
-
-typedef enum {
- GNOME_WP_SCALE_TYPE_CENTERED,
- GNOME_WP_SCALE_TYPE_STRETCHED,
- GNOME_WP_SCALE_TYPE_SCALED,
- GNOME_WP_SCALE_TYPE_TILED
-} GnomeWPScaleType;
-
-void gnome_wp_main_quit (GnomeWPCapplet * capplet);
-
-#endif
-
diff --git a/capplets/background/gnome-wp-info.c b/capplets/background/gnome-wp-info.c
deleted file mode 100644
index ba6afb618..000000000
--- a/capplets/background/gnome-wp-info.c
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <config.h>
-#include <gnome.h>
-#include "gnome-wp-info.h"
-
-GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
- GnomeThumbnailFactory * thumbs) {
- GnomeWPInfo * new;
- GnomeVFSFileInfo * info;
- GnomeVFSResult result;
-
- gchar *escaped_uri = gnome_vfs_escape_path_string (uri);
-
- info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info (escaped_uri, info,
- GNOME_VFS_FILE_INFO_DEFAULT |
- GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
- GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- g_free (escaped_uri);
-
- if (info == NULL || info->mime_type == NULL || result != GNOME_VFS_OK) {
- if (!strcmp (uri, "(none)")) {
- new = g_new0 (GnomeWPInfo, 1);
-
- new->mime_type = g_strdup ("image/x-no-data");
- new->uri = g_strdup (uri);
-
- new->thumburi = g_strconcat (g_get_home_dir (),
- "/.thumbnails/normal/",
- gnome_thumbnail_md5 (gnome_vfs_escape_path_string (uri)),
- ".png",
- NULL);
-
- new->name = g_strdup (_("No Wallpaper"));
-
- new->size = 0;
- } else {
- new = NULL;
- }
- } else {
- new = g_new0 (GnomeWPInfo, 1);
-
- new->uri = g_strdup (uri);
-
- new->thumburi = gnome_thumbnail_factory_lookup (thumbs,
- gnome_vfs_escape_path_string (new->uri),
- info->mtime);
- if (new->thumburi == NULL) {
- new->thumburi = g_strconcat (g_get_home_dir (),
- "/.thumbnails/normal/",
- gnome_thumbnail_md5 (gnome_vfs_escape_path_string (uri)),
- ".png",
- NULL);
- }
- new->name = g_strdup (info->name);
- new->mime_type = g_strdup (info->mime_type);
-
- new->size = info->size;
- new->mtime = info->mtime;
- }
- gnome_vfs_file_info_unref (info);
-
- return new;
-}
-
-GnomeWPInfo * gnome_wp_info_dup (const GnomeWPInfo * info) {
- GnomeWPInfo * new;
-
- new = g_new0 (GnomeWPInfo, 1);
-
- new->uri = g_strdup (info->uri);
- new->thumburi = g_strdup (info->uri);
-
- new->name = g_strdup (info->name);
- new->mime_type = g_strdup (info->mime_type);
-
- new->size = info->size;
- new->mtime = info->mtime;
-
- return new;
-}
-
-void gnome_wp_info_free (GnomeWPInfo * info) {
- if (info == NULL) {
- return;
- }
-
- g_free (info->uri);
- g_free (info->thumburi);
- g_free (info->name);
- g_free (info->mime_type);
-
- info = NULL;
-}
-
diff --git a/capplets/background/gnome-wp-info.h b/capplets/background/gnome-wp-info.h
deleted file mode 100644
index 20dcf11bf..000000000
--- a/capplets/background/gnome-wp-info.h
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _GNOME_WP_INFO_H_
-#define _GNOME_WP_INFO_H_
-
-#include <glib.h>
-#include <libgnomevfs/gnome-vfs.h>
-#include <libgnomeui/gnome-thumbnail.h>
-
-typedef struct _GnomeWPInfo GnomeWPInfo;
-
-struct _GnomeWPInfo {
- gchar * uri;
- gchar * thumburi;
- gchar * name;
- gchar * mime_type;
-
- GnomeVFSFileSize size;
-
- time_t mtime;
-};
-
-GnomeWPInfo * gnome_wp_info_new (const gchar * uri,
- GnomeThumbnailFactory * thumbs);
-GnomeWPInfo * gnome_wp_info_dup (const GnomeWPInfo * info);
-void gnome_wp_info_free (GnomeWPInfo * info);
-
-#endif
-
diff --git a/capplets/background/gnome-wp-item.c b/capplets/background/gnome-wp-item.c
deleted file mode 100644
index cbb00bdd0..000000000
--- a/capplets/background/gnome-wp-item.c
+++ /dev/null
@@ -1,300 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <config.h>
-
-#include <gconf/gconf-client.h>
-#include <gnome.h>
-#include <string.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include "gnome-wp-item.h"
-#include "gnome-wp-utils.h"
-
-GnomeWPItem * gnome_wp_item_new (const gchar * filename,
- GHashTable * wallpapers,
- GnomeThumbnailFactory * thumbnails) {
- GnomeWPItem * item = NULL;
- GdkColor color1, color2;
- GConfClient * client;
-
- client = gconf_client_get_default ();
-
- item = g_new0 (GnomeWPItem, 1);
-
- item->filename = gnome_vfs_unescape_string_for_display (filename);
-
- item->fileinfo = gnome_wp_info_new (item->filename, thumbnails);
-
- item->shade_type = gconf_client_get_string (client, WP_SHADING_KEY, NULL);
- item->pri_color = gconf_client_get_string (client, WP_PCOLOR_KEY, NULL);
- item->sec_color = gconf_client_get_string (client, WP_SCOLOR_KEY, NULL);
-
- gdk_color_parse (item->pri_color, &color1);
- gdk_color_parse (item->sec_color, &color2);
-
- item->pcolor = gdk_color_copy (&color1);
- item->scolor = gdk_color_copy (&color2);
-
- if (item->fileinfo != NULL &&
- !strncmp (item->fileinfo->mime_type, "image/", strlen ("image/"))) {
- if (item->name == NULL) {
- item->name = g_strdup (item->fileinfo->name);
- }
- item->options = gconf_client_get_string (client, WP_OPTIONS_KEY, NULL);
-
- if (!strcmp (item->options, "none")) {
- item->options = g_strdup ("scaled");
- }
- gnome_wp_item_update_description (item);
-
- g_hash_table_insert (wallpapers, g_strdup (item->filename), item);
- } else {
- gnome_wp_item_free (item);
- item = NULL;
- }
-
- g_object_unref (client);
-
- return item;
-}
-
-void gnome_wp_item_free (GnomeWPItem * item) {
- if (item == NULL) {
- return;
- }
-
- g_free (item->name);
- g_free (item->filename);
- g_free (item->description);
- g_free (item->imguri);
- g_free (item->options);
- g_free (item->shade_type);
-
- g_free (item->pri_color);
- g_free (item->sec_color);
-
- if (item->pcolor != NULL)
- gdk_color_free (item->pcolor);
-
- if (item->scolor != NULL)
- gdk_color_free (item->scolor);
-
- gnome_wp_info_free (item->fileinfo);
- gnome_wp_info_free (item->uriinfo);
-
- gtk_tree_row_reference_free (item->rowref);
-
- item = NULL;
-}
-
-static void collect_save_options (GdkPixbuf * pixbuf,
- gchar *** keys,
- gchar *** vals,
- gint width,
- gint height) {
- gchar ** options;
- gint n, count;
-
- count = 0;
-
- options = g_object_get_qdata (G_OBJECT (pixbuf),
- g_quark_from_static_string ("gdk_pixbuf_options"));
- if (options) {
- for (n = 0; options[2 * n]; n++) {
- ++count;
-
- *keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
- *vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
-
- (*keys)[count - 1] = g_strdup (options[2 * n]);
- (*vals)[count - 1] = g_strdup (options[2 * n + 1]);
-
- (*keys)[count] = NULL;
- (*vals)[count] = NULL;
- }
- }
- ++count;
-
- *keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
- *vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
-
- (*keys)[count - 1] = g_strdup ("tEXt::Thumb::Image::Width");
- (*vals)[count - 1] = g_strdup_printf ("%d", width);
-
- (*keys)[count] = NULL;
- (*vals)[count] = NULL;
-
- ++count;
-
- *keys = g_realloc (*keys, sizeof (gchar *) * (count + 1));
- *vals = g_realloc (*vals, sizeof (gchar *) * (count + 1));
-
- (*keys)[count - 1] = g_strdup ("tEXt::Thumb::Image::Height");
- (*vals)[count - 1] = g_strdup_printf ("%d", height);
-
- (*keys)[count] = NULL;
- (*vals)[count] = NULL;
-}
-
-#define LIST_IMAGE_WIDTH 64
-
-GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
- GnomeThumbnailFactory * thumbs) {
- GdkPixbuf * pixbuf, * bgpixbuf;
- GdkPixbuf * tmpbuf;
- GdkPixbuf * scaled = NULL;
- gint sw, sh, bw, bh, pw, ph, tw, th;
- gdouble ratio;
-
- sw = sh = bw = bh = pw = ph = tw = th = 0;
-
- /*
- Get the size of the screen and calculate our aspect ratio divisor
- We do this, so that images are thumbnailed as they would look on
- the screen in reality
- */
- sw = gdk_screen_get_width (gdk_screen_get_default ());
- sh = gdk_screen_get_height (gdk_screen_get_default ());
- ratio = (gdouble) sw / (gdouble) LIST_IMAGE_WIDTH;
- bw = sw / ratio;
- bh = sh / ratio;
-
- /*
- Create the pixbuf for the background colors, which will show up for
- oddly sized images, smaller images that are centered, or alpha images
- */
- if (!strcmp (item->shade_type, "solid")) {
- bgpixbuf = gnome_wp_pixbuf_new_solid (item->pcolor, bw, bh);
- } else if (!strcmp (item->shade_type, "vertical-gradient")) {
- bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_VERTICAL,
- item->pcolor, item->scolor,
- bw, bh);
- } else {
- bgpixbuf = gnome_wp_pixbuf_new_gradient (GTK_ORIENTATION_HORIZONTAL,
- item->pcolor, item->scolor,
- bw, bh);
- }
-
- /*
- Load up the thumbnail image using the thumbnail spec
- If the image doesn't exist, we create it
- If we are creating the thumbnail for "No Wallpaper", then we just copy
- the background colors pixbuf we created above, here
- */
- if (item->fileinfo->thumburi != NULL &&
- g_file_test (item->fileinfo->thumburi, G_FILE_TEST_EXISTS)) {
- pixbuf = gdk_pixbuf_new_from_file (item->fileinfo->thumburi, NULL);
- } else if (!strcmp (item->filename, "(none)")) {
- return bgpixbuf;
- } else {
- pixbuf = gnome_thumbnail_factory_generate_thumbnail (thumbs,
- gnome_vfs_escape_path_string (item->filename),
- item->fileinfo->mime_type);
- gnome_thumbnail_factory_save_thumbnail (thumbs, pixbuf,
- gnome_vfs_escape_path_string (item->filename),
- item->fileinfo->mtime);
- g_object_unref (pixbuf);
- pixbuf = gdk_pixbuf_new_from_file (item->fileinfo->thumburi, NULL);
- }
-
- if (pixbuf != NULL) {
- const gchar * w_val, * h_val;
-
- w_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Width");
- h_val = gdk_pixbuf_get_option (pixbuf, "tEXt::Thumb::Image::Height");
- if (item->width <= 0 || item->height <= 0) {
- if (w_val && h_val) {
- item->width = atoi (w_val);
- item->height = atoi (h_val);
- } else {
- gchar ** keys = NULL;
- gchar ** vals = NULL;
-
- tmpbuf = gdk_pixbuf_new_from_file (item->filename, NULL);
-
- item->width = gdk_pixbuf_get_width (tmpbuf);
- item->height = gdk_pixbuf_get_height (tmpbuf);
-
- collect_save_options (pixbuf, &keys, &vals, item->width, item->height);
- gdk_pixbuf_savev (pixbuf, item->fileinfo->thumburi, "png",
- keys, vals, NULL);
-
- g_object_unref (tmpbuf);
- g_strfreev (keys);
- g_strfreev (vals);
- }
- }
-
- pw = gdk_pixbuf_get_width (pixbuf);
- ph = gdk_pixbuf_get_height (pixbuf);
-
- if (item->width <= bw && item->height <= bh)
- ratio = 1.0;
-
- tw = item->width / ratio;
- th = item->height / ratio;
-
- if (!strcmp (item->options, "wallpaper")) {
- scaled = gnome_wp_pixbuf_tile (pixbuf, bgpixbuf, tw, th);
- } else if (!strcmp (item->options, "centered")) {
- scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
- } else if (!strcmp (item->options, "stretched")) {
- scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, bw, bh);
- } else if (!strcmp (item->options, "scaled")) {
- if ((gdouble) ph * (gdouble) bw > (gdouble) pw * (gdouble) bh) {
- tw = 0.5 + (gdouble) pw * (gdouble) bh / (gdouble) ph;
- th = bh;
- } else {
- th = 0.5 + (gdouble) ph * (gdouble) bw / (gdouble) pw;
- tw = bw;
- }
- scaled = gnome_wp_pixbuf_center (pixbuf, bgpixbuf, tw, th);
- }
- }
-
- g_object_unref (pixbuf);
- g_object_unref (bgpixbuf);
-
- return scaled;
-}
-
-void gnome_wp_item_update_description (GnomeWPItem * item) {
-
- if (!strcmp (item->filename, "(none)")) {
- item->description = g_strdup_printf ("<b>%s</b>", item->name);
- } else {
- gchar * info;
-
- info = g_strdup_printf ("%s, %d %s x %d %s",
- gnome_vfs_mime_get_description (item->fileinfo->mime_type),
- item->width,
- ngettext ("pixel", "pixels", item->width),
- item->height,
- ngettext ("pixel", "pixels", item->height));
-
- item->description = g_markup_printf_escaped ("<b>%s</b>\n"
- "%s",
- item->name,
- info);
-
- g_free (info);
- }
-}
diff --git a/capplets/background/gnome-wp-item.h b/capplets/background/gnome-wp-item.h
deleted file mode 100644
index 51df776d1..000000000
--- a/capplets/background/gnome-wp-item.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include <glib.h>
-#include <gdk-pixbuf/gdk-pixbuf.h>
-#include <gtk/gtktreeview.h>
-#include <libgnomeui/gnome-thumbnail.h>
-#include <gnome-wp-info.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-#ifndef _GNOME_WP_ITEM_H_
-#define _GNOME_WP_ITEM_H_
-
-typedef struct _GnomeWPItem GnomeWPItem;
-
-struct _GnomeWPItem {
- gchar * name;
- gchar * filename;
- gchar * description;
- gchar * imguri;
- gchar * options;
- gchar * shade_type;
- gchar * pri_color;
- gchar * sec_color;
-
- /* Where the Item is in the List */
- GtkTreeRowReference * rowref;
-
- /* Real colors */
- GdkColor * pcolor;
- GdkColor * scolor;
-
- GnomeWPInfo * fileinfo;
- GnomeWPInfo * uriinfo;
-
- /* Did the user remove us? */
- gboolean deleted;
-
- /* Width and Height of the original image */
- gint width;
- gint height;
-};
-
-GnomeWPItem * gnome_wp_item_new (const gchar * filename,
- GHashTable * wallpapers,
- GnomeThumbnailFactory * thumbnails);
-void gnome_wp_item_free (GnomeWPItem * item);
-GdkPixbuf * gnome_wp_item_get_thumbnail (GnomeWPItem * item,
- GnomeThumbnailFactory * thumbs);
-void gnome_wp_item_update_description (GnomeWPItem * item);
-
-#endif
-
diff --git a/capplets/background/gnome-wp-utils.c b/capplets/background/gnome-wp-utils.c
deleted file mode 100644
index 08e765a18..000000000
--- a/capplets/background/gnome-wp-utils.c
+++ /dev/null
@@ -1,198 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include "gnome-wp-utils.h"
-#include <string.h>
-
-GdkPixbuf * gnome_wp_pixbuf_new_gradient (GtkOrientation orientation,
- GdkColor * c1,
- GdkColor * c2,
- gint width, gint height) {
- GdkPixbuf * pixbuf;
- gint i, j;
- gint dr, dg, db;
- gint gs1;
- gint vc = ((orientation == GTK_ORIENTATION_HORIZONTAL) || (c1 == c2));
- guchar * b, * row, * d;
- int rowstride;
-
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
- d = gdk_pixbuf_get_pixels (pixbuf);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
-
- dr = c2->red - c1->red;
- dg = c2->green - c1->green;
- db = c2->blue - c1->blue;
-
- gs1 = (orientation == GTK_ORIENTATION_VERTICAL) ? height - 1 : width - 1;
-
- row = g_new (unsigned char, rowstride);
-
- if (vc) {
- b = row;
- for (j = 0; j < width; j++) {
- *b++ = (c1->red + (j * dr) / gs1) >> 8;
- *b++ = (c1->green + (j * dg) / gs1) >> 8;
- *b++ = (c1->blue + (j * db) / gs1) >> 8;
- }
- }
-
- for (i = 0; i < height; i++) {
- if (!vc) {
- unsigned char cr, cg, cb;
- cr = (c1->red + (i * dr) / gs1) >> 8;
- cg = (c1->green + (i * dg) / gs1) >> 8;
- cb = (c1->blue + (i * db) / gs1) >> 8;
- b = row;
- for (j = 0; j < width; j++) {
- *b++ = cr;
- *b++ = cg;
- *b++ = cb;
- }
- }
- memcpy (d, row, width * 3);
- d += rowstride;
- }
- g_free (row);
-
- return pixbuf;
-}
-
-GdkPixbuf * gnome_wp_pixbuf_new_solid (GdkColor * color,
- gint width, gint height) {
- GdkPixbuf * pixbuf;
- gint j, rowstride;
- guchar * b, * d, * row;
-
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, width, height);
- d = gdk_pixbuf_get_pixels (pixbuf);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
-
- row = g_new (unsigned char, rowstride);
-
- b = row;
- for (j = 0; j < width; j++) {
- *b++ = color->red >> 8;
- *b++ = color->green >> 8;
- *b++ = color->blue >> 8;
- }
-
- for (j = 0; j < height; j++) {
- memcpy (d, row, width * 3);
- d += rowstride;
- }
-
- g_free (row);
-
- return pixbuf;
-}
-
-GdkPixbuf * gnome_wp_pixbuf_tile (GdkPixbuf * src_pixbuf,
- GdkPixbuf * dest_pixbuf,
- gint scaled_width,
- gint scaled_height) {
- GdkPixbuf * tmpbuf;
- gdouble cx, cy;
- gint dwidth, dheight;
- gint swidth, sheight;
- guint alpha = 255;
-
- if (dest_pixbuf == NULL) {
- return gdk_pixbuf_copy (src_pixbuf);
- }
-
- tmpbuf = gdk_pixbuf_scale_simple (src_pixbuf, scaled_width, scaled_height,
- GDK_INTERP_BILINEAR);
-
- swidth = gdk_pixbuf_get_width (tmpbuf);
- sheight = gdk_pixbuf_get_height (tmpbuf);
-
- dwidth = gdk_pixbuf_get_width (dest_pixbuf);
- dheight = gdk_pixbuf_get_height (dest_pixbuf);
-
- for (cy = 0; cy < dheight; cy += sheight) {
- for (cx = 0; cx < dwidth; cx += swidth) {
- gdk_pixbuf_composite (tmpbuf, dest_pixbuf, cx, cy,
- MIN (swidth, dwidth - cx),
- MIN (sheight, dheight - cy),
- cx, cy, 1.0, 1.0,
- GDK_INTERP_BILINEAR, alpha);
- }
- }
- g_object_unref (tmpbuf);
-
- return gdk_pixbuf_copy (dest_pixbuf);
-}
-
-GdkPixbuf * gnome_wp_pixbuf_center (GdkPixbuf * src_pixbuf,
- GdkPixbuf * dest_pixbuf,
- gint scaled_width,
- gint scaled_height) {
- GdkPixbuf * tmpbuf;
- gint ox, oy, cx, cy;
- gint dwidth, dheight;
- gint swidth, sheight;
- gint cwidth, cheight;
- guint alpha = 255;
-
- if (dest_pixbuf == NULL) {
- return gdk_pixbuf_copy (src_pixbuf);
- }
-
- ox = cx = oy = cy = 0;
-
- tmpbuf = gdk_pixbuf_scale_simple (src_pixbuf, scaled_width, scaled_height,
- GDK_INTERP_BILINEAR);
-
- swidth = gdk_pixbuf_get_width (tmpbuf);
- sheight = gdk_pixbuf_get_height (tmpbuf);
-
- dwidth = gdk_pixbuf_get_width (dest_pixbuf);
- dheight = gdk_pixbuf_get_height (dest_pixbuf);
-
- if (dwidth > swidth) {
- ox = (dwidth - swidth) / 2;
- cx = 0;
- cwidth = swidth;
- } else {
- cx = (swidth - dwidth) / 2;
- oy = 0;
- cwidth = dwidth;
- }
-
- if (dheight > sheight) {
- oy = ((dheight - sheight) / 2);
- cy = 0;
- cheight = sheight;
- } else {
- cy = (sheight - dheight) / 2;
- oy = 0;
- cheight = dheight;
- }
-
- gdk_pixbuf_composite (tmpbuf, dest_pixbuf, ox, oy,
- cwidth, cheight,
- ox - cx, oy - cy, 1.0, 1.0,
- GDK_INTERP_BILINEAR, alpha);
-
- g_object_unref (tmpbuf);
- return gdk_pixbuf_copy (dest_pixbuf);
-}
-
diff --git a/capplets/background/gnome-wp-utils.h b/capplets/background/gnome-wp-utils.h
deleted file mode 100644
index 0c82726f7..000000000
--- a/capplets/background/gnome-wp-utils.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _GNOME_WP_UTILS_H_
-#define _GNOME_WP_UTILS_H_
-
-#include <glib.h>
-#include <gtk/gtk.h>
-
-#define WP_PATH_KEY "/desktop/gnome/background"
-#define WP_FILE_KEY WP_PATH_KEY "/picture_filename"
-#define WP_OPTIONS_KEY WP_PATH_KEY "/picture_options"
-#define WP_SHADING_KEY WP_PATH_KEY "/color_shading_type"
-#define WP_PCOLOR_KEY WP_PATH_KEY "/primary_color"
-#define WP_SCOLOR_KEY WP_PATH_KEY "/secondary_color"
-#define WP_KEYBOARD_PATH "/desktop/gnome/peripherals/keyboard"
-#define WP_DELAY_KEY WP_KEYBOARD_PATH "/delay"
-
-G_BEGIN_DECLS
-
-GdkPixbuf * gnome_wp_pixbuf_new_gradient (GtkOrientation orientation,
- GdkColor * c1,
- GdkColor * c2,
- gint width, gint height);
-
-GdkPixbuf * gnome_wp_pixbuf_new_solid (GdkColor * color,
- gint width, gint height);
-
-GdkPixbuf * gnome_wp_pixbuf_tile (GdkPixbuf * src_pixbuf,
- GdkPixbuf * dest_pixbuf,
- gint scaled_width,
- gint scaled_height);
-
-GdkPixbuf * gnome_wp_pixbuf_center (GdkPixbuf * src_pixbuf,
- GdkPixbuf * dest_pixbuf,
- gint scaled_width,
- gint scaled_height);
-
-G_END_DECLS
-
-#endif
diff --git a/capplets/background/gnome-wp-xml.c b/capplets/background/gnome-wp-xml.c
deleted file mode 100644
index d2e7d2dca..000000000
--- a/capplets/background/gnome-wp-xml.c
+++ /dev/null
@@ -1,375 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#include "gnome-wp-capplet.h"
-
-static gboolean gnome_wp_xml_get_bool (const xmlNode * parent,
- const gchar * prop_name) {
- gchar * prop;
- gboolean ret_val = FALSE;
-
- g_return_val_if_fail (parent != NULL, FALSE);
- g_return_val_if_fail (prop_name != NULL, FALSE);
-
- prop = xmlGetProp ((xmlNode *) parent, prop_name);
- if (prop != NULL) {
- if (!g_strcasecmp (prop, "true") || !g_strcasecmp (prop, "1")) {
- ret_val = TRUE;
- } else {
- ret_val = FALSE;
- }
- g_free (prop);
- }
-
- return ret_val;
-}
-
-static void gnome_wp_xml_set_bool (const xmlNode * parent,
- const gchar * prop_name, gboolean value) {
- g_return_if_fail (parent != NULL);
- g_return_if_fail (prop_name != NULL);
-
- if (value) {
- xmlSetProp ((xmlNode *) parent, prop_name, "true");
- } else {
- xmlSetProp ((xmlNode *) parent, prop_name, "false");
- }
-}
-
-static void gnome_wp_load_legacy (GnomeWPCapplet * capplet) {
- FILE * fp;
- gchar * foo, * filename;
-
- filename = g_build_filename (g_get_home_dir (), ".gnome2",
- "wallpapers.list", NULL);
-
- if (g_file_test (filename, G_FILE_TEST_EXISTS)) {
- if ((fp = fopen (filename, "r")) != NULL) {
- foo = (gchar *) g_malloc (sizeof (gchar) * 4096);
- while (fgets (foo, 4096, fp)) {
- GnomeWPItem * item;
-
- if (foo[strlen (foo) - 1] == '\n') {
- foo[strlen (foo) - 1] = '\0';
- }
-
- item = g_hash_table_lookup (capplet->wphash, foo);
- if (item != NULL) {
- continue;
- }
-
- if (!g_file_test (foo, G_FILE_TEST_EXISTS)) {
- continue;
- }
-
- item = gnome_wp_item_new (foo, capplet->wphash, capplet->thumbs);
- if (item != NULL && item->fileinfo == NULL) {
- gnome_wp_item_free (item);
- }
- }
- fclose (fp);
- g_free (foo);
- }
- }
-}
-
-static void gnome_wp_xml_load_xml (GnomeWPCapplet * capplet,
- const gchar * filename) {
- xmlDoc * wplist;
- xmlNode * root, * list, * wpa;
- gchar * nodelang;
- const gchar * const * syslangs;
- GdkColor color1, color2;
- GnomeWPItem * item;
- gint i;
-
-#if GLIB_CHECK_VERSION (2, 6, 0)
- syslangs = g_get_language_names ();
-#endif
-
- wplist = xmlParseFile (filename);
-
- root = xmlDocGetRootElement (wplist);
-
- for (list = root->children; list != NULL; list = list->next) {
- if (!strcmp (list->name, "wallpaper")) {
- GnomeWPItem * wp;
-
- wp = g_new0 (GnomeWPItem, 1);
-
- wp->deleted = gnome_wp_xml_get_bool (list, "deleted");
-
- for (wpa = list->children; wpa != NULL; wpa = wpa->next) {
- if (!strcmp (wpa->name, "filename")) {
- if (wpa->last != NULL && wpa->last->content != NULL) {
- wp->filename = g_strdup (g_strstrip (wpa->last->content));
- } else {
- break;
- }
- } else if (!strcmp (wpa->name, "name")) {
- if (wpa->last != NULL && wpa->last->content != NULL) {
- nodelang = xmlNodeGetLang (wpa->last);
-
- if (wp->name == NULL && nodelang == NULL) {
- wp->name = g_strdup (g_strstrip (wpa->last->content));
- } else {
- for (i = 0; syslangs[i] != NULL; i++) {
- if (!strcmp (syslangs[i], nodelang)) {
- wp->name = g_strdup (g_strstrip (wpa->last->content));
- }
- }
- }
-
- xmlFree (nodelang);
- } else {
- break;
- }
- } else if (!strcmp (wpa->name, "imguri")) {
- if (wpa->last != NULL) {
- wp->imguri = g_strdup (g_strstrip (wpa->last->content));
- }
- } else if (!strcmp (wpa->name, "options")) {
- if (wpa->last != NULL) {
- wp->options = g_strdup (g_strstrip (wpa->last->content));
- } else {
- wp->options = gconf_client_get_string (capplet->client,
- WP_OPTIONS_KEY, NULL);
- }
- } else if (!strcmp (wpa->name, "shade_type")) {
- if (wpa->last != NULL) {
- wp->shade_type = g_strdup (g_strstrip (wpa->last->content));
- }
- } else if (!strcmp (wpa->name, "pcolor")) {
- if (wpa->last != NULL) {
- wp->pri_color = g_strdup (g_strstrip (wpa->last->content));
- }
- } else if (!strcmp (wpa->name, "scolor")) {
- if (wpa->last != NULL) {
- wp->sec_color = g_strdup (g_strstrip (wpa->last->content));
- }
- } else if (!strcmp (wpa->name, "text")) {
- /* Do nothing here, libxml2 is being weird */
- } else {
- g_warning ("Unknown Tag: %s\n", wpa->name);
- }
- }
-
- /* Make sure we don't already have this one and that filename exists */
- if (wp->filename != NULL) {
- item = g_hash_table_lookup (capplet->wphash, wp->filename);
-
- if (item != NULL) {
- gnome_wp_item_free (wp);
- continue;
- }
- } else {
- continue;
- }
-
- /* Verify the colors and alloc some GdkColors here */
- if (wp->shade_type == NULL) {
- wp->shade_type = gconf_client_get_string (capplet->client,
- WP_SHADING_KEY, NULL);
- }
- if (wp->pri_color == NULL) {
- wp->pri_color = gconf_client_get_string (capplet->client,
- WP_PCOLOR_KEY, NULL);
- }
- if (wp->sec_color == NULL) {
- wp->sec_color = gconf_client_get_string (capplet->client,
- WP_SCOLOR_KEY, NULL);
- }
- gdk_color_parse (wp->pri_color, &color1);
- gdk_color_parse (wp->sec_color, &color2);
-
- wp->pcolor = gdk_color_copy (&color1);
- wp->scolor = gdk_color_copy (&color2);
-
- if ((wp->filename != NULL &&
- g_file_test (wp->filename, G_FILE_TEST_EXISTS)) ||
- !strcmp (wp->filename, "(none)")) {
- wp->fileinfo = gnome_wp_info_new (wp->filename, capplet->thumbs);
-
- if (wp->name == NULL || !strcmp (wp->filename, "(none)")) {
- wp->name = g_strdup (wp->fileinfo->name);
- }
-
- gnome_wp_item_update_description (wp);
- g_hash_table_insert (capplet->wphash, g_strdup (wp->filename), wp);
- } else {
- gnome_wp_item_free (wp);
- }
- }
- }
- xmlFreeDoc (wplist);
-}
-
-static void gnome_wp_file_changed (GnomeVFSMonitorHandle * handle,
- const gchar * monitor_uri,
- const gchar * info_uri,
- GnomeVFSMonitorEventType event_type,
- GnomeWPCapplet * capplet) {
- gchar * filename;
-
- switch (event_type) {
- case GNOME_VFS_MONITOR_EVENT_CHANGED:
- case GNOME_VFS_MONITOR_EVENT_CREATED:
- filename = gnome_vfs_get_local_path_from_uri (info_uri);
- gnome_wp_xml_load_xml (capplet, filename);
- g_free (filename);
- default:
- break;
- }
-}
-
-void gnome_wp_xml_load_list (GnomeWPCapplet * capplet) {
- GnomeVFSMonitorHandle * handle;
- GList * list, * l;
- gchar * wpdbfile, * xdgdirslist;
- gchar ** xdgdirs;
- gint i;
-
- wpdbfile = g_build_filename (g_get_home_dir (),
- ".gnome2",
- "backgrounds.xml",
- NULL);
-
- if (g_file_test (wpdbfile, G_FILE_TEST_EXISTS)) {
- gnome_wp_xml_load_xml (capplet, wpdbfile);
- } else {
- wpdbfile = g_build_filename (g_get_home_dir (),
- ".gnome2",
- "wp-list.xml",
- NULL);
- if (g_file_test (wpdbfile, G_FILE_TEST_EXISTS)) {
- gnome_wp_xml_load_xml (capplet, wpdbfile);
- }
- }
- g_free (wpdbfile);
-
- xdgdirslist = g_strdup (g_getenv ("XDG_DATA_DIRS"));
- if (xdgdirslist == NULL || strlen (xdgdirslist) == 0)
- xdgdirslist = g_strdup ("/usr/local/share:/usr/share");
-
- xdgdirs = g_strsplit (xdgdirslist, ":", -1);
- for (i = 0; xdgdirs && xdgdirs[i]; i++) {
- gchar * datadir;
-
- datadir = g_build_filename (xdgdirs[i], "gnome-background-properties",
- NULL);
- if (g_file_test (datadir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
- gnome_vfs_directory_list_load (&list, datadir,
- GNOME_VFS_FILE_INFO_DEFAULT |
- GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
-
- for (l = list; l != NULL; l = l->next) {
- GnomeVFSFileInfo * info = l->data;
-
- if (strcmp (".", info->name) != 0 && strcmp ("..", info->name) != 0) {
- gchar * filename;
-
- filename = g_build_filename (datadir, info->name, NULL);
- gnome_wp_xml_load_xml (capplet, filename);
- g_free (filename);
- }
- }
- g_list_free (list);
-
- gnome_vfs_monitor_add (&handle, datadir, GNOME_VFS_MONITOR_DIRECTORY,
- (GnomeVFSMonitorCallback) gnome_wp_file_changed,
- capplet);
- }
- g_free (datadir);
- }
- g_strfreev (xdgdirs);
- g_free (xdgdirslist);
-
- if (g_file_test (WALLPAPER_DATADIR, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) {
- gnome_vfs_directory_list_load (&list, WALLPAPER_DATADIR,
- GNOME_VFS_FILE_INFO_DEFAULT |
- GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
-
- for (l = list; l != NULL; l = l->next) {
- GnomeVFSFileInfo * info = l->data;
-
- if (strcmp (".", info->name) != 0 && strcmp ("..", info->name) != 0) {
- gchar * filename;
-
- filename = g_build_filename (WALLPAPER_DATADIR, info->name, NULL);
- gnome_wp_xml_load_xml (capplet, filename);
- g_free (filename);
- }
- }
- g_list_free (list);
-
- gnome_vfs_monitor_add (&handle, WALLPAPER_DATADIR, GNOME_VFS_MONITOR_DIRECTORY,
- (GnomeVFSMonitorCallback) gnome_wp_file_changed,
- capplet);
- }
-
- gnome_wp_load_legacy (capplet);
-}
-
-static void gnome_wp_list_flatten (const gchar * key, GnomeWPItem * item,
- GList ** list) {
- g_return_if_fail (key != NULL);
- g_return_if_fail (item != NULL);
-
- *list = g_list_append (*list, item);
-}
-
-void gnome_wp_xml_save_list (GnomeWPCapplet * capplet) {
- xmlDoc * wplist;
- xmlNode * root, * wallpaper, * item;
- GList * list = NULL, * wp = NULL;
- gchar * wpfile;
-
- g_hash_table_foreach (capplet->wphash,
- (GHFunc) gnome_wp_list_flatten, &list);
-
- wpfile = g_build_filename (g_get_home_dir (),
- "/.gnome2",
- "backgrounds.xml",
- NULL);
-
- xmlKeepBlanksDefault (0);
-
- wplist = xmlNewDoc ("1.0");
- xmlCreateIntSubset (wplist, "wallpapers", NULL, "gnome-wp-list.dtd");
- root = xmlNewNode (NULL, "wallpapers");
- xmlDocSetRootElement (wplist, root);
-
- for (wp = list; wp != NULL; wp = wp->next) {
- GnomeWPItem * wpitem = wp->data;
-
- wallpaper = xmlNewChild (root, NULL, "wallpaper", NULL);
- gnome_wp_xml_set_bool (wallpaper, "deleted", wpitem->deleted);
- item = xmlNewTextChild (wallpaper, NULL, "name", wpitem->name);
- item = xmlNewTextChild (wallpaper, NULL, "filename", wpitem->filename);
- item = xmlNewTextChild (wallpaper, NULL, "options", wpitem->options);
- item = xmlNewTextChild (wallpaper, NULL, "shade_type", wpitem->shade_type);
- item = xmlNewTextChild (wallpaper, NULL, "pcolor", wpitem->pri_color);
- item = xmlNewTextChild (wallpaper, NULL, "scolor", wpitem->sec_color);
- }
- xmlSaveFormatFile (wpfile, wplist, 1);
- xmlFreeDoc (wplist);
- g_free (wpfile);
-}
-
diff --git a/capplets/background/gnome-wp-xml.h b/capplets/background/gnome-wp-xml.h
deleted file mode 100644
index e5c80f516..000000000
--- a/capplets/background/gnome-wp-xml.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Authors: Rodney Dawes <dobey@ximian.com>
- *
- * Copyright 2003-2005 Novell, Inc. (www.novell.com)
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License
- * as published by the Free Software Foundation
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
- *
- */
-
-#ifndef _GNOME_WP_XML_H_
-#define _GNOME_WP_XML_H_
-
-void gnome_wp_xml_load_list (GnomeWPCapplet * capplet);
-void gnome_wp_xml_save_list (GnomeWPCapplet * capplet);
-
-#endif
-
diff --git a/capplets/common/.cvsignore b/capplets/common/.cvsignore
deleted file mode 100644
index 784cc6632..000000000
--- a/capplets/common/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-.deps
-gnome-theme-test
-stamp-h.in
diff --git a/capplets/common/Bonobo_Control_Capplet_generic.oaf.in b/capplets/common/Bonobo_Control_Capplet_generic.oaf.in
deleted file mode 100644
index 4cef098ad..000000000
--- a/capplets/common/Bonobo_Control_Capplet_generic.oaf.in
+++ /dev/null
@@ -1,21 +0,0 @@
-<oaf_info>
-
-<oaf_server iid="OAFIID:Bonobo_@SHORT_CAPPLET_NAME@_properties_Factory" type="exe"
- location="@BINDIR@/@CAPPLET_BINARY_NAME@">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:GNOME/ObjectFactory:1.0"/>
- </oaf_attribute>
-
- <oaf_attribute name="name" type="string" value="@SHORT_CAPPLET_NAME@ properties capplet factory"/>
-</oaf_server>
-
-<oaf_server iid="OAFIID:Bonobo_Control_Capplet_@SHORT_CAPPLET_NAME@_properties" type="factory"
- location="OAFIID:Bonobo_@SHORT_CAPPLET_NAME@_properties_Factory">
- <oaf_attribute name="repo_ids" type="stringv">
- <item value="IDL:Bonobo/PropertyControl:1.0"/>
- <item value="IDL:Bonobo/Unknown:1.0"/>
- </oaf_attribute>
- <oaf_attribute name="name" type="string" value="@SHORT_CAPPLET_NAME@ capplet"/>
-</oaf_server>
-
-</oaf_info>
diff --git a/capplets/common/ChangeLog b/capplets/common/ChangeLog
deleted file mode 100644
index 712070ee8..000000000
--- a/capplets/common/ChangeLog
+++ /dev/null
@@ -1,810 +0,0 @@
-2005-03-02 Shakti Sen <shprasad@novell.com>
-
- * gnome-theme-info.c (read_icon_theme): Do not add the Icon Theme if
- the key 'Hidden' is 'true' in the index.theme file.
-
- Fixes bug #168348
-
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * gconf-property-editor.c: (peditor_font_value_changed),
- (peditor_font_widget_changed), (gconf_peditor_new_font):
- * gconf-property-editor.h:
- port of the font capplet to gtk_font_button and some cleanup,
- patch from paolo borelli <pborelli@katamail.com> (Closes: #160016).
-
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * theme-thumbnail.c: (create_image): fix the theme preview crasher with
- xorg/composite, patch from Colin Gibbs <colin@gibbsonline.net>
- (Closes: #152490).
-
-2005-02-08 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-info.c: (update_common_theme_dir_index):
- * theme-thumbnail.c: (create_image):
- patch by Kjartan Maraas <kmaraas@gnome.org>, move to use GtkIconTheme
- and remove a load of leaks in the theme manager code (Closes: #166267).
-
-2005-02-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-info.c: (update_theme_index),
- (top_theme_dir_changed), (top_icon_theme_dir_changed),
- (real_add_top_theme_dir_monitor): Revert the previous
- two commits. It looks like the fix in gnome-vfs to make
- sure gnome_vfs_uri_extract_short_name() doesn't return
- NULL was what we really needed. Please retest to see if
- you can still reproduce the crashes in the theme-manager
- after this change and with the latest gnome-vfs from CVS.
-
-2005-02-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-info.c: (update_theme_index),
- (real_add_top_theme_dir_monitor): More bandaids for test
- purposes.
-
-2005-01-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-info.c: (top_theme_dir_changed),
- (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor):
- Try to fix bug #149236 by not freeing stuff already being free'd
- by the hash destroy_func. It will leak a bit more, but that can
- be fixed later. Please test this and report success in the report
- mentioned above.
-
-2005-01-02 Thomas Cataldo <thomas.cataldo@aliacom.fr>
-
- * gconf-property-editor.c: (gconf_property_editor_finalize): plug
- gconf key leak.
-
-2004-11-24 Kjartan Maraas <kmaraas@gnome.org>
-
- * activate-settings-daemon.c: (popup_error_message):
- ANSIfication.
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-07 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=130623
- * capplet-util.c (capplet_set_icon) : respect the icon theme
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-16 Jody Goldberg <jody@gnome.org>
-
- * gconf-property-editor.c (peditor_image_clicked_cb) : Use the monitor
- size kludge for the vertical size of the new file selector.
-
-2003-12-07 Jan Arne Petersen <jpetersen@uni-bonn.de>
-
- * gconf-property-editor.c: (peditor_image_set_filename),
- (peditor_image_chooser_response_cb),
- (peditor_image_chooser_update_preview_cb),
- (peditor_image_clicked_cb): replace
- PreviewFileSelection (GtkFileSelection) with GtkFileChooser, use new
- gdk_pixbuf_new_from_file_at_size method to load a scaled image.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-Thu Aug 7 15:23:08 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gconf-property-editor.c (gconf_property_editor_set_prop): damn
- it Jonathan. Save the @#*&$@# file before committing.
-
-Mon Aug 4 14:35:22 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gconf-property-editor.c (gconf_property_editor_init): Reset the
- old connection when setting a new one, #116232
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-07-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * gconf-property-editor.c: (gconf_property_editor_finalize):
- Merge Anders' fix from stable.
-
-2003-07-02 Mark McLoughlin <mark@skynet.ie>
-
- Handle crashes of the thumbnailer child process a
- little more gracefully.
-
- * theme-thumbnail.c:
- (generate_theme_thumbnail): if we get an EOF from
- the child close the pipe, return NULL and return
- NULL from any subsequent calls.
- (generate_theme_thumbnail_async): return NULL if
- the pipe has been closed.
- (theme_thumbnail_factory_init): set pipe descriptos
- to zero after closing them.
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-13 Andrew Sobala <aes@gnome.org>
-
- * Makefile.am: build fixes for the below
- * gnome-theme-apply.c: pulled out from gnome-theme-manager.c
- * gnome-theme-apply.h: pulled out from gnome-theme-manager.c
- * theme-thumbnail.c: moved to libcommon
- * theme-thumbnail.h: moved to libcommon
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-05-01 Ross Burton <ross@burtonini.com>
-
- * gnome-theme-info.c (real_add_top_theme_dir_monitor):
- Monitor directories and symbolic links instead of just
- directories. Fixes #111990.
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * gconf-property-editor.c: (gconf_peditor_new): Plug a leak
- * gnome-theme-info.c: (top_theme_dir_changed),
- (top_icon_theme_dir_changed), (real_add_top_theme_dir_monitor):
- Plug leaks and fix invalid reads reported by valgrind.
-
-2003-03-27 Andrew Sobala <aes@gnome.org>
-
- * gnome-theme-info.c: (gnome_theme_read_meta_theme),
- (update_common_theme_dir_index):
- s/read_meta_theme/gnome_theme_read_meta_theme/; enable the reading of
- themes that just use [X-GNOME-Metatheme] without pretending to be a
- .desktop file
- * gnome-theme-info.h: exposed gnome_theme_read_meta_theme
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-2003-02-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-info.c (read_meta_theme): Fix a glaring bug
- that caused the theme descriptions etc not to be localised.
- Fix from Dmitry G. Mastrukov <dmitry@taurussoft.org>. Fixes
- #104296
-
-2003-01-27 Bastien Nocera <hadess@hadess.net>
-
- * gnome-theme-test.c: (main): C ninety what ?
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Sun Jan 19 02:14:35 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-test.c (main): add more debugging output.
-
-Thu Jan 16 15:51:33 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-test.c: new little test program for helping people
- debug their installation.
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-Wed Jan 15 20:16:21 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-info.c (remove_data_from_hash_by_name): call
- correctly in all the right places.
-
-Mon Jan 13 15:04:47 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-info.c: rewrote to handle fam more correctly. Still
- a little broken in places, but much, much better than before.
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-28 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * gnome-theme-info.c: (gnome_theme_info_init):
-
- Update icon theme directory code so it looks in
- PREFIX/share/icons rather than PREFIX/share/theme,
- as per freedesktop icon spec.
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-Fri Dec 6 16:13:54 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-info.c (top_theme_dir_changed_callback): I know C.
- Really, I do.
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-Tue Nov 5 15:48:33 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-info.c: Change the file format a bunch.
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-Fri Nov 1 11:03:34 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-info.[ch]: Moved theme-common, and gave more
- features.
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-07-16 Jody Goldberg <jody@gnome.org>
-
- * gconf-property-editor.c (gconf_value_int_to_float) : add a peditor
- arg so that these can be used without wrappers.
- (gconf_value_float_to_int) : ditto.
-
-2002-07-10 Jody Goldberg <jody@gnome.org>
-
- * capplet-util.c (capplet_set_icon) : look in more places.
-
-2002-07-02 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=86018
- * gconf-property-editor.c (peditor_image_set_filename) : Patch from
- Chema. We should only assign the filename to the label if the file
- is valid.
-
-2002-06-27 Jody Goldberg <jody@gnome.org>
-
- * capplet-util.c (capplet_set_icon) : new util.
-
-2002-06-21 Stephen Browne <stephen.browne@sun.com>
-
- * wm-common.[ch] : added new files to expose
- wm_common_get_current_window_manager and
- wm_common_register_window_manager_change
-
-2002-06-13 Jody Goldberg <jody@gnome.org>
-
- * capplet-util.c (capplet_help) : Use the new utility.
- (capplet_error_dialog) : split out into a new utility.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * capplet-util.c : capplet_help () The Help directory is changed to
- user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * capplet-util.c (capplet_help) : new utility.
-
-2002-05-16 jacob berkman <jacob@ximian.com>
-
- * gconf-property-editor.c (peditor_image_set_filename): if we
- haven't been initting, don't pop up an error message. if we are,
- set our image to GTK_STOCK_MISSING_IMAGE. fixes bug exposed by
- fix for #76993
-
-Tue May 14 12:08:17 2002 Jonathan Blandford <jrb@redhat.com>
-
- * theme-common.c (theme_common_init): confirm that the ~/.themes/
- directory exists.
-
-2002-04-29 Rachel Hestilow <hestilow@ximian.com>
-
- * file-transfer-dialog.c (file_transfer_dialog_update_cb):
- Set dialog title to current phase.
-
-2002-04-29 Rachel Hestilow <hestilow@ximian.com>
-
- * file-transfer-dialog.[ch]: Added.
-
- * Makefile.am: Compile file-transfer-dialog.[ch].
-
-2002-04-19 Mark McLoughlin <mark@skynet.ie>
-
- * gconf-property-editor.[ch]: (peditor_integer_value_changed),
- (peditor_integer_widget_changed), (gconf_peditor_new_integer_valist),
- (gconf_peditor_new_integer): implement GtkEntry based integer
- peditor.
-
-2002-04-21 Rachel Hestilow <hestilow@ximian.com>
-
- * gconf-property-editor.c
- (gconf_peditor_new_select_menu_with_enum,
- gconf_peditor_new_enum_toggle,
- gconf_peditor_new_select_radio_with_enum): Add in an explicit
- 'use_nick' parameter. Implicit guessing can break badly if
- the gconf data gets corrupted.
- (peditor_enum_int_from_string): Change use_nick to copy-by-value,
- do not try to guess it.
- (peditor_enum_conv_to_widget, guard_get_bool,
- peditor_enum_toggle_conv_to_widget): Do not pass in use_nick
- as a reference.
-
-Thu Apr 18 17:56:25 2002 Jonathan Blandford <jrb@redhat.com>
-
- * theme-common.c: Notify when the theme changes.
-
-2002-04-18 Jody Goldberg <jody@gnome.org>
-
- * activate-settings-daemon.c (static) : message dialogs must have
- separators.
-
-2002-04-10 Rachel Hestilow <hestilow@ximian.com>
-
- * gconf-proprerty-editor.h: Add FontType enum, and a font_type
- parameter to gconf_peditor_new_font.
-
- * gconf-property-editor.c:
- (peditor_font_value_changed): Call peditor_font_merge_setting
- instead of setting the properties explicitly.
- (peditor_font_widget_changed): Switch on font_type to determine
- what to set for a GConfValue.
-
-2002-03-28 Richard Hestilow <hestilow@ximian.com>
-
- * gconf-property-editor.c (peditor_image_clicked_cb): Set
- fsel to modal, it seems to fix a weird grabbing bug.
-
-2003-03-26 Kjartan Maraas <kmaraas@gnome.org>
-
- * activate-settings-daemon.c: Fix a string.
-
-2002-03-25 Lauris Kaplinski <lauris@ximian.com>
-
- * gconf-property-editor.c (gconf_peditor_widget_set_guard): Test for NULL
- gconf value
-
-2002-03-19 Richard Hestilow <hestilow@ximian.com>
-
- * Makefile.am: Include libbackground (used for preview-file-selector).
- Change into a libtool library so we can link against libbackground.
-
- * gconf-property-editor.c:
- (peditor_enum_int_from_string): Added argument use_nick; set to true
- if the string was a nick.
- (peditor_enum_string_from_int): Use nick only if use_nick is true.
- (gconf_peditor_new_image): Added.
- (gconf_peditor_new_select_radio_with_enum): Added.
- (peditor_select_radio_value_changed): Reverse radio group.
- (peditor_select_radio_widget_changed): Reverse radio group.
-
-2002-03-17 Kjartan Maraas <kmaraas@gnome.org>
-
- * activate-settings-daemon.c: Mark a string. #include <config.h>
-
-2002-03-17 Jonathan Blandford <set EMAIL_ADDRESS environment variable>
-
- reviewed by: <delete if not using a buddy>
-
- * Makefile.am:
- * theme-common.c: (themes_common_list_add_dir),
- (theme_common_get_list), (theme_common_list_free):
- * theme-common.h:
-
-2002-03-14 Richard Hestilow <hestilow@ximian.com>
-
- * gconf-property-editor.c:
- (gconf_property_editor_new_option_menu_with_enum):
- (gconf_property_editor_new_enum_toggle): Added.
- (gconf_property_editor_new): Accept custom arguments from the
- editor "subclass".
- (gconf_property_editor_class_init): Add arguments "data"
- and "data-free-cb", for custom "subclass" data.
- (gconf_property_editor_finalize): Free custom data.
- (*_new): Add NULL at the end of gconf_property_editor_new.
- (guard_value_changed, peditor_widget_set_guard): Use the
- enum->boolean mapping if the gconf value is a string.
-
-2002-03-10 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * activate-settings-daemon.c: (popup_error_message),
- (activate_settings_daemon):
- * activate-settings-daemon.h:
-
- Add new client interface for activating the settings daemon
- if its not already running.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * capplet-util.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-12 Lauris Kaplinski <lauris@ximian.com>
-
- * gconf-property-editor.c (peditor_font_value_changed): Kill warning
-
-2002-02-10 Richard Hestilow <hestilow@ximian.com>
-
- * gconf-property-editor.[ch]: Added font editor.
-
-Sun Jan 6 02:52:59 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gconf-property-editor.c (peditor_select_radio_widget_changed):
- avoid recursive loops by only setting the UI if we're active.
-
-2002-01-05 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (peditor_*_value_changed): Only remove
- from changeset if the changeset is non-NULL
-
-2002-01-04 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (peditor_set_gconf_value):
- Implement. Sets the GConf value either in the changeset, or if
- changeset is NULL, directly
- (peditor_*_widget_changed): Use peditor_set_gconf_value
- (gconf_peditor_new_*): Don't complain if changeset is NULL
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c: Eliminate compiler warnings
-
- * capplet-util.c: Eliminate compiler warnings
-
- * gconf-property-editor.c (gconf_peditor_new): Fold the callback
- back in; accept variable argument list with extra parameters
- (gconf_peditor_new_filename): Return the property editor
- (gconf_peditor_new_string_valist): Split this out
- (gconf_peditor_new_string): Call _valist variant
- (gconf_peditor_new*): Update
-
-2001-12-19 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (gconf_peditor_new_float_range)
- (gconf_peditor_new_int_range): Connect to value_changed signal Add
- properties conv-{to|from}-widget-cb and use those for conversion
- of values to and from the widget
- (peditor_{int|float}_range_value_changed, friends): Combine into
- peditor_numeric_*
- (gconf_peditor_new): Implement. Factor out some common code from
- the various type-specific constructors
- (peditor_*_value_changed): Don't check if the value is the same as
- what is already in the widget; it's not very important
- (peditor_*_value_changed): Remove the key from the changeset
- (gconf_peditor_new_*): Add g_return_val_if_fail macros
- (gconf_peditor_widget_set_guard): Add g_return_if_fail macros
- (gconf_value_float_to_int, gconf_value_int_to_float): Implement
- (gconf_property_editor_set_prop): Store the callback in the
- property editor proper
- (gconf_peditor_new): Put initialization code in an idle handler
- (peditor_string_value_changed): Free the value created from
- conversion
- (init_widget_cb): Return FALSE
- (peditor_*_widget_changed): Just return if we are not fully
- initialized
- (init_widget_cb): Set initialized flag
- (struct _GConfPropertyEditorPrivate): Add inited
-
- * gconf-property-editor.c: Add ui-control property storing the
- object (normally a widget) that controls the property; remove
- object property and replace its function with ui-control
-
- * capplet-util.c: Comment out most of this file
-
- * gconf-property-editor.c (gconf_peditor_new_int_range): Convert
- to ~_float_range
- (gconf_peditor_new_float_range): Add callbacks for conversion
- between widget's values and GConf values in the signature
- (peditor_float_range_widget_changed): Issue callback, if
- available, to convert from widget's values to GConf values
- (peditor_float_range_value_changed): Vice verca above
- (gconf_peditor_new_int_range, peditor_int_range_widget_changed)
- (peditor_int_range_value_changed): Implement. Copy from float
- versions
-
-2001-12-18 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.h: Don't #include bonobo*.h
-
- * gconf-property-editor.c (peditor_string_widget_changed): Use
- actual signature for the changed signal Use gconf_client rather
- than gconf_engine
- (gconf_property_editor_set_prop): Use weak_ref rather than destroy
- signal
- (peditor_int_range_value_changed)
- (peditor_int_range_widget_changed, gconf_peditor_new_int_range):
- Implement
-
-2001-12-17 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (peditor_color_value_changed): Use a
- local stack variable for the color rather than a pointer. Duh.
- (peditor_select_menu_widget_changed): Use
- gtk_option_menu_get_history
- (peditor_select_menu_widget_changed): Accept option_menu as
- parameter
- (gconf_peditor_new_select_menu): Connect changed signal rather
- than activate signal on the menu items
- (gconf_property_editor_get_key): Implement
- (peditor_color_widget_changed): Use correct signature for the
- signal handler
- (peditor_select_menu_value_changed): Use
- gtk_option_menu_set_history
- (guard_value_changed, gconf_peditor_widget_set_guard): Implement
- (peditor_string_widget_changed): Work correctly with multiple
- callback signatures
- (gconf_peditor_new_string): Use changed signal
-
-2001-12-08 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (peditor_*_widget_changed): Don't call
- gconf_value_free
-
-2001-12-07 Bradford Hovinen <hovinen@ximian.com>
-
- * gconf-property-editor.c (gconf_property_editor_class_init): Use
- correct ordering of setup
- (gconf_peditor_new_*): Terminate the parameter list passed to
- g_object_new with NULL
- (gconf_property_editor_class_init): Make the changeset property a
- pointer
- (gconf_property_editor_set_prop): Use g_value_get_object for the
- destroy notify object
- (peditor_*_value_changed): Make sure value is non-NULL
-
-2001-11-03 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (libcommon_a_SOURCES): Added gconf-property-editor.[ch]
-
-2001-10-27 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (get_default_moniker): Switch to gconf: moniker
- (capplet_init): Remove legacy file hack
-
-2001-10-18 Bradford Hovinen <hovinen@ximian.com>
-
- * Bonobo_Control_Capplet_generic.oaf.in: Update listener name
-
- * capplet-util.c (create_control_cb): Use correct prefix for listener
-
-2001-10-12 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (get_factory_name): Updated factory name to
- reflect new, expanded roles
-
- * Bonobo_Control_Capplet_generic.oaf.in: Create
-
-2001-09-29 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (create_control_cb): Elimite reference counter --
- it's not necessary
- (create_control_cb): Make this a multi-factory so that we can
- return the listener when needed
- (capplet_init): Set up the listener here rather than in
- get_control_cb; also remove the listener and unref the database
- here
- (quit_cb, real_quit_cb): Remove (thank the gods)
-
-2001-09-28 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (get_default_moniker): Remove -control from the
- end of the string as well as -capplet
- (get_factory_name): Ditto
- (get_property_name): Ditto
-
-2001-09-24 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (legacy_is_modified): Improved error checking and
- cleaned up the logic a bit
-
-2001-09-14 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (set_moniker_cb): Don't call setup_cb after the
- first time
-
-2001-09-03 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (set_moniker_cb): Free the full moniker to
- correct memory leak
- (set_moniker_cb): Disconnect old signal handler
-
-2001-08-20 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (get_default_moniker): Update moniker being used
-
-2001-07-30 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (capplet_init): Don't sync if we need legacy
- values
- (capplet_init): Call setup_session_mgmt if --apply or
- --init-session-settings was passed
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-26 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (capplet_init): Don't sync the database if
- retrieving legacy setings before creating the factory
- (create_control_cb): Create the config database ourselves
- (pf_destroy_cb): Remove evil hackery
- (get_control_cb): Ditto
- (create_control_cb): Support multiple property control objects --
- use a GtkObject called ref_obj to make sure the program quits when
- there are no such objects left
- (capplet_init): Pass default_moniker to factory callback;
- release_unref the db ourselves
- (get_control_cb): Support multiple controls; soak in global
- control and widget variables
- (legacy_is_modified): Remember to unref the property bag
- (quit_cb): Allow being called more than once
- (quit_cb): Unref ref_obj here
- (create_control_cb): Eliminate second signal connection
- (real_quit_cb): Free the pair structure
- (all_done_cb): Implement. Just add gtk_main_quit to the idle
- handler list
- (create_control_cb): Connect destroy signal of ref_obj to
- all_done_cb
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.c (get_control_cb): Set control data on PropertyFrame
- as part of evil hack.
- (quit_cb): Work if called multiple times...also evil.
- (pf_destroy_cb): unref the control...evil evil evil.
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.c: Remove debugging cruft.
- (capplet_init): Check for legacy with --init-session-settings too.
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.[ch] (capplet_init): New argument of legacy files to
- check for changes.
-
- * capplet-util.c (legacy_is_modified): New function that checks
- a legacy file against the archiver modification date.
- (capplet_init): Pass legacy_files to legacy_is_modified, and sync
- our database with the legacy one if one has been.
-
-2001-07-24 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (real_quit_cb): Reenable disabled code
- (quit_cb): Put the db an id objects in a pair structure and pass
- that to the callback
- (real_quit_cb): Extract the db and id objects from the pair
- (create_control_cb): Set up listener for sync event rather than
- change event
-
-2001-07-23 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (set_moniker_cb): Set InvalidValue exception if
- the program could not resolve the moniker
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.c (quit_cb): Add an idle handler to call the real
- quit cb.
- (real_quit_cb): Added, it is what quit_cb used to be.
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (create_control_cb): Use a static variable for
- the control and return NULL if the control was already created
-
-2001-07-18 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (create_control_cb): Store listener id in
- property control
- (quit_cb): Remove listener before releasing database
- (set_moniker_cb): Kill any existing db object in case the moniker
- is set more than once
- (set_moniker_cb): Connect destroy signal on pf to pf_destroy_cb
- (pf_destroy_cb): Implement
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.[ch]: Revert my last proxy-related change.
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * capplet-util.h (CreateDialogFn): Add a PropertyBag argument so
- capplet authors can hook up to the proxy.
-
- * capplet-util.c (get_control_cb): Pass the proxy bag to setup_cb.
- (capplet_init): Don't free default_moniker until after we print it.
-
-2001-07-17 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (capplet_init): Support --init-session-settings
- for compatibility reasons
- (setup_session_mgmt): Implement. Make sure capplet runs the next
- time the user logs in
- (capplet_init): Call setup_session_mgmt for --get-legacy and
- standard execution
- (get_property_name): Implement. Return the property name
- associated with the capplet
- (set_moniker_cb): Use GTK_BIN (pf)->child rather than
- bonobo_control_get_widget
- (get_control_cb): Destroy the property control when the control or
- the widget are destroyed
- (quit_cb): Implement
- (create_control_cb): Connect destroy signal of property control to
- quit_cb
- (get_factory_name):
- (get_default_moniker):
- (get_property_name): Use correct names when the full path was
- specified for the executable
-
- * Makefile.am (INCLUDES): Removed -DGLADE_DATADIR
-
- * capplet-util.c (create_dialog_cb): Use create_widget_cb rather
- than loading from Glade
- (capplet_init): Accept CreateDialogFn and initialize
- create_dialog_cb
- (close_cb): Don't call gtk_object_destroy (dialog)
- (get_control_cb): Rename from create_dialog_cb
-
-2001-07-14 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * .cvsignore: ssshhhh
-
-2001-07-13 Bradford Hovinen <hovinen@ximian.com>
-
- * capplet-util.c (create_dialog_cb): Return NULL in the case that
- the control is already present
-
diff --git a/capplets/common/Makefile.am b/capplets/common/Makefile.am
deleted file mode 100644
index 1c4715ff7..000000000
--- a/capplets/common/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-EXTRA_DIST = ChangeLog wrapper-script.in Bonobo_Control_Capplet_generic.oaf.in
-
-INCLUDES = \
- -DGNOMELOCALEDIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
- -DGNOME_ICONDIR=\""${prefix}/share/pixmaps"\" \
- -DG_LOG_DOMAIN=\"capplet-common\" \
- -DINSTALL_PREFIX=\"$(prefix)\" \
- -I$(top_srcdir)/libbackground \
- -I$(top_srcdir)/libwindow-settings \
- @VFS_CAPPLET_CFLAGS@ \
- @GNOME_DESKTOP_CFLAGS@ \
- @METACITY_CFLAGS@
-
-
-noinst_LTLIBRARIES = libcommon.la
-
-libcommon_la_SOURCES = \
- activate-settings-daemon.c activate-settings-daemon.h \
- capplet-util.c capplet-util.h \
- gconf-property-editor.c gconf-property-editor.h \
- gconf-property-editor-marshal.c gconf-property-editor-marshal.h \
- file-transfer-dialog.c file-transfer-dialog.h \
- gnome-theme-info.c gnome-theme-info.h \
- wm-common.c wm-common.h \
- capplet-stock-icons.c capplet-stock-icons.h \
- theme-thumbnail.c theme-thumbnail.h \
- gnome-theme-apply.c gnome-theme-apply.h
-
-libcommon_la_LIBADD = $(top_builddir)/libbackground/libbackground.la \
- $(top_builddir)/libwindow-settings/libgnome-window-settings.la \
- @METACITY_LIBS@ \
- @GNOME_DESKTOP_LIBS@
-
-gnome_theme_test_SOURCES = \
- gnome-theme-test.c
-
-gnome_theme_test_LDADD = \
- libcommon.la \
- $(GNOMECC_CAPPLETS_LIBS)
-
-noinst_PROGRAMS = \
- gnome-theme-test
diff --git a/capplets/common/activate-settings-daemon.c b/capplets/common/activate-settings-daemon.c
deleted file mode 100644
index 186eb82a7..000000000
--- a/capplets/common/activate-settings-daemon.c
+++ /dev/null
@@ -1,58 +0,0 @@
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <libbonobo.h>
-#include <gtk/gtk.h>
-
-#include "activate-settings-daemon.h"
-
-
-/*#include "GNOME_SettingsDaemon.h"*/
-
-static void popup_error_message (void)
-{
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK, _("Unable to start the settings manager 'gnome-settings-daemon'.\n"
- "Without the GNOME settings manager running, some preferences may not take effect. This could "
- "indicate a problem with Bonobo, or a non-GNOME (e.g. KDE) settings manager may already "
- "be active and conflicting with the GNOME settings manager."));
-
- gtk_widget_show (dialog);
- gtk_widget_destroy (dialog);
-}
-
-/* Returns FALSE if activation failed, else TRUE */
-gboolean
-activate_settings_daemon (void)
-{
- CORBA_Environment ev;
- CORBA_Object object;
-
- /*GNOME_SettingsDaemon corba_foo;*/
-
- bonobo_init (NULL, NULL);
-
- CORBA_exception_init (&ev);
-
- object = bonobo_activation_activate_from_id ("OAFIID:GNOME_SettingsDaemon",
- 0, NULL, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- popup_error_message ();
- return FALSE;
- }
-
- if (object == CORBA_OBJECT_NIL) {
- popup_error_message ();
- return FALSE;
- }
-
- /*bool = GNOME_SettingsDaemon_awake (corba_foo, "MyService", &ev);
- printf ("bool is %d\n", bool);*/
-
-
- return TRUE;
-}
diff --git a/capplets/common/activate-settings-daemon.h b/capplets/common/activate-settings-daemon.h
deleted file mode 100644
index fc1558d82..000000000
--- a/capplets/common/activate-settings-daemon.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef ACTIVATE_SETINGS_DAEMON
-#define ACTIVATE_SETINGS_DAEMON
-
-#include <glib.h>
-
-/* Returns FALSE if activation failed, else TRUE */
-gboolean activate_settings_daemon (void);
-
-#endif
diff --git a/capplets/common/bonobo-property-editor-range.c b/capplets/common/bonobo-property-editor-range.c
deleted file mode 100644
index f4069b63e..000000000
--- a/capplets/common/bonobo-property-editor-range.c
+++ /dev/null
@@ -1,70 +0,0 @@
-#include <bonobo-conf/bonobo-property-editor.h>
-#include <gtk/gtkrange.h>
-#include <gtk/gtksignal.h>
-#include <bonobo.h>
-
-static void
-changed_cb (GtkAdjustment *adj, BonoboPEditor *editor)
-{
- CORBA_Environment ev;
- DynamicAny_DynAny dyn;
- BonoboArg *arg;
- gulong val;
-
- CORBA_exception_init (&ev);
-
- val = adj->value;
-
- dyn = CORBA_ORB_create_basic_dyn_any (bonobo_orb (), TC_ulong, &ev);
- DynamicAny_DynAny_insert_ulong (dyn, val, &ev);
-
- if (BONOBO_EX (&ev) || dyn == NULL)
- return;
-
- arg = DynamicAny_DynAny_to_any (dyn, &ev);
- bonobo_peditor_set_value (editor, arg, &ev);
-
- bonobo_arg_release (arg);
- CORBA_Object_release ((CORBA_Object) dyn, &ev);
- CORBA_exception_free (&ev);
-}
-
-static void
-adj_set_value_cb (BonoboPEditor *editor,
- BonoboArg *value,
- CORBA_Environment *ev)
-{
- GtkAdjustment *adj;
- gulong v;
-
- adj = gtk_range_get_adjustment (GTK_RANGE (bonobo_peditor_get_widget (editor)));
-
- if (!bonobo_arg_type_is_equal (value->_type, TC_ulong, NULL))
- return;
-
- v = BONOBO_ARG_GET_GENERAL (value, TC_ulong, CORBA_unsigned_long, NULL);
-
- gtk_signal_handler_block_by_func (GTK_OBJECT (adj), changed_cb,
- editor);
-
- gtk_adjustment_set_value (adj, v);
-
- gtk_signal_handler_unblock_by_func (GTK_OBJECT (adj), changed_cb,
- editor);
-}
-
-GtkObject* bonobo_peditor_range_construct (GtkWidget *widget)
-{
- BonoboPEditor *editor;
- GtkAdjustment *adj;
-
- g_return_val_if_fail (widget != NULL, NULL);
- g_return_val_if_fail (GTK_IS_RANGE (widget), NULL);
-
- editor = bonobo_peditor_construct (widget, adj_set_value_cb, TC_ulong);
- adj = gtk_range_get_adjustment (GTK_RANGE (widget));
- gtk_signal_connect (GTK_OBJECT (adj), "value_changed",
- GTK_SIGNAL_FUNC (changed_cb), editor);
-
- return GTK_OBJECT (editor);
-}
diff --git a/capplets/common/bonobo-property-editor-range.h b/capplets/common/bonobo-property-editor-range.h
deleted file mode 100644
index a0167d48d..000000000
--- a/capplets/common/bonobo-property-editor-range.h
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef __BONOBO_PROPERTY_RANGE_SCALE_H__
-#define __BONOBO_PROPERTY_RANGE_SCALE_H__
-
-#include <gtk/gtkwidget.h>
-
-GtkObject* bonobo_peditor_range_construct (GtkWidget *widget);
-
-#endif /* __BONOBO_PROPERTY_RANGE_SCALE_H__ */
diff --git a/capplets/common/capplet-stock-icons.c b/capplets/common/capplet-stock-icons.c
deleted file mode 100644
index 7e8ee4591..000000000
--- a/capplets/common/capplet-stock-icons.c
+++ /dev/null
@@ -1,137 +0,0 @@
-/*
- * capplet-stock-icons.c
- *
- * Copyright (C) 2002 Sun Microsystems, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors:
- * Rajkumar Sivasamy <rajkumar.siva@wipro.com>
- * Taken bits of code from panel-stock-icons.c, Thanks Mark <mark@skynet.ie>
- */
-
-#include <gtk/gtkstock.h>
-#include <gtk/gtkiconfactory.h>
-#include <gnome.h>
-
-#include "capplet-stock-icons.h"
-
-static GtkIconSize keyboard_capplet_icon_size = 0;
-static GtkIconSize mouse_capplet_icon_size = 0;
-static GtkIconSize mouse_capplet_dblclck_icon_size = 0;
-
-GtkIconSize
-keyboard_capplet_icon_get_size (void)
-{
- return keyboard_capplet_icon_size;
-}
-
-GtkIconSize
-mouse_capplet_icon_get_size (void)
-{
- return mouse_capplet_icon_size;
-}
-
-GtkIconSize
-mouse_capplet_dblclck_icon_get_size (void)
-{
- return mouse_capplet_dblclck_icon_size;
-}
-
-typedef struct
-{
- char *stock_id;
- char *name;
-} CappletStockIcon;
-
-
-static CappletStockIcon items [] = {
- { KEYBOARD_REPEAT, "keyboard-repeat.png" },
- { KEYBOARD_CURSOR, "keyboard-cursor.png" },
- { KEYBOARD_VOLUME, "keyboard-volume.png" },
- { KEYBOARD_BELL, "keyboard-bell.png" },
- { ACCESSX_KEYBOARD_BOUNCE, "accessibility-keyboard-bouncekey.png"},
- { ACCESSX_KEYBOARD_SLOW, "accessibility-keyboard-slowkey.png"},
- { ACCESSX_KEYBOARD_MOUSE, "accessibility-keyboard-mousekey.png"},
- { ACCESSX_KEYBOARD_STICK, "accessibility-keyboard-stickykey.png"},
- { ACCESSX_KEYBOARD_TOGGLE, "accessibility-keyboard-togglekey.png"},
- { MOUSE_DBLCLCK_MAYBE, "double-click-maybe.png"},
- { MOUSE_DBLCLCK_ON, "double-click-on.png"},
- { MOUSE_DBLCLCK_OFF, "double-click-off.png"},
- { MOUSE_RIGHT_HANDED, "mouse-right.png"},
- { MOUSE_LEFT_HANDED, "mouse-left.png"}
-};
-
-static void
-capplet_register_stock_icons (GtkIconFactory *factory)
-{
- gint i;
- GtkIconSource *source;
- GnomeProgram *program;
-
- source = gtk_icon_source_new ();
- program = gnome_program_get ();
-
- for (i = 0; i < G_N_ELEMENTS (items); ++i) {
- GtkIconSet *icon_set;
- char *filename;
- filename = gnome_program_locate_file (NULL, GNOME_FILE_DOMAIN_APP_PIXMAP, items[i].name, TRUE, NULL);
-
- if (!filename) {
- g_warning (_("Unable to load capplet stock icon '%s'\n"), items[i].name);
- icon_set = gtk_icon_factory_lookup_default (GTK_STOCK_MISSING_IMAGE);
- gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
- continue;
- }
-
- gtk_icon_source_set_filename (source, filename);
- g_free (filename);
-
- icon_set = gtk_icon_set_new ();
- gtk_icon_set_add_source (icon_set, source);
- gtk_icon_factory_add (factory, items[i].stock_id, icon_set);
- gtk_icon_set_unref (icon_set);
- }
- gtk_icon_source_free (source);
-}
-
-void
-capplet_init_stock_icons (void)
-{
- GtkIconFactory *factory;
- static gboolean initialized = FALSE;
-
- if (initialized)
- return;
- initialized = TRUE;
-
- factory = gtk_icon_factory_new ();
- gtk_icon_factory_add_default (factory);
- capplet_register_stock_icons (factory);
-
- keyboard_capplet_icon_size = gtk_icon_size_register ("keyboard-capplet",
- KEYBOARD_CAPPLET_DEFAULT_ICON_SIZE,
- KEYBOARD_CAPPLET_DEFAULT_ICON_SIZE);
-
- mouse_capplet_icon_size = gtk_icon_size_register ("mouse-capplet",
- MOUSE_CAPPLET_DEFAULT_WIDTH,
- MOUSE_CAPPLET_DEFAULT_HEIGHT);
-
- mouse_capplet_dblclck_icon_size = gtk_icon_size_register ("mouse-capplet-dblclck-icon",
- MOUSE_CAPPLET_DBLCLCK_ICON_SIZE,
- MOUSE_CAPPLET_DBLCLCK_ICON_SIZE);
- g_object_unref (factory);
-}
diff --git a/capplets/common/capplet-stock-icons.h b/capplets/common/capplet-stock-icons.h
deleted file mode 100644
index 1c316c8ff..000000000
--- a/capplets/common/capplet-stock-icons.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * capplet-stock-icons.h
- *
- * Copyright (C) 2002 Sun Microsystems, Inc.
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors:
- * Rajkumar Sivasamy <rajkumar.siva@wipro.com>
- * Taken bits of code from panel-stock-icons.h, Thanks Mark <mark@skynet.ie>
- */
-
-#ifndef __CAPPLET_STOCK_ICONS_H__
-#define __CAPPLET_STOCK_ICONS_H__
-
-#include <glib/gmacros.h>
-#include <gtk/gtkenums.h>
-
-G_BEGIN_DECLS
-
-#define KEYBOARD_CAPPLET_DEFAULT_ICON_SIZE 48
-#define MOUSE_CAPPLET_DEFAULT_WIDTH 120
-#define MOUSE_CAPPLET_DEFAULT_HEIGHT 100
-#define MOUSE_CAPPLET_DBLCLCK_ICON_SIZE 100
-
-/* stock icons */
-#define KEYBOARD_REPEAT "keyboard-repeat"
-#define KEYBOARD_CURSOR "keyboard-cursor"
-#define KEYBOARD_VOLUME "keyboard-volume"
-#define KEYBOARD_BELL "keyboard-bell"
-#define ACCESSX_KEYBOARD_BOUNCE "accessibility-keyboard-bouncekey"
-#define ACCESSX_KEYBOARD_SLOW "accessibility-keyboard-slowkey"
-#define ACCESSX_KEYBOARD_MOUSE "accessibility-keyboard-mousekey"
-#define ACCESSX_KEYBOARD_STICK "accessibility-keyboard-stickykey"
-#define ACCESSX_KEYBOARD_TOGGLE "accessibility-keyboard-togglekey"
-#define MOUSE_DBLCLCK_MAYBE "mouse-dblclck-maybe"
-#define MOUSE_DBLCLCK_ON "mouse-dblclck-on"
-#define MOUSE_DBLCLCK_OFF "mouse-dblclck-off"
-#define MOUSE_RIGHT_HANDED "mouse-right-handed"
-#define MOUSE_LEFT_HANDED "mouse-left-handed"
-
-void capplet_init_stock_icons (void);
-GtkIconSize keyboard_capplet_icon_get_size (void);
-GtkIconSize mouse_capplet_icon_get_size (void);
-GtkIconSize mouse_capplet_dblclck_icon_get_size (void);
-
-G_END_DECLS
-
-#endif /* __CAPPLET_STOCK_ICONS_H__ */
diff --git a/capplets/common/capplet-util.c b/capplets/common/capplet-util.c
deleted file mode 100644
index 4277c7021..000000000
--- a/capplets/common/capplet-util.c
+++ /dev/null
@@ -1,400 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* capplet-util.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-
-/* For stat */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-#include "capplet-util.h"
-
-#if 0
-
-/* apply_cb
- *
- * Callback issued when the user clicks "Apply" or "Ok". This function is
- * responsible for making sure the current settings are properly saved.
- */
-
-static void
-apply_cb (BonoboPropertyControl *pc, Bonobo_PropertyControl_Action action)
-{
- if (action == Bonobo_PropertyControl_APPLY)
- gconf_engine_commit_change_set (gconf_engine_get_default (),
- changeset, TRUE, NULL);
-}
-
-/* properties_changed_cb
- *
- * Callback issued when some setting has changed
- */
-
-static void
-properties_changed_cb (GConfEngine *engine, guint cnxn_id, GConfEntry *entry, gpointer user_data)
-{
- if (apply_settings_cb != NULL)
- apply_settings_cb ();
-}
-
-/* get_control_cb
- *
- * Callback to construct the main dialog box for this capplet; invoked by Bonobo
- * whenever capplet activation is requested. Returns a BonoboObject representing
- * the control that encapsulates the object.
- */
-
-static BonoboObject *
-get_control_cb (BonoboPropertyControl *property_control, gint page_number)
-{
- BonoboControl *control;
- GtkWidget *widget;
-
- widget = create_dialog_cb ();
-
- if (widget == NULL)
- return NULL;
-
- control = bonobo_control_new (widget);
- setup_property_editors_cb (widget, changeset);
-
- bonobo_control_set_automerge (control, TRUE);
-
- return BONOBO_OBJECT (control);
-}
-
-/* create_control_cb
- *
- * Small function to create the PropertyControl and return it.
- */
-
-static BonoboObject *
-create_control_cb (BonoboGenericFactory *factory, const gchar *component_id)
-{
- BonoboObject *obj;
- BonoboPropertyControl *property_control;
-
- static const gchar *prefix1 = "OAFIID:Bonobo_Control_Capplet_";
-
- g_message ("%s: Enter", G_GNUC_FUNCTION);
-
- if (!strncmp (component_id, prefix1, strlen (prefix1))) {
- property_control = bonobo_property_control_new
- ((BonoboPropertyControlGetControlFn) get_control_cb, 1, NULL);
- g_signal_connect (G_OBJECT (property_control), "action",
- G_CALLBACK (apply_cb), NULL);
- obj = BONOBO_OBJECT (property_control);
- } else {
- g_critical ("Not creating %s", component_id);
- obj = NULL;
- }
-
- return obj;
-}
-
-/* get_factory_name
- *
- * Construct the OAF IID of the factory from the binary name
- */
-
-static gchar *
-get_factory_name (const gchar *binary)
-{
- gchar *s, *tmp, *tmp1, *res;
-
- s = g_strdup (binary);
- tmp = strrchr (s, '/');
- if (tmp == NULL) tmp = s;
- else tmp++;
- if ((tmp1 = strstr (tmp, "-control")) != NULL) *tmp1 = '\0';
- if ((tmp1 = strstr (tmp, "-capplet")) != NULL) *tmp1 = '\0';
- while ((tmp1 = strchr (tmp, '-')) != NULL) *tmp1 = '_';
-
- res = g_strconcat ("OAFIID:Bonobo_", tmp, "_Factory", NULL);
- g_free (s);
- return res;
-}
-
-/* get_property_name
- *
- * Get the property name associated with this capplet
- */
-
-static gchar *
-get_property_name (const gchar *binary)
-{
- gchar *s, *tmp, *tmp1, *res;
-
- s = g_strdup (binary);
- tmp = strrchr (s, '/');
- if (tmp == NULL) tmp = s;
- else tmp++;
- if ((tmp1 = strstr (tmp, "-control")) != NULL) *tmp1 = '\0';
- if ((tmp1 = strstr (tmp, "-capplet")) != NULL) *tmp1 = '\0';
-
- for (tmp1 = tmp; *tmp1 != '\0'; tmp1++) {
- *tmp1 = toupper (*tmp1);
- if (*tmp1 == '-') *tmp1 = '_';
- }
-
- res = g_strconcat ("GNOME_", tmp, NULL);
- g_free (s);
- return res;
-}
-
-#endif
-
-/* setup_session_mgmt
- *
- * Make sure the capplet launches and applies its settings next time the user
- * logs in
- */
-
-void
-setup_session_mgmt (const gchar *binary_name)
-{
-/* Disabled. I never really understood this code anyway, and I am absolutely
- * unclear about how to port it to GNOME 2.0 */
-#if 0
- GnomeClient *client;
- GnomeClientFlags flags;
- gint token;
- gchar *restart_args[3];
- gchar *prop_name;
-
- g_return_if_fail (binary_name != NULL);
-
- client = gnome_master_client ();
- flags = gnome_client_get_flags (client);
-
- if (flags & GNOME_CLIENT_IS_CONNECTED) {
- prop_name = get_property_name (binary_name);
- token = gnome_startup_acquire_token
- (prop_name, gnome_client_get_id (client));
- g_free (prop_name);
-
- if (token) {
- gnome_client_set_priority (client, 20);
- gnome_client_set_restart_style
- (client, GNOME_RESTART_ANYWAY);
- restart_args[0] = g_strdup (binary_name);
- restart_args[1] = "--init-session-settings";
- restart_args[2] = NULL;
- gnome_client_set_restart_command
- (client, 2, restart_args);
- g_free (restart_args[0]);
- } else {
- gnome_client_set_restart_style
- (client, GNOME_RESTART_NEVER);
- }
- }
-#endif
-}
-
-#if 0
-
-/* capplet_init -- see documentation in capplet-util.h
- */
-
-void
-capplet_init (int argc,
- char **argv,
- ApplySettingsFn apply_fn,
- CreateDialogFn create_dialog_fn,
- SetupPropertyEditorsFn setup_fn,
- GetLegacySettingsFn get_legacy_fn)
-{
- gchar *factory_iid;
- BonoboGenericFactory *factory;
-
- static gboolean apply_only;
- static gboolean get_legacy;
- static struct poptOption cap_options[] = {
- { "apply", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit"), NULL },
- { "init-session-settings", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit"), NULL },
- { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0,
- N_("Retrieve and store legacy settings"), NULL },
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- 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_POPT_TABLE, cap_options,
- NULL);
-
- if (!bonobo_init (&argc, argv))
- g_error ("Cannot initialize bonobo");
-
- if (apply_only && apply_fn != NULL) {
- setup_session_mgmt (argv[0]);
- apply_fn ();
- }
- else if (get_legacy && get_legacy_fn != NULL) {
- setup_session_mgmt (argv[0]);
- get_legacy_fn ();
- } else {
- setup_session_mgmt (argv[0]);
-
- create_dialog_cb = create_dialog_fn;
- apply_settings_cb = apply_fn;
- setup_property_editors_cb = setup_fn;
-
- factory_iid = get_factory_name (argv[0]);
- factory = bonobo_generic_factory_new
- (factory_iid, (BonoboFactoryCallback) create_control_cb, NULL);
- g_free (factory_iid);
- bonobo_running_context_auto_exit_unref (BONOBO_OBJECT (factory));
-
- changeset = gconf_change_set_new ();
-
- bonobo_main ();
-
- gconf_change_set_unref (changeset);
- }
-}
-
-#endif
-
-
-/**
- * capplet_error_dialog :
- *
- * @parent :
- * @msg : already translated.
- * @err :
- *
- */
-void
-capplet_error_dialog (GtkWindow *parent, char const *msg, GError *err)
-{
- if (err != NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (parent),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- msg, err->message);
-
- g_signal_connect (G_OBJECT (dialog),
- "response",
- G_CALLBACK (gtk_widget_destroy), NULL);
- gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE);
- gtk_widget_show (dialog);
- g_error_free (err);
- }
-}
-
-/**
- * capplet_help :
- * @parent :
- * @helpfile :
- * @section :
- *
- * A quick utility routine to display help for capplets, and handle errors in a
- * Havoc happy way.
- **/
-void
-capplet_help (GtkWindow *parent, char const *helpfile, char const *section)
-{
- GError *error = NULL;
-
- g_return_if_fail (helpfile != NULL);
- g_return_if_fail (section != NULL);
-
- gnome_help_display_desktop (NULL,
- "user-guide",
- helpfile, section, &error);
- if (error != NULL)
- capplet_error_dialog (parent,
- _("There was an error displaying help: %s"),
- error);
-}
-
-/**
- * capplet_set_icon :
- * @window :
- * @file_name :
- *
- * A quick utility routine to avoid the cut-n-paste of bogus code
- * that caused several bugs.
- **/
-void
-capplet_set_icon (GtkWidget *window, char const *icon_file_name)
-{
- char *path;
- char *tmp;
- char *p;
- GdkPixbuf *icon_pixbuf = NULL;
- GnomeIconTheme *icon_theme;
-
- /* First look up from the icon theme */
- icon_theme = gnome_icon_theme_new ();
-
- tmp = g_strdup (icon_file_name);
- p = strrchr (tmp, '.');
- if (p)
- p[0] = '\0';
-
- path = gnome_icon_theme_lookup_icon (icon_theme, tmp, 48, NULL, NULL);
-
- if (path != NULL) {
- icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
- }
-
- g_free (tmp);
- g_object_unref (icon_theme);
-
- if (icon_pixbuf == NULL) {
- /* Then we fallback to the control center icon location */
- path = g_strconcat (GNOMECC_DATA_DIR "/icons/", icon_file_name, NULL);
-
- icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
- }
-
- if (icon_pixbuf == NULL) {
- /* Then we fallback to the gnome program discovery stuff */
- path = gnome_pixmap_file (icon_file_name);
- if (path != NULL) {
- icon_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
- g_free (path);
- }
- }
-
- if (icon_pixbuf != NULL) {
- gtk_window_set_icon (GTK_WINDOW (window), icon_pixbuf);
- g_object_unref (icon_pixbuf);
- }
-}
diff --git a/capplets/common/capplet-util.h b/capplets/common/capplet-util.h
deleted file mode 100644
index 5fa179d2f..000000000
--- a/capplets/common/capplet-util.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* capplet-util.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __CAPPLET_UTIL_H
-#define __CAPPLET_UTIL_H
-
-#include <gnome.h>
-#include <gconf/gconf.h>
-#include <gconf/gconf-changeset.h>
-
-/* Macros to make certain repetitive tasks a bit easier */
-
-/* Retrieve a widget from the Glade object */
-
-#define WID(s) glade_xml_get_widget (dialog, s)
-
-/* Copy a setting from the legacy gnome-config settings to the ConfigDatabase */
-
-#define COPY_FROM_LEGACY(type, key, legacy_key) \
- val_##type = gnome_config_get_##type##_with_default (legacy_key, &def); \
- \
- if (!def) \
- gconf_client_set_##type (client, key, val_##type, NULL);
-
-/* Callback to apply the settings in the given database */
-typedef void (*ApplySettingsFn) (void);
-
-/* Callback to set up the dialog proper */
-typedef GtkWidget *(*CreateDialogFn) (void);
-
-/* Callback to set up property editors for the dialog */
-typedef void (*SetupPropertyEditorsFn) (GtkWidget *dialog, GConfChangeSet *changeset);
-
-/* Callback to retrieve legacy settings and store them in the new configuration
- * database */
-typedef void (*GetLegacySettingsFn) (void);
-
-/* Set up the session management so that this capplet will apply its
- * settings on every startup
- */
-
-void setup_session_mgmt (const gchar *binary_name);
-
-/* Wrapper function for the entire capplet. This handles all initialization and
- * runs the capplet for you. Just supply the appropriate callbacks and your argc
- * and argv from main()
- *
- * This function makes several assumptions, requiring that all capplets follow a
- * particular convention. In particular, suppose the name of the capplet binary
- * is foo-properties-capplet. Then:
- *
- * - The factory IID is Bonobo_Control_Capplet_foo_properties_Factory
- * - The default configuration moniker is archiver:foo-properties
- *
- * Following this convention yields capplets that are more uniform and thus
- * easier to maintain, and simplifies the interfaces quite a bit. All capplet in
- * this package are required to follow this convention.
- */
-
-void capplet_init (int argc,
- gchar **argv,
- ApplySettingsFn apply_fn,
- CreateDialogFn create_dialog_fn,
- SetupPropertyEditorsFn setup_property_editors_fn,
- GetLegacySettingsFn get_legacy_settings_fn);
-
-void capplet_error_dialog (GtkWindow *parent, char const *msg, GError *err);
-void capplet_help (GtkWindow *parent, char const *helpfile, char const *section);
-void capplet_set_icon (GtkWidget *window, char const *icon_file_name);
-
-#endif /* __CAPPLET_UTIL_H */
diff --git a/capplets/common/file-transfer-dialog.c b/capplets/common/file-transfer-dialog.c
deleted file mode 100644
index 307c90bb5..000000000
--- a/capplets/common/file-transfer-dialog.c
+++ /dev/null
@@ -1,420 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* file-transfer-dialog.c
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Rachel Hestilow <hestilow@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "file-transfer-dialog.h"
-#include <libgnomevfs/gnome-vfs-async-ops.h>
-#include <libgnome/libgnome.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkhbox.h>
-#include <gtk/gtkprogressbar.h>
-#include <gtk/gtkstock.h>
-#include <limits.h>
-
-enum
-{
- PROP_0,
- PROP_FROM_URI,
- PROP_TO_URI,
- PROP_FRACTION_COMPLETE,
- PROP_NTH_URI,
- PROP_TOTAL_URIS
-};
-
-enum
-{
- CANCEL,
- DONE,
- LAST_SIGNAL
-};
-
-guint file_transfer_dialog_signals[LAST_SIGNAL] = {0, };
-
-struct _FileTransferDialogPrivate
-{
- GtkWidget *progress;
- GtkWidget *status;
- GtkWidget *num_files;
- GtkWidget *current;
- GtkWidget *from;
- GtkWidget *to;
- guint nth;
- guint total;
- GnomeVFSAsyncHandle *handle;
-};
-
-static GObjectClass *parent_class;
-
-static void
-file_transfer_dialog_cancel (FileTransferDialog *dlg)
-{
- if (dlg->priv->handle)
- {
- gnome_vfs_async_cancel (dlg->priv->handle);
- dlg->priv->handle = NULL;
- }
-}
-
-static void
-file_transfer_dialog_finalize (GObject *obj)
-{
- FileTransferDialog *dlg = FILE_TRANSFER_DIALOG (obj);
-
- g_free (dlg->priv);
-
- if (parent_class->finalize)
- parent_class->finalize (G_OBJECT (dlg));
-}
-
-static void
-file_transfer_dialog_update_num_files (FileTransferDialog *dlg)
-{
- gchar *str = g_strdup_printf (_("%i of %i"),
- dlg->priv->nth, dlg->priv->total);
- gtk_label_set_text (GTK_LABEL (dlg->priv->num_files), str);
- g_free (str);
-}
-
-static void
-file_transfer_dialog_response (GtkDialog *dlg, gint response_id)
-{
- g_signal_emit (G_OBJECT (dlg),
- file_transfer_dialog_signals[CANCEL], 0, NULL);
-}
-
-static void
-file_transfer_dialog_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- FileTransferDialog *dlg = FILE_TRANSFER_DIALOG (object);
- gchar *str;
- gchar *base;
-
- switch (prop_id)
- {
- case PROP_FROM_URI:
- base = g_path_get_basename (g_value_get_string (value));
- str = g_strdup_printf (_("Transferring: %s"), base);
- gtk_label_set_text (GTK_LABEL (dlg->priv->current),
- str);
- g_free (base);
- g_free (str);
-
- base = g_path_get_dirname (g_value_get_string (value));
- str = g_strdup_printf (_("From: %s"), base);
- gtk_label_set_text (GTK_LABEL (dlg->priv->from),
- str);
- g_free (base);
- g_free (str);
- break;
- case PROP_TO_URI:
- base = g_path_get_dirname (g_value_get_string (value));
- str = g_strdup_printf (_("To: %s"), base);
- gtk_label_set_text (GTK_LABEL (dlg->priv->to),
- str);
- g_free (base);
- g_free (str);
- break;
- case PROP_FRACTION_COMPLETE:
- gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (dlg->priv->progress), g_value_get_double (value));
- break;
- case PROP_NTH_URI:
- dlg->priv->nth = g_value_get_uint (value);
- file_transfer_dialog_update_num_files (dlg);
- break;
- case PROP_TOTAL_URIS:
- dlg->priv->total = g_value_get_uint (value);
- file_transfer_dialog_update_num_files (dlg);
- break;
- }
-}
-
-static void
-file_transfer_dialog_get_prop (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- FileTransferDialog *dlg = FILE_TRANSFER_DIALOG (object);
-
- switch (prop_id)
- {
- case PROP_NTH_URI:
- g_value_set_uint (value, dlg->priv->nth);
- break;
- case PROP_TOTAL_URIS:
- g_value_set_uint (value, dlg->priv->total);
- break;
- }
-}
-
-static void
-file_transfer_dialog_class_init (FileTransferDialogClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- klass->cancel = file_transfer_dialog_cancel;
- object_class->finalize = file_transfer_dialog_finalize;
- object_class->get_property = file_transfer_dialog_get_prop;
- object_class->set_property = file_transfer_dialog_set_prop;
-
- GTK_DIALOG_CLASS (klass)->response = file_transfer_dialog_response;
-
- g_object_class_install_property
- (object_class, PROP_FROM_URI,
- g_param_spec_string ("from_uri",
- _("From URI"),
- _("URI currently transferring from"),
- NULL,
- G_PARAM_READWRITE));
-
- g_object_class_install_property
- (object_class, PROP_TO_URI,
- g_param_spec_string ("to_uri",
- _("To URI"),
- _("URI currently transferring to"),
- NULL,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property
- (object_class, PROP_FRACTION_COMPLETE,
- g_param_spec_double ("fraction_complete",
- _("Fraction completed"),
- _("Fraction of transfer currently completed"),
- 0, 1, 0,
- G_PARAM_WRITABLE));
-
- g_object_class_install_property
- (object_class, PROP_NTH_URI,
- g_param_spec_uint ("nth_uri",
- _("Current URI index"),
- _("Current URI index - starts from 1"),
- 1, INT_MAX, 1,
- G_PARAM_READWRITE));
-
- g_object_class_install_property
- (object_class, PROP_TOTAL_URIS,
- g_param_spec_uint ("total_uris",
- _("Total URIs"),
- _("Total number of URIs"),
- 1, INT_MAX, 1,
- G_PARAM_READWRITE));
-
- file_transfer_dialog_signals[CANCEL] =
- g_signal_new ("cancel",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_FIRST,
- G_STRUCT_OFFSET (FileTransferDialogClass, cancel),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- file_transfer_dialog_signals[DONE] =
- g_signal_new ("done",
- G_TYPE_FROM_CLASS (object_class),
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (FileTransferDialogClass, done),
- NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- parent_class =
- G_OBJECT_CLASS (g_type_class_ref (GTK_TYPE_DIALOG));
-}
-
-static void
-file_transfer_dialog_init (FileTransferDialog *dlg)
-{
- GtkWidget *hbox;
-
- dlg->priv = g_new0 (FileTransferDialogPrivate, 1);
-
- gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dlg)->vbox),
- 4);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dlg)->vbox), 4);
-
- hbox = gtk_hbox_new (FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- hbox, FALSE, FALSE, 0);
-
- dlg->priv->status = gtk_label_new ("");
- gtk_label_set_justify (GTK_LABEL (dlg->priv->status),
- GTK_JUSTIFY_LEFT);
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->status), 0.0, 0.5);
-
- gtk_box_pack_start (GTK_BOX (hbox),
- dlg->priv->status, TRUE, TRUE, 0);
-
- dlg->priv->num_files = gtk_label_new ("");
- gtk_label_set_justify (GTK_LABEL (dlg->priv->num_files),
- GTK_JUSTIFY_RIGHT);
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->num_files), 1.0, 0.5);
-
- gtk_box_pack_start (GTK_BOX (hbox),
- dlg->priv->num_files, TRUE, TRUE, 0);
-
- dlg->priv->progress = gtk_progress_bar_new ();
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- dlg->priv->progress, FALSE, FALSE, 0);
-
- dlg->priv->current = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- dlg->priv->current, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->current), 0.0, 0.5);
-
- dlg->priv->from = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- dlg->priv->from, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->from), 0.0, 0.5);
-
- dlg->priv->to = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox),
- dlg->priv->to, FALSE, FALSE, 0);
- gtk_misc_set_alignment (GTK_MISC (dlg->priv->to), 0.0, 0.5);
-
- gtk_dialog_add_button (GTK_DIALOG (dlg),
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
-
- gtk_widget_show_all (GTK_DIALOG (dlg)->vbox);
-}
-
-GType
-file_transfer_dialog_get_type (void)
-{
- static GType file_transfer_dialog_type = 0;
-
- if (!file_transfer_dialog_type)
- {
- static GTypeInfo file_transfer_dialog_info =
- {
- sizeof (FileTransferDialogClass),
- NULL, /* GBaseInitFunc */
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) file_transfer_dialog_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* data */
- sizeof (FileTransferDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) file_transfer_dialog_init,
- NULL
- };
-
- file_transfer_dialog_type =
- g_type_register_static (GTK_TYPE_DIALOG,
- "FileTransferDialog",
- &file_transfer_dialog_info,
- 0);
- }
-
- return file_transfer_dialog_type;
-}
-
-GtkWidget*
-file_transfer_dialog_new (void)
-{
- return GTK_WIDGET (g_object_new (file_transfer_dialog_get_type (),
- NULL));
-}
-
-static int
-file_transfer_dialog_update_cb (GnomeVFSAsyncHandle *handle,
- GnomeVFSXferProgressInfo *info,
- gpointer data)
-{
- FileTransferDialog *dlg = FILE_TRANSFER_DIALOG (data);
-
- if (info->status == GNOME_VFS_XFER_PROGRESS_STATUS_VFSERROR)
- return GNOME_VFS_XFER_ERROR_ACTION_ABORT;
-
- if (info->source_name)
- g_object_set (G_OBJECT (dlg),
- "from_uri", info->source_name,
- NULL);
- if (info->target_name)
- g_object_set (G_OBJECT (dlg),
- "to_uri", info->target_name,
- NULL);
-
- if (info->bytes_total)
- g_object_set (G_OBJECT (dlg),
- "fraction_complete", (double) info->total_bytes_copied / (double) info->bytes_total,
- NULL);
-
- if (info->file_index && info->files_total)
- g_object_set (G_OBJECT (dlg),
- "nth_uri", info->file_index,
- "total_uris", info->files_total,
- NULL);
-
- switch (info->phase)
- {
- case GNOME_VFS_XFER_PHASE_INITIAL:
- gtk_label_set_text (GTK_LABEL (dlg->priv->status),
- _("Connecting..."));
- gtk_window_set_title (GTK_WINDOW (dlg),
- _("Connecting..."));
- break;
- case GNOME_VFS_XFER_PHASE_READYTOGO:
- case GNOME_VFS_XFER_PHASE_OPENSOURCE:
- gtk_label_set_text (GTK_LABEL (dlg->priv->status),
- _("Downloading..."));
- gtk_window_set_title (GTK_WINDOW (dlg),
- _("Downloading..."));
- break;
- case GNOME_VFS_XFER_PHASE_COMPLETED:
- g_signal_emit (G_OBJECT (dlg),
- file_transfer_dialog_signals[DONE],
- 0, NULL);
- return 0;
- default:
- break;
- }
-
- return 1;
-}
-
-GnomeVFSResult
-file_transfer_dialog_wrap_async_xfer (FileTransferDialog *dlg,
- GList *source_uri_list,
- GList *target_uri_list,
- GnomeVFSXferOptions xfer_options,
- GnomeVFSXferErrorMode error_mode,
- GnomeVFSXferOverwriteMode overwrite_mode,
- int priority)
-{
- g_return_val_if_fail (IS_FILE_TRANSFER_DIALOG (dlg),
- GNOME_VFS_ERROR_BAD_PARAMETERS);
-
- return gnome_vfs_async_xfer (&dlg->priv->handle,
- source_uri_list,
- target_uri_list,
- xfer_options,
- error_mode,
- overwrite_mode,
- priority,
- file_transfer_dialog_update_cb,
- dlg,
- NULL,
- NULL
- );
-}
-
diff --git a/capplets/common/file-transfer-dialog.h b/capplets/common/file-transfer-dialog.h
deleted file mode 100644
index 2ef095804..000000000
--- a/capplets/common/file-transfer-dialog.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* file-transfer-dialog.h
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Rachel Hestilow <hestilow@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __FILE_TRANSFER_DIALOG_H__
-#define __FILE_TRANSFER_DIALOG_H__
-
-#include <gtk/gtkdialog.h>
-#include <libgnomevfs/gnome-vfs-xfer.h>
-
-G_BEGIN_DECLS
-
-#define FILE_TRANSFER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, file_transfer_dialog_get_type (), FileTransferDialog)
-#define FILE_TRANSFER_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, file_transfer_dialog_get_type (), FileTransferDialogClass)
-#define IS_FILE_TRANSFER_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, file_transfer_dialog_get_type ())
-
-typedef struct _FileTransferDialog FileTransferDialog;
-typedef struct _FileTransferDialogClass FileTransferDialogClass;
-typedef struct _FileTransferDialogPrivate FileTransferDialogPrivate;
-
-struct _FileTransferDialog
-{
- GtkDialog dialog;
-
- FileTransferDialogPrivate *priv;
-};
-
-struct _FileTransferDialogClass
-{
- GtkDialogClass parent_class;
-
- void (*cancel) (FileTransferDialog *dlg);
- void (*done) (FileTransferDialog *dlg);
-};
-
-GType file_transfer_dialog_get_type (void);
-GtkWidget* file_transfer_dialog_new (void);
-
-GnomeVFSResult file_transfer_dialog_wrap_async_xfer (FileTransferDialog *dlg,
- GList *source_uri_list,
- GList *target_uri_list,
- GnomeVFSXferOptions xfer_options,
- GnomeVFSXferErrorMode error_mode,
- GnomeVFSXferOverwriteMode overwrite_mode,
- int priority);
-
-
-G_END_DECLS
-
-#endif /* __FILE_TRANSFER_DIALOG_H__ */
diff --git a/capplets/common/gconf-property-editor-marshal.c b/capplets/common/gconf-property-editor-marshal.c
deleted file mode 100644
index bb6c9b056..000000000
--- a/capplets/common/gconf-property-editor-marshal.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <glib.h>
-#include <glib-object.h>
-#include "gconf-property-editor-marshal.h"
-
-/* VOID:STRING,POINTER (peditor-marshal.list:25) */
-void
-gconf_property_editor_marshal_VOID__STRING_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__STRING_POINTER) (gpointer data1,
- gpointer arg_1,
- gpointer arg_2,
- gpointer data2);
- register GMarshalFunc_VOID__STRING_POINTER callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 3);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
- callback = (GMarshalFunc_VOID__STRING_POINTER) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- (char*) g_value_get_string (param_values + 1),
- g_value_get_pointer (param_values + 2),
- data2);
-}
-
diff --git a/capplets/common/gconf-property-editor-marshal.h b/capplets/common/gconf-property-editor-marshal.h
deleted file mode 100644
index 78306b2ab..000000000
--- a/capplets/common/gconf-property-editor-marshal.h
+++ /dev/null
@@ -1,15 +0,0 @@
-
-#include <gobject/gmarshal.h>
-
-G_BEGIN_DECLS
-
-/* VOID:STRING,POINTER (peditor-marshal.list:25) */
-extern void gconf_property_editor_marshal_VOID__STRING_POINTER (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data);
-
-G_END_DECLS
-
diff --git a/capplets/common/gconf-property-editor.c b/capplets/common/gconf-property-editor.c
deleted file mode 100644
index 034a09cf8..000000000
--- a/capplets/common/gconf-property-editor.c
+++ /dev/null
@@ -1,1764 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gconf-property-editor.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <stdarg.h>
-
-#include "gconf-property-editor.h"
-#include "gconf-property-editor-marshal.h"
-
-enum {
- VALUE_CHANGED,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_KEY,
- PROP_CALLBACK,
- PROP_CHANGESET,
- PROP_CONV_TO_WIDGET_CB,
- PROP_CONV_FROM_WIDGET_CB,
- PROP_UI_CONTROL,
- PROP_DATA,
- PROP_DATA_FREE_CB
-};
-
-typedef void (*GConfPropertyEditorDataFreeCb) (gpointer data);
-
-struct _GConfPropertyEditorPrivate
-{
- gchar *key;
- guint handler_id;
- GConfChangeSet *changeset;
- GObject *ui_control;
- GConfPEditorValueConvFn conv_to_widget_cb;
- GConfPEditorValueConvFn conv_from_widget_cb;
- GConfClientNotifyFunc callback;
- gboolean inited;
-
- gpointer data;
- GConfPropertyEditorDataFreeCb data_free_cb;
-};
-
-typedef struct
-{
- GType enum_type;
- GConfPEditorGetValueFn enum_val_true_fn;
- gpointer enum_val_true_fn_data;
- guint enum_val_false;
- gboolean use_nick;
-} GConfPropertyEditorEnumData;
-
-static guint peditor_signals[LAST_SIGNAL];
-
-static GObjectClass *parent_class;
-
-static void gconf_property_editor_init (GConfPropertyEditor *gconf_property_editor,
- GConfPropertyEditorClass *class);
-static void gconf_property_editor_class_init (GConfPropertyEditorClass *class);
-static void gconf_property_editor_base_init (GConfPropertyEditorClass *class);
-
-static void gconf_property_editor_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void gconf_property_editor_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void gconf_property_editor_finalize (GObject *object);
-
-static GObject *gconf_peditor_new (gchar *key,
- GConfClientNotifyFunc cb,
- GConfChangeSet *changeset,
- GObject *ui_control,
- const gchar *first_prop_name,
- va_list var_args,
- const gchar *first_custom,
- ...);
-
-GType
-gconf_property_editor_get_type (void)
-{
- static GType gconf_property_editor_type = 0;
-
- if (!gconf_property_editor_type) {
- GTypeInfo gconf_property_editor_info = {
- sizeof (GConfPropertyEditorClass),
- (GBaseInitFunc) gconf_property_editor_base_init,
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) gconf_property_editor_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (GConfPropertyEditor),
- 0, /* n_preallocs */
- (GInstanceInitFunc) gconf_property_editor_init,
- NULL
- };
-
- gconf_property_editor_type =
- g_type_register_static (G_TYPE_OBJECT,
- "GConfPropertyEditor",
- &gconf_property_editor_info, 0);
- }
-
- return gconf_property_editor_type;
-}
-
-static GConfValue*
-gconf_property_editor_conv_default (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- return gconf_value_copy (value);
-}
-
-static void
-gconf_property_editor_init (GConfPropertyEditor *gconf_property_editor,
- GConfPropertyEditorClass *class)
-{
- gconf_property_editor->p = g_new0 (GConfPropertyEditorPrivate, 1);
- gconf_property_editor->p->conv_to_widget_cb = gconf_property_editor_conv_default;
- gconf_property_editor->p->conv_from_widget_cb = gconf_property_editor_conv_default;
- gconf_property_editor->p->inited = FALSE;
-}
-
-static void
-gconf_property_editor_base_init (GConfPropertyEditorClass *class)
-{
-}
-
-static void
-gconf_property_editor_class_init (GConfPropertyEditorClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = gconf_property_editor_finalize;
- object_class->set_property = gconf_property_editor_set_prop;
- object_class->get_property = gconf_property_editor_get_prop;
-
- g_object_class_install_property
- (object_class, PROP_KEY,
- g_param_spec_string ("key",
- _("Key"),
- _("GConf key to which this property editor is attached"),
- NULL,
- G_PARAM_READWRITE));
- g_object_class_install_property
- (object_class, PROP_CALLBACK,
- g_param_spec_pointer ("callback",
- _("Callback"),
- _("Issue this callback when the value associated with key gets changed"),
- G_PARAM_WRITABLE));
- g_object_class_install_property
- (object_class, PROP_CHANGESET,
- g_param_spec_pointer ("changeset",
- _("Change set"),
- _("GConf change set containing data to be forwarded to the gconf client on apply"),
- G_PARAM_READWRITE));
- g_object_class_install_property
- (object_class, PROP_CONV_TO_WIDGET_CB,
- g_param_spec_pointer ("conv-to-widget-cb",
- _("Conversion to widget callback"),
- _("Callback to be issued when data are to be converted from GConf to the widget"),
- G_PARAM_WRITABLE));
- g_object_class_install_property
- (object_class, PROP_CONV_FROM_WIDGET_CB,
- g_param_spec_pointer ("conv-from-widget-cb",
- _("Conversion from widget callback"),
- _("Callback to be issued when data are to be converted to GConf from the widget"),
- G_PARAM_WRITABLE));
- g_object_class_install_property
- (object_class, PROP_UI_CONTROL,
- g_param_spec_object ("ui-control",
- _("UI Control"),
- _("Object that controls the property (normally a widget)"),
- G_TYPE_OBJECT,
- G_PARAM_WRITABLE));
-
- peditor_signals[VALUE_CHANGED] =
- g_signal_new ("value-changed",
- G_TYPE_FROM_CLASS (object_class), 0,
- G_STRUCT_OFFSET (GConfPropertyEditorClass, value_changed),
- NULL, NULL,
- (GSignalCMarshaller) gconf_property_editor_marshal_VOID__STRING_POINTER,
- G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_POINTER);
-
- g_object_class_install_property
- (object_class, PROP_DATA,
- g_param_spec_pointer ("data",
- _("Property editor object data"),
- _("Custom data required by the specific property editor"),
- G_PARAM_WRITABLE));
-
- g_object_class_install_property
- (object_class, PROP_DATA_FREE_CB,
- g_param_spec_pointer ("data-free-cb",
- _("Property editor data freeing callback"),
- _("Callback to be issued when property editor object data is to be freed"),
- G_PARAM_WRITABLE));
-
- parent_class = G_OBJECT_CLASS
- (g_type_class_ref (G_TYPE_OBJECT));
-}
-
-static void
-gconf_property_editor_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- GConfPropertyEditor *peditor;
- GConfClient *client;
- GConfNotifyFunc cb;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_GCONF_PROPERTY_EDITOR (object));
-
- peditor = GCONF_PROPERTY_EDITOR (object);
-
- switch (prop_id) {
- case PROP_KEY:
- peditor->p->key = g_value_dup_string (value);
- break;
-
- case PROP_CALLBACK:
- client = gconf_client_get_default ();
- cb = g_value_get_pointer (value);
- peditor->p->callback = (GConfClientNotifyFunc) cb;
- if (peditor->p->handler_id != 0) {
- gconf_client_notify_remove (client,
- peditor->p->handler_id);
- }
- peditor->p->handler_id =
- gconf_client_notify_add (client, peditor->p->key,
- peditor->p->callback,
- peditor, NULL, NULL);
- g_object_unref (client);
- break;
-
- case PROP_CHANGESET:
- peditor->p->changeset = g_value_get_pointer (value);
- break;
-
- case PROP_CONV_TO_WIDGET_CB:
- peditor->p->conv_to_widget_cb = g_value_get_pointer (value);
- break;
-
- case PROP_CONV_FROM_WIDGET_CB:
- peditor->p->conv_from_widget_cb = g_value_get_pointer (value);
- break;
-
- case PROP_UI_CONTROL:
- peditor->p->ui_control = g_value_get_object (value);
- g_object_weak_ref (peditor->p->ui_control, (GWeakNotify) g_object_unref, object);
- break;
- case PROP_DATA:
- peditor->p->data = g_value_get_pointer (value);
- break;
- case PROP_DATA_FREE_CB:
- peditor->p->data_free_cb = g_value_get_pointer (value);
- break;
- default:
- g_warning ("Bad argument set");
- break;
- }
-}
-
-static void
-gconf_property_editor_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec)
-{
- GConfPropertyEditor *peditor;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_GCONF_PROPERTY_EDITOR (object));
-
- peditor = GCONF_PROPERTY_EDITOR (object);
-
- switch (prop_id) {
- case PROP_KEY:
- g_value_set_string (value, peditor->p->key);
- break;
-
- case PROP_CHANGESET:
- g_value_set_pointer (value, peditor->p->changeset);
- break;
-
- default:
- g_warning ("Bad argument get");
- break;
- }
-}
-
-static void
-gconf_property_editor_finalize (GObject *object)
-{
- GConfPropertyEditor *gconf_property_editor;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_GCONF_PROPERTY_EDITOR (object));
-
- gconf_property_editor = GCONF_PROPERTY_EDITOR (object);
-
- g_free (gconf_property_editor->p->key);
-
- if (gconf_property_editor->p->data_free_cb)
- gconf_property_editor->p->data_free_cb (gconf_property_editor->p->data);
-
- if (gconf_property_editor->p->handler_id != 0) {
- GConfClient *client;
-
- client = gconf_client_get_default ();
- gconf_client_notify_remove (client,
- gconf_property_editor->p->handler_id);
- g_object_unref (client);
- }
-
- g_free (gconf_property_editor->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static GObject *
-gconf_peditor_new (gchar *key,
- GConfClientNotifyFunc cb,
- GConfChangeSet *changeset,
- GObject *ui_control,
- const gchar *first_prop_name,
- va_list var_args,
- const gchar *first_custom,
- ...)
-{
- GObject *obj;
- GConfClient *client;
- GConfEntry *gconf_entry;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (cb != NULL, NULL);
-
- obj = g_object_new (gconf_property_editor_get_type (),
- "key", key,
- "callback", cb,
- "changeset", changeset,
- "ui-control", ui_control,
- NULL);
-
- g_object_set_valist (obj, first_prop_name, var_args);
-
- if (first_custom)
- {
- va_list custom_args;
- va_start (custom_args, first_custom);
- g_object_set_valist (obj, first_custom, custom_args);
- va_end (custom_args);
- }
-
- client = gconf_client_get_default ();
- gconf_entry = gconf_client_get_entry (client, GCONF_PROPERTY_EDITOR (obj)->p->key, NULL, TRUE, NULL);
- GCONF_PROPERTY_EDITOR (obj)->p->callback (client, 0, gconf_entry, obj);
- GCONF_PROPERTY_EDITOR (obj)->p->inited = TRUE;
- gconf_entry_free (gconf_entry);
- g_object_unref (G_OBJECT (client));
-
- return obj;
-}
-
-const gchar *
-gconf_property_editor_get_key (GConfPropertyEditor *peditor)
-{
- return peditor->p->key;
-}
-
-GObject *
-gconf_property_editor_get_ui_control (GConfPropertyEditor *peditor)
-{
- return peditor->p->ui_control;
-}
-
-static void
-peditor_set_gconf_value (GConfPropertyEditor *peditor,
- const gchar *key,
- GConfValue *value)
-{
- GConfClient *client = gconf_client_get_default();
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_set (peditor->p->changeset, peditor->p->key, value);
- else
- gconf_client_set (client, peditor->p->key, value, NULL);
-
- g_object_unref (client);
-}
-
-static void
-peditor_boolean_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (peditor->p->ui_control), gconf_value_get_bool (value_wid));
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_boolean_widget_changed (GConfPropertyEditor *peditor,
- GtkToggleButton *tb)
-{
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
- value_wid = gconf_value_new (GCONF_VALUE_BOOL);
- gconf_value_set_bool (value_wid, gtk_toggle_button_get_active (tb));
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-GObject *
-gconf_peditor_new_boolean (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *checkbox,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (checkbox != NULL, NULL);
- g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (checkbox), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_boolean_value_changed,
- changeset,
- G_OBJECT (checkbox),
- first_property_name,
- var_args,
- NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (checkbox), "toggled",
- (GCallback) peditor_boolean_widget_changed, peditor);
-
- return peditor;
-}
-
-static void
-peditor_integer_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
- const char *entry_current_text;
- int entry_current_integer;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- entry_current_text = gtk_entry_get_text (GTK_ENTRY (peditor->p->ui_control));
- entry_current_integer = strtol (entry_current_text, NULL, 10);
- if (entry_current_integer != gconf_value_get_int (value)) {
- char *buf = g_strdup_printf ("%d", gconf_value_get_int (value_wid));
- gtk_entry_set_text (GTK_ENTRY (peditor->p->ui_control), buf);
- g_free (buf);
- }
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_integer_widget_changed (GConfPropertyEditor *peditor,
- GtkEntry *entry)
-{
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
-
- value_wid = gconf_value_new (GCONF_VALUE_INT);
-
- gconf_value_set_int (value_wid, strtol (gtk_entry_get_text (entry), NULL, 10));
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
-
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-static GObject *
-gconf_peditor_new_integer_valist (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- va_list var_args)
-{
- GObject *peditor;
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_integer_value_changed,
- changeset,
- G_OBJECT (entry),
- first_property_name,
- var_args, NULL);
-
- g_signal_connect_swapped (G_OBJECT (entry), "changed",
- (GCallback) peditor_integer_widget_changed, peditor);
-
- return peditor;
-}
-
-GObject *
-gconf_peditor_new_integer (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (entry != NULL, NULL);
- g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new_integer_valist
- (changeset, key, entry,
- first_property_name, var_args);
-
- va_end (var_args);
-
- return peditor;
-}
-
-static void
-peditor_string_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
- const char *entry_current_text;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- entry_current_text = gtk_entry_get_text (GTK_ENTRY (peditor->p->ui_control));
- if (strcmp (entry_current_text, gconf_value_get_string (value)) != 0) {
- gtk_entry_set_text (GTK_ENTRY (peditor->p->ui_control), gconf_value_get_string (value_wid));
- }
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_string_widget_changed (GConfPropertyEditor *peditor,
- GtkEntry *entry)
-{
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
-
- value_wid = gconf_value_new (GCONF_VALUE_STRING);
-
- gconf_value_set_string (value_wid, gtk_entry_get_text (entry));
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
-
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-static GObject *
-gconf_peditor_new_string_valist (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- va_list var_args)
-{
- GObject *peditor;
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_string_value_changed,
- changeset,
- G_OBJECT (entry),
- first_property_name,
- var_args, NULL);
-
- g_signal_connect_swapped (G_OBJECT (entry), "changed",
- (GCallback) peditor_string_widget_changed, peditor);
-
- return peditor;
-}
-
-GObject *
-gconf_peditor_new_string (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (entry != NULL, NULL);
- g_return_val_if_fail (GTK_IS_ENTRY (entry), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new_string_valist
- (changeset, key, entry,
- first_property_name, var_args);
-
- va_end (var_args);
-
- return peditor;
-}
-
-GObject *
-gconf_peditor_new_filename (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *file_entry,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (file_entry != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_FILE_ENTRY (file_entry), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new_string_valist
- (changeset, key,
- gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (file_entry)),
- first_property_name, var_args);
-
- va_end (var_args);
-
- return peditor;
-}
-
-static void
-peditor_color_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
- GdkColor color;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- gdk_color_parse (gconf_value_get_string (value_wid), &color);
- gnome_color_picker_set_i16 (GNOME_COLOR_PICKER (peditor->p->ui_control), color.red, color.green, color.blue, 65535);
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_color_widget_changed (GConfPropertyEditor *peditor,
- guint r,
- guint g,
- guint b,
- guint a,
- GnomeColorPicker *cp)
-{
- gchar *str;
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
-
- value_wid = gconf_value_new (GCONF_VALUE_STRING);
- str = g_strdup_printf ("#%02x%02x%02x", r >> 8, g >> 8, b >> 8);
- gconf_value_set_string (value_wid, str);
- g_free (str);
-
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
-
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-GObject *
-gconf_peditor_new_color (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *cp,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (cp != NULL, NULL);
- g_return_val_if_fail (GNOME_IS_COLOR_PICKER (cp), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_color_value_changed,
- changeset,
- G_OBJECT (cp),
- first_property_name,
- var_args, NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (cp), "color_set",
- (GCallback) peditor_color_widget_changed, peditor);
-
- return peditor;
-}
-
-static int
-peditor_enum_int_from_string (GType type, const gchar *str, gboolean use_nick)
-{
- GEnumClass *klass;
- GEnumValue *val;
- int ret = -1;
-
- klass = g_type_class_ref (type);
- if (use_nick)
- val = g_enum_get_value_by_nick (klass, str);
- else
- val = g_enum_get_value_by_name (klass, str);
-
- g_type_class_unref (klass);
-
- if (val)
- ret = val->value;
-
- return ret;
-}
-
-static gchar*
-peditor_enum_string_from_int (GType type, const int index, gboolean use_nick)
-{
- GEnumClass *klass;
- GEnumValue *val;
- gchar *ret = NULL;
-
- klass = g_type_class_ref (type);
- val = g_enum_get_value (klass, index);
- if (val)
- {
- if (val->value_nick && use_nick)
- ret = g_strdup (val->value_nick);
- else
- ret = g_strdup (val->value_name);
- }
-
- g_type_class_unref (klass);
-
- return ret;
-}
-
-static GConfValue*
-peditor_enum_conv_to_widget (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *ret;
- GConfPropertyEditorEnumData *data = peditor->p->data;
- int index;
-
- if (value->type == GCONF_VALUE_INT)
- return gconf_value_copy (value);
-
- ret = gconf_value_new (GCONF_VALUE_INT);
-
- index = peditor_enum_int_from_string (data->enum_type,
- gconf_value_get_string (value),
- data->use_nick);
-
- gconf_value_set_int (ret, index);
-
- return ret;
-}
-
-static GConfValue*
-peditor_enum_conv_from_widget (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *ret;
- GConfPropertyEditorEnumData *data = peditor->p->data;
- gchar *str;
-
- if (value->type == GCONF_VALUE_STRING)
- return gconf_value_copy (value);
-
- ret = gconf_value_new (GCONF_VALUE_STRING);
- str = peditor_enum_string_from_int (data->enum_type,
- gconf_value_get_int (value),
- data->use_nick);
- gconf_value_set_string (ret, str);
- g_free (str);
-
- return ret;
-}
-
-static void
-peditor_select_menu_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- gtk_option_menu_set_history (GTK_OPTION_MENU (peditor->p->ui_control), gconf_value_get_int (value_wid));
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_select_menu_widget_changed (GConfPropertyEditor *peditor,
- GtkOptionMenu *option_menu)
-{
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
- value_wid = gconf_value_new (GCONF_VALUE_INT);
- gconf_value_set_int (value_wid, gtk_option_menu_get_history (option_menu));
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-GObject *
-gconf_peditor_new_select_menu (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *option_menu,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (option_menu != NULL, NULL);
- g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_select_menu_value_changed,
- changeset,
- G_OBJECT (option_menu),
- first_property_name,
- var_args, NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (option_menu), "changed",
- (GCallback) peditor_select_menu_widget_changed, peditor);
-
- return peditor;
-}
-
-GObject *
-gconf_peditor_new_select_menu_with_enum (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *option_menu,
- GType enum_type,
- gboolean use_nick,
- gchar *first_property_name,
- ...)
-{
- GConfPropertyEditor *peditor;
- GConfPropertyEditorEnumData *data;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (option_menu != NULL, NULL);
- g_return_val_if_fail (GTK_IS_OPTION_MENU (option_menu), NULL);
- g_return_val_if_fail (enum_type != G_TYPE_NONE, NULL);
-
- data = g_new0 (GConfPropertyEditorEnumData, 1);
- data->enum_type = enum_type;
- data->use_nick = use_nick;
-
- va_start (var_args, first_property_name);
-
- peditor = GCONF_PROPERTY_EDITOR (
- gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_select_menu_value_changed,
- changeset,
- G_OBJECT (option_menu),
- first_property_name,
- var_args,
- "conv-to-widget-cb",
- peditor_enum_conv_to_widget,
- "conv-from-widget-cb",
- peditor_enum_conv_from_widget,
- "data",
- data,
- "data-free-cb",
- g_free,
- NULL
- ));
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (option_menu), "changed",
- (GCallback) peditor_select_menu_widget_changed, peditor);
-
- return G_OBJECT (peditor);
-}
-
-static void
-peditor_select_radio_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GSList *group, *link;
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- group = g_slist_copy (gtk_radio_button_get_group (GTK_RADIO_BUTTON (peditor->p->ui_control)));
- group = g_slist_reverse (group);
- link = g_slist_nth (group, gconf_value_get_int (value_wid));
- if (link && link->data)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (link->data), TRUE);
- gconf_value_free (value_wid);
- g_slist_free (group);
- }
-}
-
-static void
-peditor_select_radio_widget_changed (GConfPropertyEditor *peditor,
- GtkToggleButton *tb)
-{
- GSList *group;
- GConfValue *value, *value_wid;
-
- if (!peditor->p->inited) return;
- if (!tb->active) return;
-
- value_wid = gconf_value_new (GCONF_VALUE_INT);
- group = g_slist_copy (gtk_radio_button_get_group (GTK_RADIO_BUTTON (peditor->p->ui_control)));
- group = g_slist_reverse (group);
-
- gconf_value_set_int (value_wid, g_slist_index (group, tb));
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
-
- gconf_value_free (value_wid);
- gconf_value_free (value);
- g_slist_free (group);
-}
-
-GObject *
-gconf_peditor_new_select_radio (GConfChangeSet *changeset,
- gchar *key,
- GSList *radio_group,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- GtkRadioButton *first_button;
- GSList *item;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (radio_group != NULL, NULL);
- g_return_val_if_fail (radio_group->data != NULL, NULL);
- g_return_val_if_fail (GTK_IS_RADIO_BUTTON (radio_group->data), NULL);
-
- first_button = GTK_RADIO_BUTTON (radio_group->data);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_select_radio_value_changed,
- changeset,
- G_OBJECT (first_button),
- first_property_name,
- var_args, NULL);
-
- va_end (var_args);
-
- for (item = radio_group; item != NULL; item = item->next)
- g_signal_connect_swapped (G_OBJECT (item->data), "toggled",
- (GCallback) peditor_select_radio_widget_changed, peditor);
-
- return peditor;
-}
-
-static void
-peditor_numeric_range_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
-
- switch (value_wid->type) {
- case GCONF_VALUE_FLOAT:
- gtk_adjustment_set_value (GTK_ADJUSTMENT (peditor->p->ui_control), gconf_value_get_float (value_wid));
- break;
- case GCONF_VALUE_INT:
- gtk_adjustment_set_value (GTK_ADJUSTMENT (peditor->p->ui_control), gconf_value_get_int (value_wid));
- break;
- default:
- g_warning ("Unknown type in range peditor: %d\n", value_wid->type);
- }
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_numeric_range_widget_changed (GConfPropertyEditor *peditor,
- GtkAdjustment *adjustment)
-{
- GConfValue *value, *value_wid, *default_value;
- GConfClient *client;
-
- if (!peditor->p->inited) return;
-
- /* We try to get the default type from the schemas. if not, we default
- * to a float.
- */
- client = gconf_client_get_default();
-
- default_value = gconf_client_get_default_from_schema (client,
- peditor->p->key,
- NULL);
- g_object_unref (client);
-
- if (default_value)
- value_wid = gconf_value_new (default_value->type);
- else {
- g_warning ("Unable to find a default value for key for %s.\n"
- "I'll assume it is an integer, but that may break things.\n"
- "Please be sure that the associated schema is installed",
- peditor->p->key);
- value_wid = gconf_value_new (GCONF_VALUE_INT);
- }
-
- gconf_value_free (default_value);
-
- g_assert (value_wid);
-
- if (value_wid->type == GCONF_VALUE_INT)
- gconf_value_set_int (value_wid, gtk_adjustment_get_value (adjustment));
- else if (value_wid->type == GCONF_VALUE_FLOAT)
- gconf_value_set_float (value_wid, gtk_adjustment_get_value (adjustment));
- else {
- g_warning ("unable to set a gconf key for %s of type %d\n",
- peditor->p->key,
- value_wid->type);
- gconf_value_free (value_wid);
- return;
- }
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-GObject *
-gconf_peditor_new_numeric_range (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *range,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- GObject *adjustment = NULL;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (range != NULL, NULL);
- g_return_val_if_fail (GTK_IS_RANGE (range)||GTK_IS_SPIN_BUTTON (range), NULL);
-
- if (GTK_IS_RANGE (range))
- adjustment = G_OBJECT (gtk_range_get_adjustment (GTK_RANGE (range)));
- else if (GTK_IS_SPIN_BUTTON (range))
- adjustment = G_OBJECT (gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (range)));
- else
- g_assert_not_reached ();
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_numeric_range_value_changed,
- changeset,
- G_OBJECT (adjustment),
- first_property_name,
- var_args, NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (adjustment, "value_changed",
- (GCallback) peditor_numeric_range_widget_changed, peditor);
-
- return peditor;
-}
-
-static gboolean
-guard_get_bool (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- if (value->type == GCONF_VALUE_BOOL)
- return gconf_value_get_bool (value);
- else
- {
- GConfPropertyEditorEnumData *data = peditor->p->data;
- int index = peditor_enum_int_from_string (data->enum_type, gconf_value_get_string (value), data->use_nick);
- return (index != data->enum_val_false);
- }
-}
-
-static void
-guard_value_changed (GConfPropertyEditor *peditor,
- const gchar *key,
- const GConfValue *value,
- GtkWidget *widget)
-{
- gtk_widget_set_sensitive (widget, guard_get_bool (peditor, value));
-}
-
-void
-gconf_peditor_widget_set_guard (GConfPropertyEditor *peditor,
- GtkWidget *widget)
-{
- GConfClient *client;
- GConfValue *value;
-
- g_return_if_fail (peditor != NULL);
- g_return_if_fail (IS_GCONF_PROPERTY_EDITOR (peditor));
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- client = gconf_client_get_default ();
-
- value = gconf_client_get (client, peditor->p->key, NULL);
- g_object_unref (client);
-
- if (value) {
- gtk_widget_set_sensitive (widget, guard_get_bool (peditor, value));
- gconf_value_free (value);
- } else {
- g_warning ("NULL GConf value: %s: possibly incomplete setup", peditor->p->key);
- }
-
- g_signal_connect (G_OBJECT (peditor), "value-changed", (GCallback) guard_value_changed, widget);
-}
-
-GConfValue *
-gconf_value_int_to_float (GConfPropertyEditor *ignored, const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_FLOAT);
- gconf_value_set_float (new_value, gconf_value_get_int (value));
- return new_value;
-}
-
-GConfValue *
-gconf_value_float_to_int (GConfPropertyEditor *ignored, const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- gconf_value_set_int (new_value, gconf_value_get_float (value));
- return new_value;
-}
-
-static void
-peditor_font_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
- if (value != NULL) {
- const gchar *font;
-
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- font = gconf_value_get_string (value_wid);
- gtk_font_button_set_font_name (GTK_FONT_BUTTON (peditor->p->ui_control),
- font);
- gconf_value_free (value_wid);
- }
-}
-
-static void
-peditor_font_widget_changed (GConfPropertyEditor *peditor,
- GtkFontButton *font_button)
-{
- const gchar *font_name;
- GConfValue *value, *value_wid = NULL;
-
- if (!peditor->p->inited)
- return;
-
- font_name = gtk_font_button_get_font_name (font_button);
-
- value_wid = gconf_value_new (GCONF_VALUE_STRING);
- gconf_value_set_string (value_wid, font_name);
-
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
-
- gconf_value_free (value_wid);
- gconf_value_free (value);
-}
-
-GObject *
-gconf_peditor_new_font (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *font_button,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (GTK_IS_FONT_BUTTON (font_button), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new (key,
- (GConfClientNotifyFunc) peditor_font_value_changed,
- changeset,
- G_OBJECT (font_button),
- first_property_name,
- var_args,
- NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (font_button, "font_set",
- (GCallback) peditor_font_widget_changed, peditor);
-
- return peditor;
-}
-
-static GConfValue*
-peditor_enum_toggle_conv_to_widget (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *ret;
- GConfPropertyEditorEnumData *data = peditor->p->data;
- int index;
-
- if (value->type == GCONF_VALUE_BOOL)
- return gconf_value_copy (value);
-
- ret = gconf_value_new (GCONF_VALUE_BOOL);
-
- index = peditor_enum_int_from_string (data->enum_type,
- gconf_value_get_string (value),
- data->use_nick);
- gconf_value_set_bool (ret, (index != data->enum_val_false));
-
- return ret;
-}
-
-static GConfValue*
-peditor_enum_toggle_conv_from_widget (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *ret;
- GConfPropertyEditorEnumData *data = peditor->p->data;
- gchar *str;
- int index;
-
- if (value->type == GCONF_VALUE_STRING)
- return gconf_value_copy (value);
-
- ret = gconf_value_new (GCONF_VALUE_STRING);
- if (gconf_value_get_bool (value))
- index = data->enum_val_true_fn (peditor, data->enum_val_true_fn_data);
- else
- index = data->enum_val_false;
-
- str = peditor_enum_string_from_int (data->enum_type, index, data->use_nick);
- gconf_value_set_string (ret, str);
- g_free (str);
-
- return ret;
-}
-
-GObject *
-gconf_peditor_new_enum_toggle (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *checkbox,
- GType enum_type,
- GConfPEditorGetValueFn val_true_fn,
- guint val_false,
- gboolean use_nick,
- gpointer data,
- gchar *first_property_name,
- ...)
-{
- GConfPropertyEditor *peditor;
- GConfPropertyEditorEnumData *enum_data;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (checkbox != NULL, NULL);
- g_return_val_if_fail (GTK_IS_TOGGLE_BUTTON (checkbox), NULL);
-
- enum_data = g_new0 (GConfPropertyEditorEnumData, 1);
- enum_data->enum_type = enum_type;
- enum_data->enum_val_true_fn = val_true_fn;
- enum_data->enum_val_true_fn_data = data;
- enum_data->enum_val_false = val_false;
- enum_data->use_nick = use_nick;
-
- va_start (var_args, first_property_name);
-
- peditor = GCONF_PROPERTY_EDITOR (
- gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_boolean_value_changed,
- changeset,
- G_OBJECT (checkbox),
- first_property_name,
- var_args,
- "conv-to-widget-cb",
- peditor_enum_toggle_conv_to_widget,
- "conv-from-widget-cb",
- peditor_enum_toggle_conv_from_widget,
- "data",
- enum_data,
- "data-free-cb",
- g_free,
- NULL));
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (checkbox), "toggled",
- (GCallback) peditor_boolean_widget_changed, peditor);
-
- return G_OBJECT (peditor);
-}
-
-gboolean
-peditor_image_set_filename (GConfPropertyEditor *peditor, const gchar *filename)
-{
- GdkPixbuf *pixbuf = NULL;
- GtkImage *image = NULL;
- const int scale = 100;
- gchar *message = NULL;
- GList *l;
-
- /* NULL is not valid, however "" is, but not an error (it's
- * the default) */
- g_return_val_if_fail (filename != NULL, FALSE);
-
-
- if (!g_file_test (filename, G_FILE_TEST_EXISTS))
- {
- message = g_strdup_printf (_("Couldn't find the file '%s'.\n\nPlease make "
- "sure it exists and try again, "
- "or choose a different background picture."),
- filename);
-
- }
- else if (!(pixbuf = gdk_pixbuf_new_from_file_at_size (filename, scale, scale, NULL)))
- {
- message = g_strdup_printf (_("I don't know how to open the file '%s'.\n"
- "Perhaps it's "
- "a kind of picture that is not yet supported.\n\n"
- "Please select a different picture instead."),
- filename);
- }
-
- if (GTK_IS_IMAGE (GTK_BIN (peditor->p->ui_control)->child))
- image = GTK_IMAGE (GTK_BIN (peditor->p->ui_control)->child);
- else
- {
- for (l = gtk_container_get_children (GTK_CONTAINER (GTK_BIN (peditor->p->ui_control)->child)); l != NULL; l = l->next)
- {
- if (GTK_IS_IMAGE (l->data))
- image = GTK_IMAGE (l->data);
- else if (GTK_IS_LABEL (l->data) && message == NULL)
- {
- gchar *base = g_path_get_basename (filename);
- gtk_label_set_text (GTK_LABEL (l->data), base);
- g_free (base);
- }
- }
- }
-
- if (message)
- {
- if (peditor->p->inited)
- {
- GtkWidget *box;
-
- box = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- message);
- gtk_dialog_run (GTK_DIALOG (box));
- gtk_widget_destroy (box);
- } else {
- gtk_image_set_from_stock (image, GTK_STOCK_MISSING_IMAGE,
- GTK_ICON_SIZE_BUTTON);
- }
- g_free (message);
-
- return FALSE;
- }
-
- gtk_image_set_from_pixbuf (image, pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
-
- return TRUE;
-}
-
-void
-peditor_image_chooser_response_cb (GtkWidget *chooser,
- gint response,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
- gchar *filename;
-
- if (response == GTK_RESPONSE_CANCEL ||
- response == GTK_RESPONSE_DELETE_EVENT)
- {
- gtk_widget_destroy (chooser);
- return;
- }
-
- if (!peditor->p->inited)
- return;
-
- filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (chooser));
- if (!(filename && peditor_image_set_filename (peditor, filename)))
- {
- g_free (filename);
- return;
- }
-
- value_wid = gconf_value_new (GCONF_VALUE_STRING);
- gconf_value_set_string (value_wid, filename);
- value = peditor->p->conv_from_widget_cb (peditor, value_wid);
-
- peditor_set_gconf_value (peditor, peditor->p->key, value);
- g_signal_emit (peditor, peditor_signals[VALUE_CHANGED], 0, peditor->p->key, value);
-
- gconf_value_free (value_wid);
- gconf_value_free (value);
- g_free (filename);
- gtk_widget_destroy (chooser);
-}
-
-void
-peditor_image_chooser_update_preview_cb (GtkFileChooser *chooser,
- GtkImage *preview)
-{
- char *filename;
- GdkPixbuf *pixbuf = NULL;
- const int scale = 100;
-
- filename = gtk_file_chooser_get_preview_filename (chooser);
-
- if (filename != NULL && g_file_test (filename, G_FILE_TEST_IS_REGULAR))
- pixbuf = gdk_pixbuf_new_from_file_at_size (filename, scale, scale, NULL);
-
- gtk_image_set_from_pixbuf (preview, pixbuf);
-
- g_free (filename);
-
- if (pixbuf != NULL)
- gdk_pixbuf_unref (pixbuf);
-}
-
-void
-peditor_image_clicked_cb (GConfPropertyEditor *peditor, GtkButton *button)
-{
- GConfValue *value = NULL, *value_wid;
- const gchar *filename;
- GtkWidget *chooser, *toplevel, *preview, *preview_box;
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (button));
- chooser = gtk_file_chooser_dialog_new (_("Please select an image."),
- GTK_IS_WINDOW (toplevel) ? GTK_WINDOW (toplevel)
- : NULL,
- GTK_FILE_CHOOSER_ACTION_OPEN,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- _("_Select"), GTK_RESPONSE_OK,
- NULL);
-
- preview = gtk_image_new ();
-
- preview_box = gtk_hbox_new (FALSE, 6);
- gtk_box_pack_start (GTK_BOX (preview_box), preview, FALSE, TRUE, 0);
- gtk_container_set_border_width (GTK_CONTAINER (preview_box), 6);
-
- gtk_widget_show_all (preview_box);
- gtk_file_chooser_set_preview_widget (GTK_FILE_CHOOSER (chooser),
- preview_box);
- gtk_file_chooser_set_preview_widget_active (GTK_FILE_CHOOSER (chooser),
- TRUE);
-
- gtk_dialog_set_default_response (GTK_DIALOG (chooser), GTK_RESPONSE_OK);
- gtk_window_set_destroy_with_parent (GTK_WINDOW (chooser), TRUE);
- gtk_window_set_modal (GTK_WINDOW (chooser), TRUE);
-
- /* need the current filename */
- if (peditor->p->changeset)
- gconf_change_set_check_value (peditor->p->changeset, peditor->p->key, &value);
-
- if (value)
- {
- /* the one we got is not a copy */
- value = gconf_value_copy (value);
- }
- else
- {
- GConfClient *client = gconf_client_get_default ();
- value = gconf_client_get (client, peditor->p->key, NULL);
- g_object_unref (client);
- }
-
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- filename = gconf_value_get_string (value_wid);
-
- if (filename && strcmp (filename, ""))
- gtk_file_chooser_set_filename (GTK_FILE_CHOOSER (chooser), filename);
-
- g_signal_connect (G_OBJECT (chooser), "update-preview",
- G_CALLBACK (peditor_image_chooser_update_preview_cb),
- preview);
- g_signal_connect (G_OBJECT (chooser), "response",
- G_CALLBACK (peditor_image_chooser_response_cb),
- peditor);
-
- if (gtk_grab_get_current ())
- gtk_grab_add (chooser);
-
- gtk_widget_show (chooser);
-
- gconf_value_free (value);
- gconf_value_free (value_wid);
-}
-
-static void
-peditor_image_value_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- GConfPropertyEditor *peditor)
-{
- GConfValue *value, *value_wid;
-
- if (peditor->p->changeset != NULL)
- gconf_change_set_remove (peditor->p->changeset, peditor->p->key);
-
- value = gconf_entry_get_value (entry);
-
- if (value != NULL) {
- const gchar *filename;
-
- value_wid = peditor->p->conv_to_widget_cb (peditor, value);
- filename = gconf_value_get_string (value_wid);
- peditor_image_set_filename (peditor, filename);
- gconf_value_free (value_wid);
- }
-}
-
-GObject *
-gconf_peditor_new_image (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *button,
- gchar *first_property_name,
- ...)
-{
- GObject *peditor;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (button != NULL, NULL);
- g_return_val_if_fail (GTK_IS_BUTTON (button), NULL);
-
- va_start (var_args, first_property_name);
-
- peditor = gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_image_value_changed,
- changeset,
- G_OBJECT (button),
- first_property_name,
- var_args, NULL);
-
- va_end (var_args);
-
- g_signal_connect_swapped (G_OBJECT (button), "clicked",
- (GCallback) peditor_image_clicked_cb, peditor);
-
- return peditor;
-}
-
-GObject *
-gconf_peditor_new_select_radio_with_enum (GConfChangeSet *changeset,
- gchar *key,
- GSList *radio_group,
- GType enum_type,
- gboolean use_nick,
- gchar *first_property_name,
- ...)
-{
- GConfPropertyEditor *peditor;
- GConfPropertyEditorEnumData *enum_data;
- GtkRadioButton *first_button;
- GSList *item;
- va_list var_args;
-
- g_return_val_if_fail (key != NULL, NULL);
- g_return_val_if_fail (radio_group != NULL, NULL);
- g_return_val_if_fail (radio_group->data != NULL, NULL);
- g_return_val_if_fail (GTK_IS_RADIO_BUTTON (radio_group->data), NULL);
-
- enum_data = g_new0 (GConfPropertyEditorEnumData, 1);
- enum_data->enum_type = enum_type;
- enum_data->use_nick = use_nick;
-
- first_button = GTK_RADIO_BUTTON (radio_group->data);
-
- va_start (var_args, first_property_name);
-
- peditor = GCONF_PROPERTY_EDITOR (
- gconf_peditor_new
- (key,
- (GConfClientNotifyFunc) peditor_select_radio_value_changed,
- changeset,
- G_OBJECT (first_button),
- first_property_name,
- var_args,
- "conv-to-widget-cb",
- peditor_enum_conv_to_widget,
- "conv-from-widget-cb",
- peditor_enum_conv_from_widget,
- "data",
- enum_data,
- "data-free-cb",
- g_free,
- NULL));
-
- va_end (var_args);
-
- for (item = radio_group; item != NULL; item = item->next)
- g_signal_connect_swapped (G_OBJECT (item->data), "toggled",
- (GCallback) peditor_select_radio_widget_changed, peditor);
-
- return G_OBJECT (peditor);
-}
-
diff --git a/capplets/common/gconf-property-editor.h b/capplets/common/gconf-property-editor.h
deleted file mode 100644
index 8a39e02cb..000000000
--- a/capplets/common/gconf-property-editor.h
+++ /dev/null
@@ -1,157 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gconf-property-editor.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __GCONF_PROPERTY_EDITOR_H
-#define __GCONF_PROPERTY_EDITOR_H
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <gconf/gconf-changeset.h>
-
-G_BEGIN_DECLS
-
-#define GCONF_PROPERTY_EDITOR(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, gconf_property_editor_get_type (), GConfPropertyEditor)
-#define GCONF_PROPERTY_EDITOR_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, gconf_property_editor_get_type (), GConfPropertyEditorClass)
-#define IS_GCONF_PROPERTY_EDITOR(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, gconf_property_editor_get_type ())
-
-typedef struct _GConfPropertyEditor GConfPropertyEditor;
-typedef struct _GConfPropertyEditorClass GConfPropertyEditorClass;
-typedef struct _GConfPropertyEditorPrivate GConfPropertyEditorPrivate;
-
-typedef GConfValue *(*GConfPEditorValueConvFn) (GConfPropertyEditor *peditor, const GConfValue *);
-typedef int (*GConfPEditorGetValueFn) (GConfPropertyEditor *peditor, gpointer data);
-
-struct _GConfPropertyEditor
-{
- GObject parent;
-
- GConfPropertyEditorPrivate *p;
-};
-
-struct _GConfPropertyEditorClass
-{
- GObjectClass g_object_class;
-
- void (*value_changed) (GConfPropertyEditor *peditor, gchar *key, GConfValue *value);
-};
-
-GType gconf_property_editor_get_type (void);
-
-const gchar *gconf_property_editor_get_key (GConfPropertyEditor *peditor);
-GObject *gconf_property_editor_get_ui_control (GConfPropertyEditor *peditor);
-
-GObject *gconf_peditor_new_boolean (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *checkbox,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_enum_toggle (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *checkbox,
- GType enum_type,
- GConfPEditorGetValueFn val_true_fn,
- guint val_false,
- gboolean use_nick,
- gpointer data,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_integer (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- ...);
-GObject *gconf_peditor_new_string (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *entry,
- gchar *first_property_name,
- ...);
-GObject *gconf_peditor_new_filename (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *file_entry,
- gchar *first_property_name,
- ...);
-GObject *gconf_peditor_new_color (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *color_entry,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_select_menu (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *option_menu,
- gchar *first_property_name,
- ...);
-
-
-GObject *gconf_peditor_new_select_menu_with_enum (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *option_menu,
- GType enum_type,
- gboolean use_nick,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_select_radio (GConfChangeSet *changeset,
- gchar *key,
- GSList *radio_group,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_select_radio_with_enum (GConfChangeSet *changeset,
- gchar *key,
- GSList *radio_group,
- GType enum_type,
- gboolean use_nick,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_numeric_range (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *range,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_font (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *font_button,
- gchar *first_property_name,
- ...);
-
-GObject *gconf_peditor_new_image (GConfChangeSet *changeset,
- gchar *key,
- GtkWidget *button,
- gchar *first_property,
- ...);
-
-void gconf_peditor_widget_set_guard (GConfPropertyEditor *peditor,
- GtkWidget *widget);
-
-/* some convenience callbacks to map int <-> float */
-GConfValue *gconf_value_int_to_float (GConfPropertyEditor *ignored, GConfValue const *value);
-GConfValue *gconf_value_float_to_int (GConfPropertyEditor *ignored, GConfValue const *value);
-
-G_END_DECLS
-
-#endif /* __GCONF_PROPERTY_EDITOR_H */
diff --git a/capplets/common/gnome-theme-apply.c b/capplets/common/gnome-theme-apply.c
deleted file mode 100644
index e11b25fa8..000000000
--- a/capplets/common/gnome-theme-apply.c
+++ /dev/null
@@ -1,65 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4 -*-
- * themus - utilities for GNOME themes
- * Copyright (C) 2002 Jonathan Blandford <aes@gnome.org>
- *
- * This library 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.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*/
-
-#include <string.h>
-#include <gconf/gconf-client.h>
-#include <gnome-wm-manager.h>
-#include "gnome-theme-apply.h"
-
-#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
-#define ICON_THEME_KEY "/desktop/gnome/interface/icon_theme"
-#define FONT_KEY "/desktop/gnome/interface/font_name"
-
-void
-gnome_meta_theme_set (GnomeThemeMetaInfo *meta_theme_info)
-{
- GConfClient *client;
- gchar *old_key;
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
-
- gnome_wm_manager_init ();
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
-
- client = gconf_client_get_default ();
-
- /* Set the gtk+ key */
- old_key = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
- if (old_key && strcmp (old_key, meta_theme_info->gtk_theme_name))
- {
- gconf_client_set_string (client, GTK_THEME_KEY, meta_theme_info->gtk_theme_name, NULL);
- }
- g_free (old_key);
-
- /* Set the wm key */
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- wm_settings.theme = meta_theme_info->metacity_theme_name;
- if (window_manager)
- gnome_window_manager_change_settings (window_manager, &wm_settings);
-
- /* set the icon theme */
- old_key = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
- if (old_key && strcmp (old_key, meta_theme_info->icon_theme_name))
- {
- gconf_client_set_string (client, ICON_THEME_KEY, meta_theme_info->icon_theme_name, NULL);
- }
- g_free (old_key);
- g_object_unref (client);
-}
diff --git a/capplets/common/gnome-theme-apply.h b/capplets/common/gnome-theme-apply.h
deleted file mode 100644
index e1228dc7b..000000000
--- a/capplets/common/gnome-theme-apply.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/* gnome-theme-info.h - GNOME Theme information
-
- Copyright (C) 2002 Jonathan Blandford <jrb@gnome.org>
- All rights reserved.
-
- This file is part of the Gnome Library.
-
- The Gnome Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The Gnome Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-/*
- @NOTATION@
- */
-
-#ifndef THEME_APPLY_H
-#define THEME_APPLY_H
-
-#include "gnome-theme-info.h"
-
-void gnome_meta_theme_set (GnomeThemeMetaInfo *meta_theme_info);
-
-#endif /* THEME_APPLY_H */
diff --git a/capplets/common/gnome-theme-info.c b/capplets/common/gnome-theme-info.c
deleted file mode 100644
index d109a8658..000000000
--- a/capplets/common/gnome-theme-info.c
+++ /dev/null
@@ -1,1692 +0,0 @@
-#include <gtk/gtk.h>
-#include <libgnomevfs/gnome-vfs-init.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-directory.h>
-#include <string.h>
-#include <libgnome/gnome-desktop-item.h>
-#include "gnome-theme-info.h"
-
-#define THEME_NAME "X-GNOME-Metatheme/Name"
-#define THEME_COMMENT "X-GNOME-Metatheme/Comment"
-#define GTK_THEME_KEY "X-GNOME-Metatheme/GtkTheme"
-#define METACITY_THEME_KEY "X-GNOME-Metatheme/MetacityTheme"
-#define SAWFISH_THEME_KEY "X-GNOME-Metatheme/SawfishTheme"
-#define ICON_THEME_KEY "X-GNOME-Metatheme/IconTheme"
-#define SOUND_THEME_KEY "X-GNOME-Metatheme/SoundTheme"
-#define APPLICATION_FONT_KEY "X-GNOME-Metatheme/ApplicationFont"
-#define BACKGROUND_IMAGE_KEY "X-GNOME-Metatheme/BackgroundImage"
-
-/* Terminology used in this lib:
- *
- * /usr/share/themes, ~/.themes -- top_theme_dir
- * top_theme_dir/theme_name/ -- common_theme_dir
- * /usr/share/icons, ~/.icons -- top_icon_theme_dir
- * top_icon_theme_dir/theme_name/ -- icon_common_theme_dir
- *
- */
-
-typedef struct _ThemeCallbackData
-{
- GFunc func;
- gpointer data;
-} ThemeCallbackData;
-
-typedef struct {
- GnomeVFSMonitorHandle *common_theme_dir_handle;
- GnomeVFSMonitorHandle *gtk2_dir_handle;
- GnomeVFSMonitorHandle *keybinding_dir_handle;
- GnomeVFSMonitorHandle *metacity_dir_handle;
- gint priority;
-} CommonThemeDirMonitorData;
-
-typedef struct {
- GnomeVFSMonitorHandle *common_icon_theme_dir_handle;
- gint priority;
-} CommonIconThemeDirMonitorData;
-
-typedef struct {
- GHashTable *handle_hash;
- gint priority;
-} CallbackTuple;
-
-
-/* Hash tables */
-
-/* The hashes_by_dir are indexed by an escaped uri of the common_theme_dir that
- * that particular theme is part of. The data pointed to by them is a
- * GnomeTheme{Meta,Icon,}Info struct. Note that the uri is of the form
- * "file:///home/username/.themes/foo", and not "/home/username/.themes/foo"
- */
-
-/* The hashes_by_name are hashed by the index of the theme. The data pointed to
- * by them is a GList whose data elements are GnomeTheme{Meta,Icon,}Info
- * structs. This is because a theme can be found both in the users ~/.theme as
- * well as globally in $prefix. All access to them must be done via helper
- * functions.
- */
-static GList *callbacks = NULL;
-
-static GHashTable *meta_theme_hash_by_uri;
-static GHashTable *meta_theme_hash_by_name;
-static GHashTable *icon_theme_hash_by_uri;
-static GHashTable *icon_theme_hash_by_name;
-static GHashTable *theme_hash_by_uri;
-static GHashTable *theme_hash_by_name;
-static gboolean initting = FALSE;
-
-/* prototypes */
-static gint safe_strcmp (gchar *a_str,
- gchar *b_str);
-static gint get_priority_from_data_by_hash (GHashTable *hash_table,
- gpointer data);
-static void add_data_to_hash_by_name (GHashTable *hash_table,
- gchar *name,
- gpointer data);
-static void remove_data_from_hash_by_name (GHashTable *hash_table,
- const gchar *name,
- gpointer data);
-static gpointer get_data_from_hash_by_name (GHashTable *hash_table,
- const gchar *name,
- gint priority);
-
-static GnomeThemeIconInfo *read_icon_theme (GnomeVFSURI *icon_theme_uri);
-static void handle_change_signal (GnomeThemeType type,
- gpointer theme,
- GnomeThemeChangeType change_type,
- GnomeThemeElement element);
-static void update_theme_index (GnomeVFSURI *index_uri,
- GnomeThemeElement key_element,
- gint priority);
-static void update_gtk2_index (GnomeVFSURI *gtk2_index_uri,
- gint priority);
-static void update_keybinding_index (GnomeVFSURI *keybinding_index_uri,
- gint priority);
-static void update_metacity_index (GnomeVFSURI *metacity_index_uri,
- gint priority);
-static void update_common_theme_dir_index (GnomeVFSURI *theme_index_uri,
- gboolean icon_theme,
- gint priority);
-static void update_meta_theme_index (GnomeVFSURI *meta_theme_index_uri,
- gint priority);
-static void update_icon_theme_index (GnomeVFSURI *icon_theme_index_uri,
- gint priority);
-static void gtk2_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void keybinding_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void metacity_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void common_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void common_icon_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void top_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static void top_icon_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data);
-static GnomeVFSResult add_common_theme_dir_monitor (GnomeVFSURI *theme_dir_uri,
- gboolean *monitor_not_added,
- CommonThemeDirMonitorData *monitor_data,
- GError **error);
-static GnomeVFSResult add_common_icon_theme_dir_monitor (GnomeVFSURI *theme_dir_uri,
- gboolean *monitor_not_added,
- CommonIconThemeDirMonitorData *monitor_data,
- GError **error);
-static void remove_common_theme_dir_monitor (CommonThemeDirMonitorData *monitor_data);
-static void remove_common_icon_theme_dir_monitor (CommonIconThemeDirMonitorData *monitor_data);
-static GnomeVFSResult real_add_top_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- gboolean icon_theme,
- GError **error);
-static GnomeVFSResult add_top_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- GError **error);
-static GnomeVFSResult add_top_icon_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- GError **error);
-
-/* private functions */
-static gint
-safe_strcmp (gchar *a_str,
- gchar *b_str)
-{
- if (a_str == NULL && b_str != NULL)
- return -1;
- if (a_str != NULL && b_str == NULL)
- return 1;
- if (a_str == NULL && b_str == NULL)
- return 0;
- return strcmp (a_str, b_str);
-}
-
-static gint
-get_priority_from_data_by_hash (GHashTable *hash_table,
- gpointer data)
-{
- gint theme_priority = 0;
- if (hash_table == meta_theme_hash_by_name)
- theme_priority = ((GnomeThemeMetaInfo *)data)->priority;
- else if (hash_table == icon_theme_hash_by_name)
- theme_priority = ((GnomeThemeIconInfo *)data)->priority;
- else if (hash_table == theme_hash_by_name)
- theme_priority = ((GnomeThemeInfo *)data)->priority;
- else
- g_assert_not_reached ();
-
- return theme_priority;
-}
-
-
-static void
-add_data_to_hash_by_name (GHashTable *hash_table,
- gchar *name,
- gpointer data)
-{
- GList *list;
-
- list = g_hash_table_lookup (hash_table, name);
- if (list == NULL)
- {
- list = g_list_append (list, data);
- }
- else
- {
- GList *list_ptr = list;
- gboolean added = FALSE;
- gint priority;
-
- priority = get_priority_from_data_by_hash (hash_table, data);
- while (list_ptr)
- {
- gint theme_priority;
-
- theme_priority = get_priority_from_data_by_hash (hash_table, list_ptr->data);
-
- if (theme_priority == priority)
- {
- /* Swap it in */
- list_ptr->data = data;
- added = TRUE;
- break;
- }
- if (theme_priority > priority)
- {
- list = g_list_insert_before (list, list_ptr, data);
- added = TRUE;
- break;
- }
- list_ptr = list_ptr->next;
- }
- if (! added)
- list = g_list_append (list, data);
- }
- g_hash_table_insert (hash_table, g_strdup (name), list);
-}
-
-static void
-remove_data_from_hash_by_name (GHashTable *hash_table,
- const gchar *name,
- gpointer data)
-{
- GList *list;
-
- list = g_hash_table_lookup (hash_table, name);
-
- list = g_list_remove (list, data);
- if (list == NULL)
- g_hash_table_remove (hash_table, name);
- else
- g_hash_table_insert (hash_table, g_strdup (name), list);
-
-}
-
-static gpointer
-get_data_from_hash_by_name (GHashTable *hash_table,
- const gchar *name,
- gint priority)
-{
- GList *list;
-
- list = g_hash_table_lookup (hash_table, name);
-
- /* -1 implies return the first one */
- if (priority == -1)
- {
- if (list)
- return list->data;
-
- return NULL;
- }
- while (list)
- {
- gint theme_priority ;
-
- theme_priority = get_priority_from_data_by_hash (hash_table, list->data);
-
- if (theme_priority == priority)
- return list->data;
-
- list = list->next;
- }
- return NULL;
-}
-
-GnomeThemeMetaInfo *
-gnome_theme_read_meta_theme (GnomeVFSURI *meta_theme_uri)
-{
- GnomeThemeMetaInfo *meta_theme_info;
- GnomeVFSURI *common_theme_dir_uri;
- GnomeDesktopItem *meta_theme_ditem;
- gchar *meta_theme_file;
- const gchar *str;
-
- meta_theme_file = gnome_vfs_uri_to_string (meta_theme_uri, GNOME_VFS_URI_HIDE_NONE);
- meta_theme_ditem = gnome_desktop_item_new_from_uri (meta_theme_file, 0, NULL);
- if (meta_theme_ditem == NULL)
- {
- g_free (meta_theme_file);
- return NULL;
- }
- common_theme_dir_uri = gnome_vfs_uri_get_parent (meta_theme_uri);
-
- meta_theme_info = gnome_theme_meta_info_new ();
- meta_theme_info->path = meta_theme_file;
- meta_theme_info->name = gnome_vfs_uri_extract_short_name (common_theme_dir_uri);
- gnome_vfs_uri_unref (common_theme_dir_uri);
- str = gnome_desktop_item_get_localestring (meta_theme_ditem, THEME_NAME);
-
- if (!str)
- {
- str = gnome_desktop_item_get_localestring (meta_theme_ditem, GNOME_DESKTOP_ITEM_NAME);
- if (!str) /* shouldn't reach */
- {
- gnome_theme_meta_info_free (meta_theme_info);
- return NULL;
- }
- }
-
- meta_theme_info->readable_name = g_strdup (str);
-
- str = gnome_desktop_item_get_localestring (meta_theme_ditem, THEME_COMMENT);
- if (str == NULL)
- str = gnome_desktop_item_get_localestring (meta_theme_ditem, GNOME_DESKTOP_ITEM_COMMENT);
- if (str != NULL)
- meta_theme_info->comment = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, GNOME_DESKTOP_ITEM_ICON);
- if (str != NULL)
- meta_theme_info->icon_file = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, GTK_THEME_KEY);
- if (str == NULL)
- {
- gnome_theme_meta_info_free (meta_theme_info);
- return NULL;
- }
- meta_theme_info->gtk_theme_name = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, METACITY_THEME_KEY);
- if (str == NULL)
- {
- gnome_theme_meta_info_free (meta_theme_info);
- return NULL;
- }
- meta_theme_info->metacity_theme_name = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, ICON_THEME_KEY);
- if (str == NULL)
- {
- gnome_theme_meta_info_free (meta_theme_info);
- return NULL;
- }
- meta_theme_info->icon_theme_name = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, APPLICATION_FONT_KEY);
- if (str != NULL)
- meta_theme_info->application_font = g_strdup (str);
-
- str = gnome_desktop_item_get_string (meta_theme_ditem, BACKGROUND_IMAGE_KEY);
- if (str != NULL)
- meta_theme_info->background_image = g_strdup (str);
-
- gnome_desktop_item_unref (meta_theme_ditem);
-
- return meta_theme_info;
-}
-
-static GnomeThemeIconInfo *
-read_icon_theme (GnomeVFSURI *icon_theme_uri)
-{
- GnomeThemeIconInfo *icon_theme_info;
- GnomeDesktopItem *icon_theme_ditem;
- char *icon_theme_file;
- const gchar *name;
- const gchar *hidden_theme_icon;
-
- icon_theme_file = gnome_vfs_uri_to_string (icon_theme_uri, GNOME_VFS_URI_HIDE_NONE);
- icon_theme_ditem = gnome_desktop_item_new_from_uri (icon_theme_file, 0, NULL);
- if (icon_theme_ditem == NULL)
- {
- g_free (icon_theme_file);
- return NULL;
- }
-
- name = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Name");
- if (name == NULL)
- {
- gnome_desktop_item_unref (icon_theme_ditem);
- g_free (icon_theme_file);
- return NULL;
- }
- hidden_theme_icon = gnome_desktop_item_get_string (icon_theme_ditem, "Icon Theme/Hidden");
-
- if (hidden_theme_icon == NULL ||
- strcmp (hidden_theme_icon, "false") == 0)
- {
- icon_theme_info = gnome_theme_icon_info_new ();
- icon_theme_info->name = g_strdup (name);
- icon_theme_info->path = icon_theme_file;
- }
- else
- {
- gnome_desktop_item_unref (icon_theme_ditem);
- return NULL;
- }
-
- gnome_desktop_item_unref (icon_theme_ditem);
-
- return icon_theme_info;
-}
-
-static void
-handle_change_signal (GnomeThemeType type,
- gpointer theme,
- GnomeThemeChangeType change_type,
- GnomeThemeElement element)
-{
-#ifdef DEBUG
- gchar *type_str = NULL;
- gchar *element_str = NULL;
-#endif
- gchar *uri = NULL;
- GList *list;
-
- if (initting)
- return;
-
- if (type == GNOME_THEME_TYPE_REGULAR)
- uri = g_strdup (((GnomeThemeInfo *)theme)->path);
- else if (type == GNOME_THEME_TYPE_METATHEME)
- uri = g_strdup (((GnomeThemeMetaInfo *)theme)->path);
- else if (type == GNOME_THEME_TYPE_ICON)
- uri = g_strdup (((GnomeThemeIconInfo *)theme)->path);
-
- for (list = callbacks; list; list = list->next)
- {
- ThemeCallbackData *callback_data = list->data;
- (* callback_data->func) (uri, callback_data->data);
- }
-
-#ifdef DEBUG
- if (change_type == GNOME_THEME_CHANGE_CREATED)
- type_str = "created";
- else if (change_type == GNOME_THEME_CHANGE_CHANGED)
- type_str = "changed";
- else if (change_type == GNOME_THEME_CHANGE_DELETED)
- type_str = "deleted";
-
- if (element & GNOME_THEME_GTK_2)
- element_str = "gtk-2";
- else if (element & GNOME_THEME_GTK_2_KEYBINDING)
- element_str = "keybinding";
- if (element & GNOME_THEME_METACITY)
- element_str = "metacity";
-
- if (type == GNOME_THEME_TYPE_REGULAR)
- {
- g_print ("theme \"%s\" has a theme of type %s (priority %d) has been %s\n",
- ((GnomeThemeInfo *) theme)->name,
- element_str,
- ((GnomeThemeInfo *) theme)->priority,
- type_str);
- }
- else if (type == GNOME_THEME_TYPE_METATHEME)
- {
- g_print ("meta theme \"%s\" (priority %d) has been %s\n",
- ((GnomeThemeMetaInfo *) theme)->name,
- ((GnomeThemeMetaInfo *) theme)->priority,
- type_str);
- }
- else if (type == GNOME_THEME_TYPE_ICON)
- {
- g_print ("icon theme \"%s\" (priority %d) has been %s\n",
- ((GnomeThemeIconInfo *) theme)->name,
- ((GnomeThemeIconInfo *) theme)->priority,
- type_str);
- }
-#endif
-}
-
-/* gtk2_index_uri should point to the gtkrc file that was modified */
-static void
-update_theme_index (GnomeVFSURI *index_uri,
- GnomeThemeElement key_element,
- gint priority)
-{
- GnomeVFSFileInfo *file_info;
- GnomeVFSResult result;
- gboolean theme_exists;
- GnomeThemeInfo *theme_info;
- GnomeVFSURI *parent;
- GnomeVFSURI *common_theme_dir_uri;
- gchar *common_theme_dir;
-
- /* First, we determine the new state of the file. We do no more
- * sophisticated a test than "files exists and is a file" */
- file_info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info_uri (index_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_REGULAR)
- theme_exists = TRUE;
- else
- theme_exists = FALSE;
- gnome_vfs_file_info_unref (file_info);
-
- /* Next, we see what currently exists */
- parent = gnome_vfs_uri_get_parent (index_uri);
- common_theme_dir_uri = gnome_vfs_uri_get_parent (parent);
- common_theme_dir = gnome_vfs_uri_to_string (common_theme_dir_uri, GNOME_VFS_URI_HIDE_NONE);
-
- theme_info = g_hash_table_lookup (theme_hash_by_uri, common_theme_dir);
- if (theme_info == NULL)
- {
- if (theme_exists)
- {
- theme_info = gnome_theme_info_new ();
- theme_info->path = g_strdup (common_theme_dir);
- theme_info->name = gnome_vfs_uri_extract_short_name (common_theme_dir_uri);
- theme_info->priority = priority;
- if (key_element & GNOME_THEME_GTK_2)
- theme_info->has_gtk = TRUE;
- else if (key_element & GNOME_THEME_GTK_2_KEYBINDING)
- theme_info->has_keybinding = TRUE;
- else if (key_element & GNOME_THEME_METACITY)
- theme_info->has_metacity = TRUE;
-
- g_hash_table_insert (theme_hash_by_uri, g_strdup (common_theme_dir), theme_info);
- add_data_to_hash_by_name (theme_hash_by_name, theme_info->name, theme_info);
- handle_change_signal (GNOME_THEME_TYPE_REGULAR, theme_info, GNOME_THEME_CHANGE_CREATED, key_element);
- }
- }
- else
- {
- gboolean theme_used_to_exist = FALSE;
-
- if (key_element & GNOME_THEME_GTK_2)
- {
- theme_used_to_exist = theme_info->has_gtk;
- theme_info->has_gtk = theme_exists;
- }
- else if (key_element & GNOME_THEME_GTK_2_KEYBINDING)
- {
- theme_used_to_exist = theme_info->has_keybinding;
- theme_info->has_keybinding = theme_exists;
- }
- else if (key_element & GNOME_THEME_METACITY)
- {
- theme_used_to_exist = theme_info->has_metacity;
- theme_info->has_metacity = theme_exists;
- }
-
- if (!theme_info->has_metacity && !theme_info->has_keybinding && !theme_info->has_gtk)
- {
- g_hash_table_remove (theme_hash_by_uri, common_theme_dir);
- remove_data_from_hash_by_name (theme_hash_by_name, theme_info->name, theme_info);
- }
-
- if (theme_exists && theme_used_to_exist)
- {
- handle_change_signal (GNOME_THEME_TYPE_REGULAR, theme_info, GNOME_THEME_CHANGE_CHANGED, key_element);
- }
- else if (theme_exists && !theme_used_to_exist)
- {
- handle_change_signal (GNOME_THEME_TYPE_REGULAR, theme_info, GNOME_THEME_CHANGE_CREATED, key_element);
- }
- else if (! theme_exists && theme_used_to_exist)
- {
- handle_change_signal (GNOME_THEME_TYPE_REGULAR, theme_info, GNOME_THEME_CHANGE_DELETED, key_element);
- }
-
- if (!theme_info->has_metacity && !theme_info->has_keybinding && !theme_info->has_gtk)
- {
- gnome_theme_info_free (theme_info);
- }
- }
-
- g_free (common_theme_dir);
- gnome_vfs_uri_unref (parent);
- gnome_vfs_uri_unref (common_theme_dir_uri);
-}
-
-
-static void
-update_gtk2_index (GnomeVFSURI *gtk2_index_uri,
- gint priority)
-{
- update_theme_index (gtk2_index_uri, GNOME_THEME_GTK_2, priority);
-}
-
-static void
-update_keybinding_index (GnomeVFSURI *keybinding_index_uri,
- gint priority)
-{
- update_theme_index (keybinding_index_uri, GNOME_THEME_GTK_2_KEYBINDING, priority);
-}
-
-static void
-update_metacity_index (GnomeVFSURI *metacity_index_uri,
- gint priority)
-{
- update_theme_index (metacity_index_uri, GNOME_THEME_METACITY, priority);
-}
-
-static void
-update_common_theme_dir_index (GnomeVFSURI *theme_index_uri,
- gboolean icon_theme,
- gint priority)
-{
- GnomeVFSFileInfo *file_info;
- GnomeVFSResult result;
- gboolean theme_exists;
- gpointer theme_info;
- gpointer old_theme_info;
- GnomeVFSURI *common_theme_dir_uri;
- gchar *common_theme_dir;
- GHashTable *hash_by_uri;
- GHashTable *hash_by_name;
- gchar *name = NULL;
-
- if (icon_theme)
- {
- hash_by_uri = icon_theme_hash_by_uri;
- hash_by_name = icon_theme_hash_by_name;
- }
- else
- {
- hash_by_uri = meta_theme_hash_by_uri;
- hash_by_name = meta_theme_hash_by_name;
- }
- /* First, we determine the new state of the file. */
- file_info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info_uri (theme_index_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_REGULAR)
- {
- /* It's an interesting file. Lets try to load it. */
- if (icon_theme)
- {
- theme_info = read_icon_theme (theme_index_uri);
- if (theme_info)
- {
- ((GnomeThemeIconInfo *) theme_info)->priority = priority;
- theme_exists = TRUE;
- }
- else
- {
- theme_exists = FALSE;
- }
- }
- else
- {
- theme_info = gnome_theme_read_meta_theme (theme_index_uri);
- if (theme_info)
- {
- ((GnomeThemeMetaInfo *) theme_info)->priority = priority;
- theme_exists = TRUE;
- }
- else
- {
- theme_exists = FALSE;
- }
- }
- }
- else
- {
- theme_info = NULL;
- theme_exists = FALSE;
- }
- gnome_vfs_file_info_unref (file_info);
-
- /* Next, we see what currently exists */
- common_theme_dir_uri = gnome_vfs_uri_get_parent (theme_index_uri);
- common_theme_dir = gnome_vfs_uri_to_string (common_theme_dir_uri, GNOME_VFS_URI_HIDE_NONE);
-
- old_theme_info = g_hash_table_lookup (hash_by_uri, common_theme_dir);
-
- if (theme_exists)
- {
- if (icon_theme)
- name = ((GnomeThemeIconInfo *)theme_info)->name;
- else
- name = ((GnomeThemeMetaInfo *)theme_info)->name;
- }
- if (old_theme_info == NULL)
- {
- if (theme_exists)
- {
- g_hash_table_insert (hash_by_uri, g_strdup (common_theme_dir), theme_info);
- add_data_to_hash_by_name (hash_by_name, name, theme_info);
- handle_change_signal (icon_theme?GNOME_THEME_TYPE_ICON:GNOME_THEME_TYPE_METATHEME,
- theme_info, GNOME_THEME_CHANGE_CREATED, 0);
- }
- }
- else
- {
- if (theme_exists)
- {
- gint cmp;
-
- if (icon_theme)
- cmp = gnome_theme_icon_info_compare (theme_info, old_theme_info);
- else
- cmp = gnome_theme_meta_info_compare (theme_info, old_theme_info);
- if (cmp != 0)
- {
- g_hash_table_insert (hash_by_uri, g_strdup (common_theme_dir), theme_info);
- add_data_to_hash_by_name (hash_by_name, name, theme_info);
- handle_change_signal (icon_theme?GNOME_THEME_TYPE_ICON:GNOME_THEME_TYPE_METATHEME,
- theme_info, GNOME_THEME_CHANGE_CHANGED, 0);
- if (icon_theme)
- gnome_theme_icon_info_free (old_theme_info);
- else
- gnome_theme_meta_info_free (old_theme_info);
- }
- else
- {
- if (icon_theme)
- gnome_theme_icon_info_free (theme_info);
- else
- gnome_theme_meta_info_free (theme_info);
- }
- }
- else
- {
- if (icon_theme)
- name = ((GnomeThemeIconInfo *)old_theme_info)->name;
- else
- name = ((GnomeThemeMetaInfo *)old_theme_info)->name;
-
- g_hash_table_remove (hash_by_uri, common_theme_dir);
- remove_data_from_hash_by_name (hash_by_name, name, old_theme_info);
- handle_change_signal (icon_theme?GNOME_THEME_TYPE_ICON:GNOME_THEME_TYPE_METATHEME,
- old_theme_info, GNOME_THEME_CHANGE_DELETED, 0);
- if (icon_theme)
- gnome_theme_icon_info_free (old_theme_info);
- else
- gnome_theme_meta_info_free (old_theme_info);
- }
- }
-
- g_free (common_theme_dir);
- gnome_vfs_uri_unref (common_theme_dir_uri);
-}
-
-static void
-update_meta_theme_index (GnomeVFSURI *meta_theme_index_uri,
- gint priority)
-{
- update_common_theme_dir_index (meta_theme_index_uri, FALSE, priority);
-}
-static void
-update_icon_theme_index (GnomeVFSURI *icon_theme_index_uri,
- gint priority)
-{
- update_common_theme_dir_index (icon_theme_index_uri, TRUE, priority);
-}
-
-static void
-gtk2_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSURI *gtk2_dir_uri;
- gchar *affected_file;
- CommonThemeDirMonitorData *monitor_data;
-
- monitor_data = user_data;
-
- gtk2_dir_uri = gnome_vfs_uri_new (info_uri);
- affected_file = gnome_vfs_uri_extract_short_name (gtk2_dir_uri);
-
- /* The only file we care about is gtkrc */
- if (strcmp (affected_file, "gtkrc"))
- {
- g_free (affected_file);
- gnome_vfs_uri_unref (gtk2_dir_uri);
- return;
- }
-
- update_gtk2_index (gtk2_dir_uri, monitor_data->priority);
-
- g_free (affected_file);
- gnome_vfs_uri_unref (gtk2_dir_uri);
-}
-
-
-static void
-keybinding_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSURI *keybinding_dir_uri;
- gchar *affected_file;
- CommonThemeDirMonitorData *monitor_data;
-
- monitor_data = user_data;
-
- keybinding_dir_uri = gnome_vfs_uri_new (info_uri);
- affected_file = gnome_vfs_uri_extract_short_name (keybinding_dir_uri);
-
- /* The only file we care about is gtkrc */
- if (strcmp (affected_file, "gtkrc"))
- {
- g_free (affected_file);
- gnome_vfs_uri_unref (keybinding_dir_uri);
- return;
- }
-
- update_keybinding_index (keybinding_dir_uri, monitor_data->priority);
-
- g_free (affected_file);
- gnome_vfs_uri_unref (keybinding_dir_uri);
-}
-
-static void
-metacity_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSURI *metacity_dir_uri;
- gchar *affected_file;
- CommonThemeDirMonitorData *monitor_data;
-
- monitor_data = user_data;
-
- metacity_dir_uri = gnome_vfs_uri_new (info_uri);
- affected_file = gnome_vfs_uri_extract_short_name (metacity_dir_uri);
-
- /* The only file we care about is gtkrc */
- if (strcmp (affected_file, "metacity-theme-1.xml"))
- {
- g_free (affected_file);
- gnome_vfs_uri_unref (metacity_dir_uri);
- return;
- }
-
- update_metacity_index (metacity_dir_uri, monitor_data->priority);
-
- g_free (affected_file);
- gnome_vfs_uri_unref (metacity_dir_uri);
-}
-
-static void
-common_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSURI *meta_theme_dir_uri;
- gchar *affected_file;
- CommonThemeDirMonitorData *monitor_data;
-
- monitor_data = user_data;
-
- meta_theme_dir_uri = gnome_vfs_uri_new (info_uri);
- affected_file = gnome_vfs_uri_extract_short_name (meta_theme_dir_uri);
-
- /* The only file we care about is index.theme */
- if (strcmp (affected_file, "index.theme"))
- {
- gnome_vfs_uri_unref (meta_theme_dir_uri);
- g_free (affected_file);
- return;
- }
-
- update_meta_theme_index (meta_theme_dir_uri, monitor_data->priority);
-
- g_free (affected_file);
- gnome_vfs_uri_unref (meta_theme_dir_uri);
-}
-
-static void
-common_icon_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSURI *icon_theme_dir_uri;
- gchar *affected_file;
- CommonIconThemeDirMonitorData *monitor_data;
-
- monitor_data = user_data;
-
- icon_theme_dir_uri = gnome_vfs_uri_new (info_uri);
- affected_file = gnome_vfs_uri_extract_short_name (icon_theme_dir_uri);
-
- /* The only file we care about is index.theme*/
- if (strcmp (affected_file, "index.theme"))
- {
- gnome_vfs_uri_unref (icon_theme_dir_uri);
- g_free (affected_file);
- return;
- }
- update_icon_theme_index (icon_theme_dir_uri, monitor_data->priority);
-
- g_free (affected_file);
- gnome_vfs_uri_unref (icon_theme_dir_uri);
-}
-
-static void
-top_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSResult result;
- CallbackTuple *tuple;
- GHashTable *handle_hash;
- CommonThemeDirMonitorData *monitor_data;
- GnomeVFSURI *common_theme_dir_uri;
- gint priority;
-
- common_theme_dir_uri = gnome_vfs_uri_new (info_uri);
- tuple = user_data;
- handle_hash = tuple->handle_hash;
- priority = tuple->priority;
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- GnomeVFSFileInfo *file_info;
-
- monitor_data = g_new0 (CommonThemeDirMonitorData, 1);
- monitor_data->priority = priority;
- file_info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info_uri (common_theme_dir_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- {
- add_common_theme_dir_monitor (common_theme_dir_uri, NULL, monitor_data, NULL);
- g_hash_table_insert (handle_hash, g_strdup(file_info->name), monitor_data);
- }
- gnome_vfs_file_info_unref (file_info);
- }
- else if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED)
- {
- gchar *name;
- CommonThemeDirMonitorData *monitor_data;
-
- name = gnome_vfs_uri_extract_short_name (common_theme_dir_uri);
- monitor_data = g_hash_table_lookup (handle_hash, name);
- if (monitor_data != NULL)
- {
- remove_common_theme_dir_monitor (monitor_data);
- g_hash_table_remove (handle_hash, name);
- g_free (monitor_data);
- }
- g_free (name);
- }
- gnome_vfs_uri_unref (common_theme_dir_uri);
-}
-
-static void
-top_icon_theme_dir_changed (GnomeVFSMonitorHandle *handle,
- const gchar *monitor_uri,
- const gchar *info_uri,
- GnomeVFSMonitorEventType event_type,
- gpointer user_data)
-{
- GnomeVFSResult result;
- GHashTable *handle_hash;
- CallbackTuple *tuple;
- CommonIconThemeDirMonitorData *monitor_data;
- GnomeVFSURI *common_icon_theme_dir_uri;
- gint priority;
-
- common_icon_theme_dir_uri = gnome_vfs_uri_new (info_uri);
- tuple = user_data;
- handle_hash = tuple->handle_hash;
- priority = tuple->priority;
-
- if (event_type == GNOME_VFS_MONITOR_EVENT_CREATED)
- {
- GnomeVFSFileInfo *file_info;
-
- monitor_data = g_new0 (CommonIconThemeDirMonitorData, 1);
- monitor_data->priority = priority;
- file_info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info_uri (common_icon_theme_dir_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- {
- add_common_icon_theme_dir_monitor (common_icon_theme_dir_uri, NULL, monitor_data, NULL);
- g_hash_table_insert (handle_hash, g_strdup(file_info->name), monitor_data);
- }
- gnome_vfs_file_info_unref (file_info);
- }
- else if (event_type == GNOME_VFS_MONITOR_EVENT_DELETED)
- {
- gchar *name;
- CommonIconThemeDirMonitorData *monitor_data;
-
- name = gnome_vfs_uri_extract_short_name (common_icon_theme_dir_uri);
- monitor_data = g_hash_table_lookup (handle_hash, name);
- if (monitor_data != NULL)
- {
- remove_common_icon_theme_dir_monitor (monitor_data);
- g_hash_table_remove (handle_hash, name);
- g_free (monitor_data);
- }
- g_free (name);
- }
- gnome_vfs_uri_unref (common_icon_theme_dir_uri);
-}
-
-/* Add a monitor to a common_theme_dir.
- */
-static GnomeVFSResult
-add_common_theme_dir_monitor (GnomeVFSURI *theme_dir_uri,
- gboolean *monitor_not_added,
- CommonThemeDirMonitorData *monitor_data,
- GError **error)
-{
- GnomeVFSResult result;
- gchar *uri_string;
- gboolean real_monitor_not_added = FALSE;
- GnomeVFSURI *subdir;
- GnomeVFSURI *index_uri;
- GnomeVFSFileInfo *file_info;
-
- index_uri = gnome_vfs_uri_append_file_name (theme_dir_uri, "index.theme");
- update_meta_theme_index (index_uri, monitor_data->priority);
- gnome_vfs_uri_unref (index_uri);
-
- /* Add the handle for this directory */
- uri_string = gnome_vfs_uri_to_string (theme_dir_uri, GNOME_VFS_URI_HIDE_NONE);
- result = gnome_vfs_monitor_add (& (monitor_data->common_theme_dir_handle),
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- common_theme_dir_changed,
- monitor_data);
- g_free (uri_string);
-
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- real_monitor_not_added = TRUE;
- else if (result != GNOME_VFS_OK)
- return result;
-
- /* gtk-2 theme subdir */
- subdir = gnome_vfs_uri_append_path (theme_dir_uri, "gtk-2.0");
- file_info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info_uri (theme_dir_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- {
- index_uri = gnome_vfs_uri_append_file_name (subdir, "gtkrc");
- update_gtk2_index (index_uri, monitor_data->priority);
- gnome_vfs_uri_unref (index_uri);
- }
- uri_string = gnome_vfs_uri_to_string (subdir, GNOME_VFS_URI_HIDE_NONE);
- result = gnome_vfs_monitor_add (& (monitor_data->gtk2_dir_handle),
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- gtk2_dir_changed,
- monitor_data);
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- real_monitor_not_added = TRUE;
- g_free (uri_string);
- gnome_vfs_uri_unref (subdir);
-
- /* keybinding theme subdir */
- subdir = gnome_vfs_uri_append_path (theme_dir_uri, "gtk-2.0-key");
- gnome_vfs_file_info_clear (file_info);
- result = gnome_vfs_get_file_info_uri (theme_dir_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (result == GNOME_VFS_OK && file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- {
- index_uri = gnome_vfs_uri_append_file_name (subdir, "gtkrc");
- update_keybinding_index (index_uri, monitor_data->priority);
- gnome_vfs_uri_unref (index_uri);
- }
- uri_string = gnome_vfs_uri_to_string (subdir, GNOME_VFS_URI_HIDE_NONE);
- result = gnome_vfs_monitor_add (& (monitor_data->keybinding_dir_handle),
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- keybinding_dir_changed,
- monitor_data);
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- real_monitor_not_added = TRUE;
- g_free (uri_string);
- gnome_vfs_uri_unref (subdir);
-
- /* metacity theme subdir */
- subdir = gnome_vfs_uri_append_path (theme_dir_uri, "metacity-1");
- gnome_vfs_file_info_clear (file_info);
- result = gnome_vfs_get_file_info_uri (theme_dir_uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY)
- {
- index_uri = gnome_vfs_uri_append_file_name (subdir, "metacity-theme-1.xml");
- update_metacity_index (index_uri, monitor_data->priority);
- gnome_vfs_uri_unref (index_uri);
- }
- uri_string = gnome_vfs_uri_to_string (subdir, GNOME_VFS_URI_HIDE_NONE);
- result = gnome_vfs_monitor_add (& (monitor_data->metacity_dir_handle),
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- metacity_dir_changed,
- monitor_data);
- g_free (uri_string);
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- real_monitor_not_added = TRUE;
- gnome_vfs_file_info_unref (file_info);
- gnome_vfs_uri_unref (subdir);
-
- if (monitor_not_added)
- *monitor_not_added = real_monitor_not_added;
-
- return GNOME_VFS_OK;
-}
-
-static GnomeVFSResult
-add_common_icon_theme_dir_monitor (GnomeVFSURI *theme_dir_uri,
- gboolean *monitor_not_added,
- CommonIconThemeDirMonitorData *monitor_data,
- GError **error)
-{
- GnomeVFSResult result;
- gchar *uri_string;
- gboolean real_monitor_not_added = FALSE;
- GnomeVFSURI *index_uri;
-
- /* Add the handle for this directory */
- index_uri = gnome_vfs_uri_append_file_name (theme_dir_uri, "index.theme");
- update_icon_theme_index (index_uri, monitor_data->priority);
- gnome_vfs_uri_unref (index_uri);
-
- uri_string = gnome_vfs_uri_to_string (theme_dir_uri, GNOME_VFS_URI_HIDE_NONE);
- result = gnome_vfs_monitor_add (& (monitor_data->common_icon_theme_dir_handle),
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- common_icon_theme_dir_changed,
- monitor_data);
- g_free (uri_string);
-
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- real_monitor_not_added = TRUE;
- else if (result != GNOME_VFS_OK)
- return result;
-
- if (monitor_not_added)
- *monitor_not_added = real_monitor_not_added;
-
- return GNOME_VFS_OK;
-}
-
-static void
-remove_common_theme_dir_monitor (CommonThemeDirMonitorData *monitor_data)
-{
- /* None of the possible errors here are interesting */
- gnome_vfs_monitor_cancel (monitor_data->common_theme_dir_handle);
- gnome_vfs_monitor_cancel (monitor_data->gtk2_dir_handle);
- gnome_vfs_monitor_cancel (monitor_data->keybinding_dir_handle);
- gnome_vfs_monitor_cancel (monitor_data->metacity_dir_handle);
-
-}
-
-static void
-remove_common_icon_theme_dir_monitor (CommonIconThemeDirMonitorData *monitor_data)
-{
- /* None of the possible errors here are interesting */
- gnome_vfs_monitor_cancel (monitor_data->common_icon_theme_dir_handle);
-}
-
-/* Add a monitor to a top dir. These monitors persist for the duration of the
- * lib.
- */
-static GnomeVFSResult
-real_add_top_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- gboolean icon_theme,
- GError **error)
-{
- GnomeVFSMonitorHandle *monitor_handle = NULL;
- GnomeVFSDirectoryHandle *directory_handle = NULL;
- GnomeVFSResult result;
- GnomeVFSFileInfo *file_info;
- gchar *uri_string;
- CallbackTuple *tuple;
-
- /* handle_hash is a hash of common_theme_dir names to their monitor_data. We
- * use it to remove the monitor handles when a dir is removed.
- */
- tuple = g_new0 (CallbackTuple, 1);
- tuple->handle_hash = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify)g_free, NULL);
- tuple->priority = priority;
-
- /* Check the URI */
- file_info = gnome_vfs_file_info_new ();
- gnome_vfs_get_file_info_uri (uri, file_info, GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
- if (file_info->type != GNOME_VFS_FILE_TYPE_DIRECTORY) {
- gnome_vfs_file_info_unref (file_info);
- return GNOME_VFS_ERROR_NOT_A_DIRECTORY;
- }
- gnome_vfs_file_info_unref (file_info);
- /* Monitor the top directory */
- uri_string = gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE);
-
- result = gnome_vfs_monitor_add (&monitor_handle,
- uri_string,
- GNOME_VFS_MONITOR_DIRECTORY,
- icon_theme?top_icon_theme_dir_changed:top_theme_dir_changed,
- tuple);
-
- g_free (uri_string);
-
- /* We can deal with NOT_SUPPORTED manually */
- if (result == GNOME_VFS_ERROR_NOT_SUPPORTED)
- *monitor_not_added = TRUE;
- else if (result != GNOME_VFS_OK)
- return result;
-
- /* Go through the directory to add monitoring */
- result = gnome_vfs_directory_open_from_uri (&directory_handle, uri, GNOME_VFS_FILE_INFO_DEFAULT);
- if (result != GNOME_VFS_OK)
- return result;
-
- file_info = gnome_vfs_file_info_new ();
- while (gnome_vfs_directory_read_next (directory_handle, file_info) == GNOME_VFS_OK)
- {
- GnomeVFSURI *theme_dir_uri;
- gpointer monitor_data;
-
- if (!(file_info->type == GNOME_VFS_FILE_TYPE_DIRECTORY || file_info->type == GNOME_VFS_FILE_TYPE_SYMBOLIC_LINK)) {
- gnome_vfs_file_info_clear (file_info);
- continue;
- }
- if (file_info->name[0] == '.') {
- gnome_vfs_file_info_clear (file_info);
- continue;
- }
-
- /* Add the directory */
- theme_dir_uri = gnome_vfs_uri_append_path (uri, file_info->name);
- if (icon_theme)
- {
- monitor_data = g_new0 (CommonIconThemeDirMonitorData, 1);
- ((CommonIconThemeDirMonitorData *)monitor_data)->priority = priority;
- add_common_icon_theme_dir_monitor (theme_dir_uri, monitor_not_added, monitor_data, error);
- }
- else
- {
- monitor_data = g_new0 (CommonThemeDirMonitorData, 1);
- ((CommonThemeDirMonitorData *)monitor_data)->priority = priority;
- add_common_theme_dir_monitor (theme_dir_uri, monitor_not_added, monitor_data, error);
- }
-
-
- g_hash_table_insert (tuple->handle_hash, g_strdup(file_info->name), monitor_data);
- gnome_vfs_file_info_clear (file_info);
- gnome_vfs_uri_unref (theme_dir_uri);
- }
-
- gnome_vfs_file_info_unref (file_info);
- gnome_vfs_directory_close (directory_handle);
- if (result != GNOME_VFS_ERROR_EOF)
- return result;
-
- return GNOME_VFS_OK;
-}
-
-static GnomeVFSResult
-add_top_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- GError **error)
-{
- return real_add_top_theme_dir_monitor (uri, monitor_not_added, priority, FALSE, error);
-}
-
-static GnomeVFSResult
-add_top_icon_theme_dir_monitor (GnomeVFSURI *uri,
- gboolean *monitor_not_added,
- gint priority,
- GError **error)
-{
- return real_add_top_theme_dir_monitor (uri, monitor_not_added, priority, TRUE, error);
-}
-
-/* Public functions */
-
-
-/* Generic Themes */
-GnomeThemeInfo *
-gnome_theme_info_new (void)
-{
- GnomeThemeInfo *theme_info;
-
- theme_info = g_new0 (GnomeThemeInfo, 1);
-
- return theme_info;
-}
-
-void
-gnome_theme_info_free (GnomeThemeInfo *theme_info)
-{
- g_free (theme_info->path);
- g_free (theme_info->name);
- g_free (theme_info);
-}
-
-GnomeThemeInfo *
-gnome_theme_info_find (const gchar *theme_name)
-{
- return get_data_from_hash_by_name (theme_hash_by_name, theme_name, -1);
-}
-
-
-struct GnomeThemeInfoHashData
-{
- gconstpointer user_data;
- GList *list;
-};
-
-static void
-gnome_theme_info_find_by_type_helper (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- GList *list;
- GnomeThemeInfo *theme_info;
- struct GnomeThemeInfoHashData *hash_data = user_data;
- guint elements = GPOINTER_TO_INT (hash_data->user_data);
- gboolean add_theme = FALSE;
-
- list = value;
- theme_info = list->data;
-
- if (elements & GNOME_THEME_METACITY &&
- theme_info->has_metacity)
- add_theme = TRUE;
- if (elements & GNOME_THEME_GTK_2 &&
- theme_info->has_gtk)
- add_theme = TRUE;
- if (elements & GNOME_THEME_GTK_2_KEYBINDING &&
- theme_info->has_keybinding)
- add_theme = TRUE;
-
- if (add_theme)
- hash_data->list = g_list_prepend (hash_data->list, theme_info);
-}
-
-GList *
-gnome_theme_info_find_by_type (guint elements)
-{
- struct GnomeThemeInfoHashData data;
- data.user_data = GINT_TO_POINTER (elements);
- data.list = NULL;
-
- g_hash_table_foreach (theme_hash_by_name,
- gnome_theme_info_find_by_type_helper,
- &data);
-
- return data.list;
-}
-
-GnomeThemeInfo *
-gnome_theme_info_find_by_uri (const gchar *theme_uri)
-{
- g_return_val_if_fail (theme_uri != NULL, NULL);
-
- return g_hash_table_lookup (theme_hash_by_uri, theme_uri);
-}
-
-
-/* Icon themes */
-GnomeThemeIconInfo *
-gnome_theme_icon_info_new (void)
-{
- GnomeThemeIconInfo *icon_theme_info;
-
- icon_theme_info = g_new0 (GnomeThemeIconInfo, 1);
-
- return icon_theme_info;
-}
-
-void
-gnome_theme_icon_info_free (GnomeThemeIconInfo *icon_theme_info)
-{
- g_free (icon_theme_info->name);
- g_free (icon_theme_info->path);
- g_free (icon_theme_info);
-}
-
-GnomeThemeInfo *
-gnome_theme_icon_info_find (const gchar *icon_theme_name)
-{
- g_return_val_if_fail (icon_theme_name != NULL, NULL);
-
- return get_data_from_hash_by_name (icon_theme_hash_by_name, icon_theme_name, -1);
-
-}
-
-static void
-gnome_theme_icon_info_find_all_helper (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- GList *list = value;
- struct GnomeThemeInfoHashData *hash_data;
-
- list = value;
- hash_data = user_data;
-
- hash_data->list = g_list_prepend (hash_data->list, list->data);
-}
-
-GList *
-gnome_theme_icon_info_find_all (void)
-{
-
- struct GnomeThemeInfoHashData data;
- data.list = NULL;
-
- g_hash_table_foreach (icon_theme_hash_by_name,
- gnome_theme_icon_info_find_all_helper,
- &data);
-
- return data.list;
-}
-
-
-gint
-gnome_theme_icon_info_compare (GnomeThemeIconInfo *a,
- GnomeThemeIconInfo *b)
-{
- gint cmp = 0;
-
- cmp = safe_strcmp (a->path, b->path);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->name, b->name);
- return cmp;
-}
-
-
-/* Meta themes*/
-GnomeThemeMetaInfo *
-gnome_theme_meta_info_new (void)
-{
- GnomeThemeMetaInfo *meta_theme_info;
-
- meta_theme_info = g_new0 (GnomeThemeMetaInfo, 1);
-
- return meta_theme_info;
-}
-
-void
-gnome_theme_meta_info_free (GnomeThemeMetaInfo *meta_theme_info)
-{
- g_free (meta_theme_info->path);
- g_free (meta_theme_info->readable_name);
- g_free (meta_theme_info->name);
- g_free (meta_theme_info->comment);
- g_free (meta_theme_info->application_font);
- g_free (meta_theme_info->background_image);
- g_free (meta_theme_info->gtk_theme_name);
- g_free (meta_theme_info->icon_theme_name);
- g_free (meta_theme_info->metacity_theme_name);
-
- g_free (meta_theme_info);
-}
-
-void
-gnome_theme_meta_info_print (GnomeThemeMetaInfo *meta_theme_info)
-{
- g_print ("path: %s\n", meta_theme_info->path);
- g_print ("readable_name: %s\n", meta_theme_info->readable_name);
- g_print ("name: %s\n", meta_theme_info->name);
- g_print ("comment: %s\n", meta_theme_info->comment);
- g_print ("icon_file: %s\n", meta_theme_info->icon_file);
- g_print ("gtk_theme_name: %s\n", meta_theme_info->gtk_theme_name);
- g_print ("metacity_theme_name: %s\n", meta_theme_info->metacity_theme_name);
- g_print ("icon_theme_name: %s\n", meta_theme_info->icon_theme_name);
- g_print ("sawfish_theme_name: %s\n", meta_theme_info->sawfish_theme_name);
- g_print ("sound_theme_name: %s\n", meta_theme_info->sound_theme_name);
- g_print ("application_font: %s\n", meta_theme_info->application_font);
- g_print ("background_image: %s\n", meta_theme_info->background_image);
-}
-
-GnomeThemeMetaInfo *
-gnome_theme_meta_info_find (const char *meta_theme_name)
-{
- g_return_val_if_fail (meta_theme_name != NULL, NULL);
-
- return get_data_from_hash_by_name (meta_theme_hash_by_name, meta_theme_name, -1);
-}
-
-GnomeThemeMetaInfo *
-gnome_theme_meta_info_find_by_uri (const char *theme_uri)
-{
- g_return_val_if_fail (theme_uri != NULL, NULL);
-
- return g_hash_table_lookup (meta_theme_hash_by_uri, theme_uri);
-}
-
-static void
-gnome_theme_meta_info_find_all_helper (gpointer key,
- gpointer value,
- gpointer user_data)
-{
- GList *list = value;
- struct GnomeThemeInfoHashData *hash_data = user_data;
-
- hash_data->list = g_list_prepend (hash_data->list, list->data);
-}
-
-GList *
-gnome_theme_meta_info_find_all (void)
-{
-
- struct GnomeThemeInfoHashData data;
- data.list = NULL;
-
- g_hash_table_foreach (meta_theme_hash_by_name,
- gnome_theme_meta_info_find_all_helper,
- &data);
-
- return data.list;
-}
-
-gint
-gnome_theme_meta_info_compare (GnomeThemeMetaInfo *a,
- GnomeThemeMetaInfo *b)
-{
- gint cmp = 0;
-
- cmp = safe_strcmp (a->path, b->path);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->readable_name, b->readable_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->name, b->name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->comment, b->comment);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->icon_file, b->icon_file);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->gtk_theme_name, b->gtk_theme_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->metacity_theme_name, b->metacity_theme_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->icon_theme_name, b->icon_theme_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->sawfish_theme_name, b->sawfish_theme_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->sound_theme_name, b->sound_theme_name);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->application_font, b->application_font);
- if (cmp != 0) return cmp;
-
- cmp = safe_strcmp (a->background_image, b->background_image);
- return cmp;
-}
-
-void
-gnome_theme_info_register_theme_change (GFunc func,
- gpointer data)
-{
- ThemeCallbackData *callback_data;
-
- g_return_if_fail (func != NULL);
-
- callback_data = g_new0 (ThemeCallbackData, 1);
- callback_data->func = func;
- callback_data->data = data;
-
- callbacks = g_list_prepend (callbacks, callback_data);
-}
-
-void
-gnome_theme_init (gboolean *monitor_not_added)
-{
- GnomeVFSURI *top_theme_dir_uri;
- gchar *top_theme_dir_string;
- gboolean real_monitor_not_added = FALSE;
- static gboolean initted = FALSE;
- GnomeVFSResult result;
- const gchar *gtk_data_dir;
- if (initted)
- return;
-
- initting = TRUE;
-
- meta_theme_hash_by_uri = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- meta_theme_hash_by_name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- icon_theme_hash_by_uri = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- icon_theme_hash_by_name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- theme_hash_by_uri = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
- theme_hash_by_name = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
-
- /* Add all the toplevel theme dirs. */
- /* $datadir/themes */
- top_theme_dir_string = gtk_rc_get_theme_dir ();
- top_theme_dir_uri = gnome_vfs_uri_new (top_theme_dir_string);
- result = add_top_theme_dir_monitor (top_theme_dir_uri, &real_monitor_not_added, 1, NULL);
- g_free (top_theme_dir_string);
- gnome_vfs_uri_unref (top_theme_dir_uri);
-
- /* ~/.themes */
- top_theme_dir_string = g_build_filename (g_get_home_dir (), ".themes", NULL);
- top_theme_dir_uri = gnome_vfs_uri_new (top_theme_dir_string);
- g_free (top_theme_dir_string);
- if (!gnome_vfs_uri_exists (top_theme_dir_uri))
- gnome_vfs_make_directory_for_uri (top_theme_dir_uri, 0775);
- result = add_top_theme_dir_monitor (top_theme_dir_uri, &real_monitor_not_added, 0, NULL);
- gnome_vfs_uri_unref (top_theme_dir_uri);
-
- /* The weird /usr/share/icons */
- top_theme_dir_uri = gnome_vfs_uri_new ("/usr/share/icons");
- if (!gnome_vfs_uri_exists (top_theme_dir_uri))
- gnome_vfs_make_directory_for_uri (top_theme_dir_uri, 0775);
- result = add_top_icon_theme_dir_monitor (top_theme_dir_uri, &real_monitor_not_added, 2, NULL);
- gnome_vfs_uri_unref (top_theme_dir_uri);
-
- /* $datadir/icons */
- gtk_data_dir = g_getenv ("GTK_DATA_PREFIX");
- if (gtk_data_dir)
- {
- top_theme_dir_string = g_build_filename (gtk_data_dir, "share", "icons", NULL);
- }
- else
- {
- top_theme_dir_string = g_build_filename (INSTALL_PREFIX, "share", "icons", NULL);
- }
- top_theme_dir_uri = gnome_vfs_uri_new (top_theme_dir_string);
- g_free (top_theme_dir_string);
-
- if (!gnome_vfs_uri_exists (top_theme_dir_uri))
- gnome_vfs_make_directory_for_uri (top_theme_dir_uri, 0775);
- result = add_top_icon_theme_dir_monitor (top_theme_dir_uri, &real_monitor_not_added, 1, NULL);
- gnome_vfs_uri_unref (top_theme_dir_uri);
-
- /* ~/.icons */
- top_theme_dir_string = g_build_filename (g_get_home_dir (), ".icons", NULL);
- top_theme_dir_uri = gnome_vfs_uri_new (top_theme_dir_string);
- g_free (top_theme_dir_string);
-
- if (!gnome_vfs_uri_exists (top_theme_dir_uri))
- gnome_vfs_make_directory_for_uri (top_theme_dir_uri, 0775);
- result = add_top_icon_theme_dir_monitor (top_theme_dir_uri, &real_monitor_not_added, 0, NULL);
- gnome_vfs_uri_unref (top_theme_dir_uri);
-
- /* done */
- initted = TRUE;
- initting = FALSE;
-
- if (monitor_not_added)
- *monitor_not_added = real_monitor_not_added;
-}
-
-#if 0
-int
-main (int argc, char *argv[])
-{
- gtk_init (&argc, &argv);
- gnome_vfs_init ();
- gboolean monitor_not_added = FALSE;
-
- gnome_theme_init (&monitor_not_added);
-
- gtk_main ();
-
- return 0;
-}
-#endif
diff --git a/capplets/common/gnome-theme-info.h b/capplets/common/gnome-theme-info.h
deleted file mode 100644
index 245a52ef3..000000000
--- a/capplets/common/gnome-theme-info.h
+++ /dev/null
@@ -1,129 +0,0 @@
-/* gnome-theme-info.h - GNOME Theme information
-
- Copyright (C) 2002 Jonathan Blandford <jrb@gnome.org>
- All rights reserved.
-
- This file is part of the Gnome Library.
-
- The Gnome Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public License as
- published by the Free Software Foundation; either version 2 of the
- License, or (at your option) any later version.
-
- The Gnome Library is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with the Gnome Library; see the file COPYING.LIB. If not,
- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA. */
-/*
- @NOTATION@
- */
-
-#ifndef GNOME_THEME_INFO_H
-#define GNOME_THEME_INFO_H
-
-#include <glib.h>
-#include <libgnomevfs/gnome-vfs.h>
-
-
-typedef enum {
- GNOME_THEME_TYPE_METATHEME,
- GNOME_THEME_TYPE_ICON,
- GNOME_THEME_TYPE_REGULAR
-} GnomeThemeType;
-
-typedef enum {
- GNOME_THEME_CHANGE_CREATED,
- GNOME_THEME_CHANGE_DELETED,
- GNOME_THEME_CHANGE_CHANGED
-} GnomeThemeChangeType;
-
-
-typedef enum {
- GNOME_THEME_METACITY = 1 << 0,
- GNOME_THEME_GTK_2 = 1 << 1,
- GNOME_THEME_GTK_2_KEYBINDING = 1 << 2
-} GnomeThemeElement;
-
-
-typedef struct _GnomeThemeInfo GnomeThemeInfo;
-struct _GnomeThemeInfo
-{
- gchar *path;
- gchar *name;
- gint priority;
- guint has_gtk : 1;
- guint has_keybinding : 1;
- guint has_metacity : 1;
- guint user_writable : 1;
-};
-
-typedef struct _GnomeThemeIconInfo GnomeThemeIconInfo;
-struct _GnomeThemeIconInfo
-{
- gchar *path;
- gchar *name;
- gint priority;
-};
-
-typedef struct _GnomeThemeMetaInfo GnomeThemeMetaInfo;
-struct _GnomeThemeMetaInfo
-{
- gchar *path;
- gchar *name;
- gint priority;
- gchar *readable_name;
- gchar *comment;
- gchar *icon_file;
-
- gchar *gtk_theme_name;
- gchar *metacity_theme_name;
- gchar *icon_theme_name;
- gchar *sawfish_theme_name;
- gchar *sound_theme_name;
-
- gchar *application_font;
- gchar *background_image;
-};
-
-
-/* Generic Themes */
-GnomeThemeInfo *gnome_theme_info_new (void);
-void gnome_theme_info_free (GnomeThemeInfo *theme_info);
-GnomeThemeInfo *gnome_theme_info_find (const gchar *theme_name);
-GList *gnome_theme_info_find_by_type (guint elements);
-/* Expected to be in the form "file:///usr/share/..." */
-GnomeThemeInfo *gnome_theme_info_find_by_uri (const gchar *theme_uri);
-
-
-/* Icon Themes */
-GnomeThemeIconInfo *gnome_theme_icon_info_new (void);
-void gnome_theme_icon_info_free (GnomeThemeIconInfo *icon_theme_info);
-GnomeThemeInfo *gnome_theme_icon_info_find (const gchar *icon_theme_name);
-GList *gnome_theme_icon_info_find_all (void);
-gint gnome_theme_icon_info_compare (GnomeThemeIconInfo *a,
- GnomeThemeIconInfo *b);
-
-
-/* Meta themes*/
-GnomeThemeMetaInfo *gnome_theme_meta_info_new (void);
-void gnome_theme_meta_info_free (GnomeThemeMetaInfo *meta_theme_info);
-void gnome_theme_meta_info_print (GnomeThemeMetaInfo *meta_theme_info);
-GnomeThemeMetaInfo *gnome_theme_meta_info_find (const char *meta_theme_name);
-GnomeThemeMetaInfo *gnome_theme_meta_info_find_by_uri (const char *uri);
-GList *gnome_theme_meta_info_find_all (void);
-gint gnome_theme_meta_info_compare (GnomeThemeMetaInfo *a,
- GnomeThemeMetaInfo *b);
-GnomeThemeMetaInfo *gnome_theme_read_meta_theme (GnomeVFSURI *meta_theme_uri);
-
-/* Other */
-void gnome_theme_init (gboolean *monitor_not_added);
-void gnome_theme_info_register_theme_change (GFunc func,
- gpointer data);
-
-
-#endif /* GNOME_THEME_INFO_H */
diff --git a/capplets/common/gnome-theme-test.c b/capplets/common/gnome-theme-test.c
deleted file mode 100644
index 71b1cd852..000000000
--- a/capplets/common/gnome-theme-test.c
+++ /dev/null
@@ -1,122 +0,0 @@
-#include <gtk/gtk.h>
-#include <libgnomevfs/gnome-vfs-init.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <libgnomevfs/gnome-vfs-directory.h>
-#include <string.h>
-#include <libgnome/gnome-desktop-item.h>
-#include "gnome-theme-info.h"
-
-int
-main (int argc, char *argv[])
-{
- gboolean monitor_not_added = FALSE;
- GList *themes, *list;
-
- gtk_init (&argc, &argv);
- gnome_vfs_init ();
- gnome_theme_init (&monitor_not_added);
-
- themes = gnome_theme_meta_info_find_all ();
- if (themes == NULL)
- {
- g_print ("No meta themes were found.\n");
- }
- else
- {
- g_print ("%d meta themes were found:\n", g_list_length (themes));
- for (list = themes; list; list = list->next)
- {
- GnomeThemeMetaInfo *meta_theme_info;
-
- meta_theme_info = list->data;
- g_print ("\t%s\n", meta_theme_info->readable_name);
- }
- }
- g_list_free (themes);
-
- themes = gnome_theme_icon_info_find_all ();
- if (themes == NULL)
- {
- g_print ("No icon themes were found.\n");
- }
- else
- {
- g_print ("%d icon themes were found:\n", g_list_length (themes));
- for (list = themes; list; list = list->next)
- {
- GnomeThemeIconInfo *icon_theme_info;
-
- icon_theme_info = list->data;
- g_print ("\t%s\n", icon_theme_info->name);
- }
- }
- g_list_free (themes);
-
- themes = gnome_theme_info_find_by_type (GNOME_THEME_METACITY);
- if (themes == NULL)
- {
- g_print ("No metacity themes were found.\n");
- }
- else
- {
- g_print ("%d metacity themes were found:\n", g_list_length (themes));
- for (list = themes; list; list = list->next)
- {
- GnomeThemeInfo *theme_info;
-
- theme_info = list->data;
- g_print ("\t%s\n", theme_info->name);
- }
- }
- g_list_free (themes);
-
- themes = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2);
- if (themes == NULL)
- {
- gchar *str;
-
- g_print ("No gtk-2 themes were found. The following directories were tested:\n");
- str = gtk_rc_get_theme_dir ();
- g_print ("\t%s\n", str);
- g_free (str);
- str = g_build_filename (g_get_home_dir (), ".themes", NULL);
- g_print ("\t%s\n", str);
- g_free (str);
- }
- else
- {
- g_print ("%d gtk-2 themes were found:\n", g_list_length (themes));
- for (list = themes; list; list = list->next)
- {
- GnomeThemeInfo *theme_info;
-
- theme_info = list->data;
- g_print ("\t%s\n", theme_info->name);
- }
- }
- g_list_free (themes);
-
- themes = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2_KEYBINDING);
- if (themes == NULL)
- {
- g_print ("No keybinding themes were found.\n");
- }
- else
- {
- g_print ("%d keybinding themes were found:\n", g_list_length (themes));
- for (list = themes; list; list = list->next)
- {
- GnomeThemeInfo *theme_info;
-
- theme_info = list->data;
- g_print ("\t%s\n", theme_info->name);
- }
- }
- g_list_free (themes);
-
- gtk_main ();
-
- return 0;
-}
-
diff --git a/capplets/common/theme-thumbnail.c b/capplets/common/theme-thumbnail.c
deleted file mode 100644
index aa94b9671..000000000
--- a/capplets/common/theme-thumbnail.c
+++ /dev/null
@@ -1,623 +0,0 @@
-#include <unistd.h>
-#include <string.h>
-#include <metacity-private/util.h>
-#include <metacity-private/theme.h>
-#include <metacity-private/theme-parser.h>
-#include <metacity-private/preview-widget.h>
-#include <signal.h>
-#include <errno.h>
-
-/* We have to #undef this as metacity #defines these. */
-#undef _
-#undef N_
-
-#include <libgnomeui/gnome-icon-theme.h>
-#include <config.h>
-
-#include "theme-thumbnail.h"
-#include "capplet-util.h"
-
-static gint child_pid;
-#define ICON_SIZE_WIDTH 150
-#define ICON_SIZE_HEIGHT 150
-
-typedef struct
-{
- gboolean set;
- GByteArray *data;
- gchar *meta_theme_name;
- ThemeThumbnailFunc func;
- gpointer user_data;
- GDestroyNotify destroy;
- GIOChannel *channel;
- guint watch_id;
-} ThemeThumbnailAsyncData;
-
-
-GHashTable *theme_hash = NULL;
-ThemeThumbnailAsyncData async_data;
-
-
-/* Protocol */
-
-/* Our protocol is pretty simple. The parent process will write four strings
- * (separated by a '\000') They are the widget theme, the wm theme, the icon
- * theme, and the font string. Then, it will wait for the child to write back
- * the data. The parent expects ICON_SIZE_WIDTH * ICON_SIZE_HEIGHT * 4 bytes of
- * information. After that, the child is ready for the next theme to render.
- */
-
-enum
-{
- READY_FOR_THEME,
- READING_CONTROL_THEME_NAME,
- READING_WM_THEME_NAME,
- READING_ICON_THEME_NAME,
- READING_APPLICATION_FONT,
- WRITING_PIXBUF_DATA
-};
-
-typedef struct
-{
- gint status;
- GByteArray *control_theme_name;
- GByteArray *wm_theme_name;
- GByteArray *icon_theme_name;
- GByteArray *application_font;
-} ThemeThumbnailData;
-
-int pipe_to_factory_fd[2];
-int pipe_from_factory_fd[2];
-
-static void
-fake_expose_widget (GtkWidget *widget,
- GdkPixmap *pixmap)
-{
- GdkWindow *tmp_window;
- GdkEventExpose event;
-
- event.type = GDK_EXPOSE;
- event.window = pixmap;
- event.send_event = FALSE;
- event.area = widget->allocation;
- event.region = NULL;
- event.count = 0;
-
- tmp_window = widget->window;
- widget->window = pixmap;
- gtk_widget_send_expose (widget, (GdkEvent *) &event);
- widget->window = tmp_window;
-}
-
-
-
-static void
-hbox_foreach (GtkWidget *widget,
- gpointer data)
-{
- gtk_widget_realize (widget);
- gtk_widget_map (widget);
- gtk_widget_ensure_style (widget);
- fake_expose_widget (widget, (GdkPixmap *) data);
-}
-
-static void
-create_image (ThemeThumbnailData *theme_thumbnail_data,
- GdkPixbuf *pixbuf)
-{
- GtkWidget *window;
- GtkWidget *preview;
- GtkWidget *align;
- GtkWidget *stock_button;
-
- GtkRequisition requisition;
- GtkAllocation allocation;
- GdkPixmap *pixmap;
- GdkVisual *visual;
- MetaFrameFlags flags;
- MetaTheme *theme = NULL;
- GtkSettings *settings;
- GtkIconTheme *icon_theme;
- GdkPixbuf *folder_icon;
- GtkIconInfo *folder_icon_info;
- const gchar *filename;
-
- settings = gtk_settings_get_default ();
- g_object_set (G_OBJECT (settings),
- "gtk-theme-name", (char *) theme_thumbnail_data->control_theme_name->data,
- "gtk-font-name", (char *) theme_thumbnail_data->application_font->data,
- NULL);
- theme = meta_theme_load ((char *) theme_thumbnail_data->wm_theme_name->data, NULL);
-
- flags = META_FRAME_ALLOWS_DELETE |
- META_FRAME_ALLOWS_MENU |
- META_FRAME_ALLOWS_MINIMIZE |
- META_FRAME_ALLOWS_MAXIMIZE |
- META_FRAME_ALLOWS_VERTICAL_RESIZE |
- META_FRAME_ALLOWS_HORIZONTAL_RESIZE |
- META_FRAME_HAS_FOCUS |
- META_FRAME_ALLOWS_SHADE |
- META_FRAME_ALLOWS_MOVE;
-
- window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- preview = meta_preview_new ();
- gtk_container_add (GTK_CONTAINER (window), preview);
- gtk_widget_realize (window);
- gtk_widget_realize (preview);
- align = gtk_alignment_new (0.0, 0.0, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (preview), align);
- gtk_container_set_border_width (GTK_CONTAINER (align), 5);
- stock_button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
- gtk_container_add (GTK_CONTAINER (align), stock_button);
-
- gtk_widget_show_all (preview);
- gtk_widget_realize (align);
- gtk_widget_realize (stock_button);
- gtk_widget_realize (GTK_BIN (stock_button)->child);
- gtk_widget_map (stock_button);
- gtk_widget_map (GTK_BIN (stock_button)->child);
-
- meta_preview_set_frame_flags (META_PREVIEW (preview), flags);
- meta_preview_set_theme (META_PREVIEW (preview), theme);
- meta_preview_set_title (META_PREVIEW (preview), "");
-
-
- gtk_window_set_default_size (GTK_WINDOW (window), ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT);
-
- gtk_widget_size_request (window, &requisition);
- allocation.x = 0;
- allocation.y = 0;
- allocation.width = ICON_SIZE_WIDTH;
- allocation.height = ICON_SIZE_HEIGHT;
- gtk_widget_size_allocate (window, &allocation);
- gtk_widget_size_request (window, &requisition);
-
- /* Create a pixmap */
- visual = gtk_widget_get_visual (window);
- pixmap = gdk_pixmap_new (NULL, ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT, visual->depth);
- gdk_drawable_set_colormap (GDK_DRAWABLE (pixmap), gtk_widget_get_colormap (window));
-
- /* Draw the window */
- gtk_widget_ensure_style (window);
- g_assert (window->style);
- g_assert (window->style->font_desc);
-
- fake_expose_widget (window, pixmap);
- fake_expose_widget (preview, pixmap);
- fake_expose_widget (stock_button, pixmap);
- gtk_container_foreach (GTK_CONTAINER (GTK_BIN (GTK_BIN (stock_button)->child)->child),
- hbox_foreach,
- pixmap);
- fake_expose_widget (GTK_BIN (stock_button)->child, pixmap);
-
-
- gdk_pixbuf_get_from_drawable (pixbuf, pixmap, NULL, 0, 0, 0, 0, ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT);
-
- /* Handle the icon theme */
- icon_theme = gtk_icon_theme_new ();
- gtk_icon_theme_set_custom_theme (icon_theme, (char *) theme_thumbnail_data->icon_theme_name->data);
-
- /* Have to try both "folder" and "gnome-fs-directory" seems themes seem to use either name */
- folder_icon_info = gtk_icon_theme_lookup_icon (icon_theme, "folder", 48, GTK_ICON_LOOKUP_FORCE_SVG);
- if (folder_icon_info == NULL) {
- folder_icon_info = gtk_icon_theme_lookup_icon (icon_theme, "gnome-fs-directory", 48, GTK_ICON_LOOKUP_FORCE_SVG);
- }
-
- g_object_unref (icon_theme);
-
- filename = gtk_icon_info_get_filename (folder_icon_info);
-
- if (filename != NULL)
- {
- folder_icon = gdk_pixbuf_new_from_file (filename, NULL);
- }
- else
- {
- folder_icon = NULL;
- }
-
- gtk_icon_info_free (folder_icon_info);
-
- /* render the icon to the thumbnail */
- if (folder_icon)
- {
- gdk_pixbuf_composite (folder_icon,
- pixbuf,
- align->allocation.x + align->allocation.width - gdk_pixbuf_get_width (folder_icon) - 5,
- align->allocation.y + align->allocation.height - gdk_pixbuf_get_height (folder_icon) - 5,
- gdk_pixbuf_get_width (folder_icon),
- gdk_pixbuf_get_height (folder_icon),
- align->allocation.x + align->allocation.width - gdk_pixbuf_get_width (folder_icon) - 5,
- align->allocation.y + align->allocation.height - gdk_pixbuf_get_height (folder_icon) - 5,
- 1.0, 1.0, GDK_INTERP_BILINEAR, 255);
- g_object_unref (folder_icon);
- }
-}
-
-static void
-handle_bytes (const gchar *buffer,
- gint bytes_read,
- ThemeThumbnailData *theme_thumbnail_data)
-{
- const gchar *ptr;
- ptr = buffer;
-
- while (bytes_read > 0)
- {
- char *nil;
- switch (theme_thumbnail_data->status)
- {
- case READY_FOR_THEME:
- case READING_CONTROL_THEME_NAME:
- theme_thumbnail_data->status = READING_CONTROL_THEME_NAME;
- nil = memchr (ptr, '\000', bytes_read);
- if (nil == NULL)
- {
- g_byte_array_append (theme_thumbnail_data->control_theme_name, ptr, bytes_read);
- bytes_read = 0;
- }
- else
- {
- g_byte_array_append (theme_thumbnail_data->control_theme_name, ptr, nil - ptr + 1);
- bytes_read -= (nil - ptr + 1);
- ptr = nil + 1;
- theme_thumbnail_data->status = READING_WM_THEME_NAME;
- }
- break;
- case READING_WM_THEME_NAME:
- nil = memchr (ptr, '\000', bytes_read);
- if (nil == NULL)
- {
- g_byte_array_append (theme_thumbnail_data->wm_theme_name, ptr, bytes_read);
- bytes_read = 0;
- }
- else
- {
- g_byte_array_append (theme_thumbnail_data->wm_theme_name, ptr, nil - ptr + 1);
- bytes_read -= (nil - ptr + 1);
- ptr = nil + 1;
- theme_thumbnail_data->status = READING_ICON_THEME_NAME;
- }
- break;
- case READING_ICON_THEME_NAME:
- nil = memchr (ptr, '\000', bytes_read);
- if (nil == NULL)
- {
- g_byte_array_append (theme_thumbnail_data->icon_theme_name, ptr, bytes_read);
- bytes_read = 0;
- }
- else
- {
- g_byte_array_append (theme_thumbnail_data->icon_theme_name, ptr, nil - ptr + 1);
- bytes_read -= (nil - ptr + 1);
- ptr = nil + 1;
- theme_thumbnail_data->status = READING_APPLICATION_FONT;
- }
- break;
- case READING_APPLICATION_FONT:
- nil = memchr (ptr, '\000', bytes_read);
- if (nil == NULL)
- {
- g_byte_array_append (theme_thumbnail_data->application_font, ptr, bytes_read);
- bytes_read = 0;
- }
- else
- {
- g_byte_array_append (theme_thumbnail_data->application_font, ptr, nil - ptr + 1);
- bytes_read -= (nil - ptr + 1);
- ptr = nil + 1;
- theme_thumbnail_data->status = WRITING_PIXBUF_DATA;
- }
- break;
- default:
- g_assert_not_reached ();
- }
- }
-}
-
-static gboolean
-message_from_capplet (GIOChannel *source,
- GIOCondition condition,
- gpointer data)
-{
- gchar buffer[1024];
- GIOStatus status;
- gsize bytes_read;
- GdkPixbuf *pixbuf;
- gint i, rowstride;
- char *pixels;
- ThemeThumbnailData *theme_thumbnail_data;
-
- theme_thumbnail_data = (ThemeThumbnailData *)data;
-
- status = g_io_channel_read_chars (source,
- buffer,
- 1024,
- &bytes_read,
- NULL);
-
- switch (status)
- {
- case G_IO_STATUS_NORMAL:
- handle_bytes (buffer, bytes_read, theme_thumbnail_data);
-
- if (theme_thumbnail_data->status == WRITING_PIXBUF_DATA)
- {
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT);
- create_image (theme_thumbnail_data, pixbuf);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- pixels = gdk_pixbuf_get_pixels (pixbuf);
- for (i = 0; i < ICON_SIZE_HEIGHT; i ++)
- {
- write (pipe_from_factory_fd[1], pixels + (rowstride)*i, ICON_SIZE_WIDTH * gdk_pixbuf_get_n_channels (pixbuf));
- }
- g_object_unref (pixbuf);
- theme_thumbnail_data->status = READY_FOR_THEME;
- g_byte_array_set_size (theme_thumbnail_data->control_theme_name, 0);
- g_byte_array_set_size (theme_thumbnail_data->wm_theme_name, 0);
- g_byte_array_set_size (theme_thumbnail_data->icon_theme_name, 0);
- g_byte_array_set_size (theme_thumbnail_data->application_font, 0);
- }
- return TRUE;
- case G_IO_STATUS_AGAIN:
- return TRUE;
- case G_IO_STATUS_EOF:
- case G_IO_STATUS_ERROR:
- _exit (0);
- default:
- g_assert_not_reached ();
- }
-
- return TRUE;
-}
-
-static gboolean
-message_from_child (GIOChannel *source,
- GIOCondition condition,
- gpointer data)
-{
-
- gchar buffer[1024];
- GIOStatus status;
- gsize bytes_read;
-
- if (async_data.set == FALSE)
- return TRUE;
-
- status = g_io_channel_read_chars (source,
- buffer,
- 1024,
- &bytes_read,
- NULL);
- switch (status)
- {
- case G_IO_STATUS_NORMAL:
- g_byte_array_append (async_data.data, buffer, bytes_read);
- if (async_data.data->len == ICON_SIZE_WIDTH * ICON_SIZE_HEIGHT * 4)
- {
- GdkPixbuf *pixbuf;
- GdkPixbuf *scaled_pixbuf;
- gchar *pixels;
- gint i, rowstride;
-
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT);
- pixels = gdk_pixbuf_get_pixels (pixbuf);
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- for (i = 0; i < ICON_SIZE_HEIGHT; i++)
- memcpy (pixels + rowstride * i, async_data.data->data + 4 * ICON_SIZE_WIDTH * i, ICON_SIZE_WIDTH * 4);
-
- scaled_pixbuf = gdk_pixbuf_scale_simple (pixbuf, ICON_SIZE_WIDTH/2, ICON_SIZE_HEIGHT/2, GDK_INTERP_BILINEAR);
- g_hash_table_insert (theme_hash, g_strdup(async_data.meta_theme_name), scaled_pixbuf);
- g_object_unref (pixbuf);
-
- (* async_data.func) (scaled_pixbuf, async_data.user_data);
- if (async_data.destroy)
- (* async_data.destroy) (async_data.user_data);
-
- /* Clean up async_data */
- g_free (async_data.meta_theme_name);
- g_source_remove (async_data.watch_id);
- g_io_channel_unref (async_data.channel);
-
- /* reset async_data */
- async_data.meta_theme_name = NULL;
- async_data.channel = NULL;
- async_data.func = NULL;
- async_data.user_data = NULL;
- async_data.destroy = NULL;
- async_data.set = FALSE;
- g_byte_array_set_size (async_data.data, 0);
- }
- return TRUE;
- case G_IO_STATUS_AGAIN:
- return TRUE;
-
- case G_IO_STATUS_EOF:
- case G_IO_STATUS_ERROR:
- return TRUE;
- default:
- g_assert_not_reached ();
- }
-
- return TRUE;
-}
-
-void
-theme_thumbnail_invalidate_cache (GnomeThemeMetaInfo *meta_theme_info)
-{
- gboolean success;
-
- success = g_hash_table_remove (theme_hash, meta_theme_info->name);
- printf ("Success is %d\n", success);
-}
-
-GdkPixbuf *
-generate_theme_thumbnail (GnomeThemeMetaInfo *meta_theme_info,
- gboolean clear_cache)
-{
- GdkPixbuf *retval = NULL;
- GdkPixbuf *pixbuf = NULL;
- gint i, rowstride;
- char *pixels;
-
- g_return_val_if_fail (async_data.set == FALSE, NULL);
-
- pixbuf = g_hash_table_lookup (theme_hash, meta_theme_info->name);
- if (pixbuf != NULL)
- {
- if (clear_cache)
- g_hash_table_remove (theme_hash, meta_theme_info->name);
- else
- return pixbuf;
- }
-
- if (!pipe_to_factory_fd[1] || !pipe_from_factory_fd[0])
- return NULL;
-
- pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, TRUE, 8, ICON_SIZE_WIDTH, ICON_SIZE_HEIGHT);
- write (pipe_to_factory_fd[1], meta_theme_info->gtk_theme_name, strlen (meta_theme_info->gtk_theme_name) + 1);
- write (pipe_to_factory_fd[1], meta_theme_info->metacity_theme_name, strlen (meta_theme_info->metacity_theme_name) + 1);
- write (pipe_to_factory_fd[1], meta_theme_info->icon_theme_name, strlen (meta_theme_info->icon_theme_name) + 1);
- if (meta_theme_info->application_font == NULL)
- write (pipe_to_factory_fd[1], "Sans 10", strlen ("Sans 10") + 1);
- else
- write (pipe_to_factory_fd[1], meta_theme_info->application_font, strlen (meta_theme_info->application_font) + 1);
-
- rowstride = gdk_pixbuf_get_rowstride (pixbuf);
- pixels = gdk_pixbuf_get_pixels (pixbuf);
-
- for (i = 0; i < ICON_SIZE_HEIGHT; i++)
- {
- gint j = 0;
- gint bytes_read;
-
- do
- {
- bytes_read = read (pipe_from_factory_fd[0], pixels + (rowstride)*i + j, ICON_SIZE_WIDTH * gdk_pixbuf_get_n_channels (pixbuf) - j);
- if (bytes_read > 0)
- j += bytes_read;
- else if (bytes_read == 0)
- {
- g_warning ("Received EOF while reading thumbnail for gtk: '%s', metacity '%s', icon: '%s', font: '%s'\n",
- meta_theme_info->gtk_theme_name,
- meta_theme_info->metacity_theme_name,
- meta_theme_info->icon_theme_name,
- meta_theme_info->application_font ? meta_theme_info->application_font : "Sans 10");
- g_object_unref (pixbuf);
- close (pipe_to_factory_fd[1]);
- pipe_to_factory_fd[1] = 0;
- close (pipe_from_factory_fd[0]);
- pipe_from_factory_fd[0] = 0;
- return NULL;
- }
- }
- while (j < ICON_SIZE_WIDTH * gdk_pixbuf_get_n_channels (pixbuf));
- }
-
- retval = gdk_pixbuf_scale_simple (pixbuf, ICON_SIZE_WIDTH/2, ICON_SIZE_HEIGHT/2, GDK_INTERP_BILINEAR);
- g_object_unref (pixbuf);
-
- g_hash_table_insert (theme_hash, g_strdup (meta_theme_info->name), retval);
- return retval;
-}
-
-void
-generate_theme_thumbnail_async (GnomeThemeMetaInfo *meta_theme_info,
- ThemeThumbnailFunc func,
- gpointer user_data,
- GDestroyNotify destroy)
-{
- GdkPixbuf *pixbuf;
-
- g_return_if_fail (async_data.set == FALSE);
-
- pixbuf = g_hash_table_lookup (theme_hash, meta_theme_info->name);
- if (pixbuf != NULL)
- {
- (* func) (pixbuf, user_data);
- if (destroy)
- (* destroy) (user_data);
- return;
- }
-
- if (!pipe_to_factory_fd[1] || !pipe_from_factory_fd[0])
- {
- (* func) (NULL, user_data);
- if (destroy)
- (* destroy) (user_data);
- return;
- }
-
- if (async_data.channel == NULL)
- {
- async_data.channel = g_io_channel_unix_new (pipe_from_factory_fd[0]);
- g_io_channel_set_flags (async_data.channel, g_io_channel_get_flags (async_data.channel) |
- G_IO_FLAG_NONBLOCK, NULL);
- g_io_channel_set_encoding (async_data.channel, NULL, NULL);
- async_data.watch_id = g_io_add_watch (async_data.channel, G_IO_IN | G_IO_HUP, message_from_child, NULL);
- }
-
-
- async_data.set = TRUE;
- async_data.meta_theme_name = g_strdup (meta_theme_info->name);
- async_data.func = func;
- async_data.user_data = user_data;
- async_data.destroy = destroy;
-
- write (pipe_to_factory_fd[1], meta_theme_info->gtk_theme_name, strlen (meta_theme_info->gtk_theme_name) + 1);
- write (pipe_to_factory_fd[1], meta_theme_info->metacity_theme_name, strlen (meta_theme_info->metacity_theme_name) + 1);
- write (pipe_to_factory_fd[1], meta_theme_info->icon_theme_name, strlen (meta_theme_info->icon_theme_name) + 1);
- if (meta_theme_info->application_font == NULL)
- write (pipe_to_factory_fd[1], "Sans 10", strlen ("Sans 10") + 1);
- else
- write (pipe_to_factory_fd[1], meta_theme_info->application_font, strlen (meta_theme_info->application_font) + 1);
-}
-
-void
-theme_thumbnail_factory_init (int argc, char *argv[])
-{
- pipe (pipe_to_factory_fd);
- pipe (pipe_from_factory_fd);
-
- child_pid = fork ();
- if (child_pid == 0)
- {
- ThemeThumbnailData data;
- GIOChannel *channel;
-
- /* Child */
- gtk_init (&argc, &argv);
-
- close (pipe_to_factory_fd[1]);
- pipe_to_factory_fd[1] = 0;
- close (pipe_from_factory_fd[0]);
- pipe_from_factory_fd[0] = 0;
-
- data.status = READY_FOR_THEME;
- data.control_theme_name = g_byte_array_new ();
- data.wm_theme_name = g_byte_array_new ();
- data.icon_theme_name = g_byte_array_new ();
- data.application_font = g_byte_array_new ();
-
- channel = g_io_channel_unix_new (pipe_to_factory_fd[0]);
- g_io_channel_set_flags (channel, g_io_channel_get_flags (channel) |
- G_IO_FLAG_NONBLOCK, NULL);
- g_io_channel_set_encoding (channel, NULL, NULL);
- g_io_add_watch (channel, G_IO_IN | G_IO_HUP, message_from_capplet, &data);
- g_io_channel_unref (channel);
-
- gtk_main ();
- _exit (0);
- }
-
- g_assert (child_pid > 0);
-
- /* Parent */
- close (pipe_to_factory_fd[0]);
- close (pipe_from_factory_fd[1]);
- async_data.set = FALSE;
- async_data.meta_theme_name = NULL;
- async_data.data = g_byte_array_new ();
-
- theme_hash = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_object_unref);
-}
diff --git a/capplets/common/theme-thumbnail.h b/capplets/common/theme-thumbnail.h
deleted file mode 100644
index 9b86a51cf..000000000
--- a/capplets/common/theme-thumbnail.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __THEME_THUMBNAIL_H__
-#define __THEME_THUMBNAIL_H__
-
-
-#include <gtk/gtk.h>
-#include "gnome-theme-info.h"
-
-typedef void (* ThemeThumbnailFunc) (GdkPixbuf *pixbuf,
- gpointer data);
-
-
-GdkPixbuf *generate_theme_thumbnail (GnomeThemeMetaInfo *meta_theme_info,
- gboolean clear_cache);
-void generate_theme_thumbnail_async (GnomeThemeMetaInfo *meta_theme_info,
- ThemeThumbnailFunc func,
- gpointer data,
- GDestroyNotify destroy);
-void theme_thumbnail_invalidate_cache (GnomeThemeMetaInfo *meta_theme_info);
-void theme_thumbnail_factory_init (int argc,
- char *argv[]);
-
-
-
-#endif /* __THEME_THUMBNAIL_H__ */
diff --git a/capplets/common/wm-common.c b/capplets/common/wm-common.c
deleted file mode 100644
index c8ddf462d..000000000
--- a/capplets/common/wm-common.c
+++ /dev/null
@@ -1,149 +0,0 @@
-#include <X11/Xatom.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdk.h>
-#include <string.h>
-#include <glib.h>
-#include <glib-object.h>
-#include "wm-common.h"
-
-typedef struct _WMCallbackData
-{
- GFunc func;
- gpointer data;
-} WMCallbackData;
-
-/* Our WM Window */
-static Window wm_window = None;
-
-char*
-wm_common_get_current_window_manager (void)
-{
- Atom utf8_string, atom, type;
- int result;
- char *retval;
- int format;
- gulong nitems;
- gulong bytes_after;
- guchar *val;
-
- if (wm_window == None)
- return WM_COMMON_UNKNOWN;
-
- utf8_string = XInternAtom (GDK_DISPLAY (), "UTF8_STRING", False);
- atom = XInternAtom (GDK_DISPLAY (), "_NET_WM_NAME", False);
-
- gdk_error_trap_push ();
-
- result = XGetWindowProperty (GDK_DISPLAY (),
- wm_window,
- atom,
- 0, G_MAXLONG,
- False, utf8_string,
- &type, &format, &nitems,
- &bytes_after, (guchar **)&val);
-
- if (gdk_error_trap_pop () || result != Success)
- return WM_COMMON_UNKNOWN;
-
- if (type != utf8_string ||
- format !=8 ||
- nitems == 0)
- {
- if (val)
- XFree (val);
- return WM_COMMON_UNKNOWN;
- }
-
- if (!g_utf8_validate (val, nitems, NULL))
- {
- XFree (val);
- return WM_COMMON_UNKNOWN;
- }
-
- retval = g_strndup (val, nitems);
-
- XFree (val);
-
- return retval;
-}
-
-static void
-update_wm_window (void)
-{
- Window *xwindow;
- Atom type;
- gint format;
- gulong nitems;
- gulong bytes_after;
-
- XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
- XInternAtom (GDK_DISPLAY (), "_NET_SUPPORTING_WM_CHECK", False),
- 0, G_MAXLONG, False, XA_WINDOW, &type, &format,
- &nitems, &bytes_after, (guchar **) &xwindow);
-
- if (type != XA_WINDOW)
- {
- wm_window = None;
- return;
- }
-
- gdk_error_trap_push ();
- XSelectInput (GDK_DISPLAY (), *xwindow, StructureNotifyMask | PropertyChangeMask);
- XSync (GDK_DISPLAY (), False);
-
- if (gdk_error_trap_pop ())
- {
- XFree (xwindow);
- wm_window = None;
- return;
- }
-
- wm_window = *xwindow;
- XFree (xwindow);
-}
-
-static GdkFilterReturn
-wm_window_event_filter (GdkXEvent *xev,
- GdkEvent *event,
- gpointer data)
-{
- WMCallbackData *ncb_data = (WMCallbackData*) data;
- XEvent *xevent = (XEvent *)xev;
-
- if ((xevent->type == DestroyNotify &&
- wm_window != None && xevent->xany.window == wm_window) ||
- (xevent->type == PropertyNotify &&
- xevent->xany.window == GDK_ROOT_WINDOW () &&
- xevent->xproperty.atom == (XInternAtom (GDK_DISPLAY (), "_NET_SUPPORTING_WM_CHECK", False))) ||
- (xevent->type == PropertyNotify &&
- wm_window != None && xevent->xany.window == wm_window &&
- xevent->xproperty.atom == (XInternAtom (GDK_DISPLAY (), "_NET_WM_NAME", False))))
- {
- update_wm_window ();
- (* ncb_data->func) ((gpointer)wm_common_get_current_window_manager(),
- ncb_data->data);
- }
-
- return GDK_FILTER_CONTINUE;
-}
-
-void
-wm_common_register_window_manager_change (GFunc func,
- gpointer data)
-{
- WMCallbackData *ncb_data;
-
- ncb_data = g_new0 (WMCallbackData, 1);
-
- ncb_data->func = func;
- ncb_data->data = data;
-
- gdk_window_add_filter (NULL, wm_window_event_filter, ncb_data);
-
- update_wm_window ();
-
- XSelectInput (GDK_DISPLAY (), GDK_ROOT_WINDOW (), PropertyChangeMask);
- XSync (GDK_DISPLAY (), False);
-}
-
-
diff --git a/capplets/common/wm-common.h b/capplets/common/wm-common.h
deleted file mode 100644
index 08c7145d0..000000000
--- a/capplets/common/wm-common.h
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef WM_COMMON_H
-#define WM_COMMON_H
-
-#define WM_COMMON_METACITY "Metacity"
-#define WM_COMMON_SAWFISH "Sawfish"
-#define WM_COMMON_UNKNOWN "Unknown"
-
-gchar *wm_common_get_current_window_manager (void);
-void wm_common_register_window_manager_change (GFunc func,
- gpointer data);
-
-#endif /* WM_COMMON_H */
-
diff --git a/capplets/common/wrapper-script.in b/capplets/common/wrapper-script.in
deleted file mode 100644
index 15de09ddd..000000000
--- a/capplets/common/wrapper-script.in
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-
-if test "x$#" = "x0"
-then
- @BINDIR@/gnomecc --run-capplet @CAPPLET_NAME@
-else
- @BINDIR@/@CAPPLET_NAME@-control $@
-fi
-
diff --git a/capplets/default-applications/.cvsignore b/capplets/default-applications/.cvsignore
deleted file mode 100644
index 3e283f9ef..000000000
--- a/capplets/default-applications/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-gnome-default-applications-properties
-default-applications.desktop
-default-applications.desktop.in
diff --git a/capplets/default-applications/ChangeLog b/capplets/default-applications/ChangeLog
deleted file mode 100644
index 7410680ce..000000000
--- a/capplets/default-applications/ChangeLog
+++ /dev/null
@@ -1,523 +0,0 @@
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties-structs.c:
- list "thunderbird" as program name,
- patch from Pawel Worach <sajd@telia.com> (Closes: #167757).
-
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.glade:
- fix a warning about the icon,
- patch from Matthias Clasen <mclasen@redhat.com> (Closes: #168060).
-
-2005-01-08 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties-structs.c: add evolution-2.0
- and evolution-2.2 to the mailers list (Closes: #163334).
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-11-30 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties-structs.c: use the right name
- for each browser instead of listing different names for some entry
- (#155246).
-
-2004-11-26 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.glade: changed a mnemonic to
- fix #144343.
-
-2004-11-26 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.glade: Mask the "Text Editor"
- tab since it's not used by the new mime system.
-
-2004-11-26 Michael Terry <mike@mterry.name>
-
- * gnome-default-applications-properties.glade: Simplify some strings
- and add a window icon per bug #98918.
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * default-applications.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-21 J.H.M. Dassen (Ray) <jdassen@debian.org>
-
- * gnome-default-applications-properties-structs.c: Added Thunderbird to
- the mail clients.
-
-2004-10-21 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.c: (read_browser),
- (read_mailer):
- don't crash if the browser list or the mailer list is empty
- (Closes: #151672).
-
-2004-10-17 J.H.M. Dassen (Ray) <jdassen@debian.org>
-
- * gnome-default-applications-properties-structs.c:
- * Corrected w3m binary name
- * Added Debian's "sensible-browser" (wrapper script honouring
- $BROWSER (http://www.catb.org/~esr/BROWSER/), x-www-browser etc.)
- * Added Debian's "x-terminal-emulator" (which is managed through the
- alternatives mechanism)
- * Added "aterm" (http://aterm.sf.net)
- * Added "Firefox" entry (official capitalisation; no StudlyCaps)
- * Removed inconsistent "Firebird/FireFox" entry
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-10-14 Sebastien Bacher <seb128@debian.org>
-
- * gnome-default-applications-properties.c: (setup_peditors),
- (read_browser), (value_changed_cb): Use the Web Browser for https too.
- (Closes: #123487).
-
-2004-10-14 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-default-applications-properties-structs.c: Revert string
- changes and add entries for Firefox on Debian and Fedora with
- new binary names. Original patch from jdassen at debian org.
- Closes part of bug #155246. The original patch should go into HEAD
- after branching.
- * gnome-default-applications-properties.c: (browser_setup_custom),
- (mailer_setup_custom), (terminal_setup_custom): Use the binary
- that's found in the path. Patch by seb128 at debian org. Closes
- bug #148991.
-
-2004-10-12 J.H.M. Dassen (Ray) <jdassen@debian.org>
-
- * gnome-default-applications-properties-structs.c: Added Mozilla
- Firefox, Debian's "sensible-browser" and Debian's
- "x-terminal-emulator"; corrected typo in "w3m" binary name.
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-default-applications-properties.c: (create_dialog):
- Use themed icon for WM hint.
-
-2004-07-13 David Sedeño <david@alderia.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=147244
- * gnome-default-applications-properties.c: Only put the toggles
- inconsistent if there are not custom commands
-
-2004-06-08 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=143975
- * gnome-default-applications-properties-structs.c : quick fix
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-06 Andrew Sobala <aes@gnome.org>
-
- * gnome-default-applications-properties-structs.c:
- add evo 1.5 and 1.6 to the list
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * gnome-default-applications-properties.c : Unique-ify the lists so
- that we can handle multiple excutable names for the same browser
- when the list jumps to gconf. Remove the vile hack specifict to
- evolution.
-
- * gnome-default-applications-properties-structs.c (};) : remove the
- nremote flag and add a few new browsers.
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-default-applications-properties.c: (dialog_response): Update
- help link to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2004-01-09 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-default-applications-properties.glade: Add accessible
- relations so accessible names are correctly reported.
- Fixes bug #127302.
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-default-applications-properties.glade: Patch to fix spacing
- between action area and vbox of preferences dialog.
-
-Fri Aug 1 15:49:03 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-default-applications-properties-structs.c
- (possible_terminals): Add N_() calls to all the human readable
- strings. Based on a patch from Christophe Fergeau
- <teuf@users.sourceforge.net>, #117085
-
- * gnome-default-applications-properties-structs.c
- (possible_terminals): remove help browsers. We basically only
- support yelp at this point.
-
-2003-07-19 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-default-applications-properties.c: Added a window icon
- to the capplet.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-default-applications-properties.glade: Very minor
- HIGification of widget padding.
-
-2003-07-14 Christophe Fergeau <teuf@gnome.org>
-
- * gnome-default-applications-properties-structs.c: added a few more
- mailers
- * gnome-default-applications-properties.c:
- (initialize_default_applications): only display Evolution once when
- both evo<=1.2 and evo>=1.4 are installed
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-25 Christophe Fergeau <teuf@users.sourceforge.net>
-
- * capplets/default-applications/gnome-default-applications-properties-structs.c
- * capplets/default-applications/gnome-default-applications-properties.c
- * capplets/default-applications/gnome-default-applications-properties.glade
- Added a tab to choose the preferred mailer, added epiphany to the list
- known browsers, don't select any checkbox there is no default browser
- or mailer
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-02-18 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-default-application-properties.c: Fix a double free poop
- that I made while fixing leaks. Spotted by jrb.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 Satyajit Kanungo <satyajit.kanungo@wipro.com>
- * Changed the App name passed to gnome_program_init().
- There was a small type in the name. Fixes bug #104060
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * default-applications.desktop.in: Fix the desktop file so that it
- validates.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-24 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-default-applications-properties.c : Changed the help file
- link to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * file-types-capplet.c (cb_file_type_dialog_response) : Improve
- handling of help failures.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * gnome-default-applications-properties.c (dialog_response) : improve
- handling of help failures.
-
-Sun May 26 11:33:26 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-default-applications-properties.c (main): use APPID
- instead of argv[0]
-
-Sun May 26 01:50:22 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-default-applications-properties.c (read_editor): patch
- from Till Adam <till@adam-lilienthal.de> to not die if we have the
- mimedata not installed.
-
-2002-05-20 jacob berkman <jacob@ximian.com>
-
- * gnome-default-applications-properties.c (text_apply_editor):
- just return if there's no text in the entry (fixes #8200, from Soren Sandmann
- <sandmann@daimi.au.dk>)
-
-2002-05-16 jacob berkman <jacob@ximian.com>
-
- * gnome-default-applications-properties.glade: turn off help tab,
- put browser tab first, and fix things for the editor
-
- * gnome-default-applications-properties.c: make the editor changes
- use gnome-vfs, and make the browser use the default key rather
- than http
-
- fixes #78037
-
-Wed Apr 10 18:05:13 2002 Jonathan Blandford <jrb@gnome.org>
-
- * default-applications.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-28 Richard Hestilow <hestilow@ximian.com>
-
- * gnome-default-applications-properties.glade: Make dialog title
- match .desktop label.
-
-2002-03-28 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-default-applications-properties.c (setup_peditors): Fix typo
- (read_help_viewer): Rename accepts_lineno to accepts_urls to avoid confusion
- (generic_guard): Set entry to empty string initially to force 'changed'
- signal on single-item combos too
- (read_editor): Use #defined key names to avoid future typos
- (setup_peditors): Ditto
- (read_browser): Ditto
- (read_help_viewer): Ditto
- (read_terminal): Ditto
- (create_dialog): Unsensitize combos, if defaults list is empty
-
-2002-03-07 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-default-applications-properties.c (generic_guard): Set focus
- and emit signal here, instead of mnemonic handler
- (create_dialog): Set data on radio widgets, to be used for focus/entry
- tracking. Do not connect mnemonic_activate signals, as these are
- handled by toggles already.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-default-applications-properties.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-17 Seth Nickell <snickell@stanford.edu>
-
- * default-applications.desktop.in:
-
- Change menu name to "Preferred Applications" which faired
- better in user testing.
-
-2002-02-11 Seth Nickell <snickell@stanford.edu>
-
- * gnome-default-applications-properties-structs.c:
- * gnome-default-applications-properties.c: (read_editor),
- (setup_peditors), (read_browser), (browser_setup_custom),
- (value_changed_cb), (dialog_response), (create_dialog):
- * gnome-default-applications-properties.glade:
-
- Convert to instant apply, change to using property editors
- where convenient.
-
-2002-02-10 Richard Hestilow <hestilow@ximian.com>
-
- * Convert to apply/close, and commit a UI string
- fix from fflewddur@dropline.net.
-
-Sun Feb 10 23:39:30 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-default-applications-properties.glade: Patch from
- fflewddur <fflewddur@dropline.net> to fix some strings.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-default-applications-properties.c (initialize_default_applications):
- Use glib methods instead of deprecated libgnome ones
- (read_editor): Do not crash on NULL value
- (read_help_viewer): Ditto
- (read_browser): Ditto
-
-2002-01-19 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
-
- Install the icon into the pixmaps dir so
- the Panel & Nautilus will pick up on it.
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (bin_PROGRAMS): Renamed binary
- gnome2-default-applications-properties
- (gnome2_default_applications_properties_SOURCES): Update
- (EXTRA_DIST): Put source file here
-
-2002-01-04 Bradford Hovinen <hovinen@ximian.com>
-
- * default-application-properties.c (edit_read): Check if tmp is
- NULL before continuing
- Use terminal/exec for terminal executable name key
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Clean up
-
- * default-application-properties.c (main): Call gtk_main, not
- capplet_gtk_main
-
- * interface.c: Don't #include capplet-widget.h
-
-2001-12-19 Seth Nickell <snickell@stanford.edu>
-
- * default-applications.desktop.in.in:
-
- Add Categories field so it shows up under the
- Settings submenu in the panel menus.
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * Port to GConf.
-
-2001-12-01 Richard Hestilow <hestilow@ximian.com>
-
- * Initial GNOME2 port.
-
-2001-08-18 Abel Cheung <maddog@linux.org.hk>
-
- * interface.c (edit_create): Fixed a string (cut 'n paste is source
- of all evil)
-
-2001-07-31 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): add DISTDIR to install-data-local
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am: remove the DESKTOP_IN_RULE and copy the sed here
-
-2001-07-23 Richard Hestilow <hestilow@ximian.com>
-
- * callbacks.c (on_radiodefeditor_toggled): Only set_selected_editor
- if the button is enabled.
- (on_seldefbrowser_toggled): Ditto.
- (on_seldefview_toggled): Ditto.
- (on_seldefterm_toggled): Ditto.
-
- * default-application-properties.c (fill_editor_data): Fix widget
- name typo.
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove SUBDIRS
-
-2001-07-18 Chema Celorio <chema@celorio.com>
-
- * default-applications.desktop.in.in (Exec): use the right binary name
-
- * Makefile.am (INCLUDES): we are not using GNOMESYSCONFDIR. remove
-
-2001-07-17 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (SUBDIRS): clean
-
-2001-07-17 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (default_application_properties_capplet_SOURCES):
- Added header files, including missing defaults.h
- (EXTRA_DIST): Removed header files
-
-2001-07-16 Chema Celorio <chema@celorio.com>
-
- * default-application-properties.c (possible_editors): is gedit not gEdit
- plues it is the default editor, not emacs ;-) (Yes, i MAY be a little biased
- here)
-
-2001-07-16 Richard Hestilow <hestilow@ximian.com>
-
- * Makefile.am: Fix typo in install-data-local.
-
-2001-07-16 Richard Hestilow <hestilow@ximian.com>
-
- * ChangeLog started.
-
- * default-application-properties.c (main): Pass correct name to
- capplet_widget_init, for .desktop file magic.
diff --git a/capplets/default-applications/Makefile.am b/capplets/default-applications/Makefile.am
deleted file mode 100644
index da07602cf..000000000
--- a/capplets/default-applications/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-bin_PROGRAMS = gnome-default-applications-properties
-
-gnome_default_applications_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-gnome_default_applications_properties_SOURCES = \
- gnome-default-applications-properties.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-default-applications-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = default-applications.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA) gnome-default-applications-properties-structs.c
diff --git a/capplets/default-applications/default-applications-capplet.png b/capplets/default-applications/default-applications-capplet.png
deleted file mode 100644
index ad7fba116..000000000
--- a/capplets/default-applications/default-applications-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/default-applications/default-applications-properties.glade b/capplets/default-applications/default-applications-properties.glade
deleted file mode 100644
index 56a6051ca..000000000
--- a/capplets/default-applications/default-applications-properties.glade
+++ /dev/null
@@ -1 +0,0 @@
-1 \ No newline at end of file
diff --git a/capplets/default-applications/default-applications.desktop.in.in b/capplets/default-applications/default-applications.desktop.in.in
deleted file mode 100644
index 68d6cf7ae..000000000
--- a/capplets/default-applications/default-applications.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Preferred Applications
-_Comment=Select your default applications
-Exec=gnome-default-applications-properties
-Icon=gnome-settings-default-applications
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;AdvancedSettings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=other capplets
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/default-applications/gnome-default-applications-properties-structs.c b/capplets/default-applications/gnome-default-applications-properties-structs.c
deleted file mode 100644
index f6998da5f..000000000
--- a/capplets/default-applications/gnome-default-applications-properties-structs.c
+++ /dev/null
@@ -1,65 +0,0 @@
-struct _BrowserDescription {
- gchar const *name;
- gchar const *executable_name;
- gchar const *command;
- gboolean needs_term;
- gboolean in_path;
-};
-BrowserDescription possible_browsers[] = {
- { N_("Debian Sensible Browser"), "sensible-browser", "sensible-browser %s", FALSE, FALSE },
- { N_("Epiphany"), "epiphany", "epiphany %s", FALSE, FALSE },
- { N_("Galeon"), "galeon", "galeon %s", FALSE, FALSE },
- { N_("Encompass"), "encompass", "encompass %s", FALSE, FALSE },
- { N_("Firebird"), "mozilla-firebird", "mozilla-firebird %s", FALSE, FALSE },
- { N_("Firefox"), "firefox", "firefox %s", FALSE, FALSE },
- { N_("Mozilla"), "mozilla-1.6", "mozilla-1.6 %s", FALSE, FALSE },
- { N_("Mozilla"), "mozilla", "mozilla %s", FALSE, FALSE },
- { N_("Netscape Communicator"), "netscape", "netscape %s", FALSE, FALSE },
- { N_("Konqueror"), "konqueror", "konqueror %s", FALSE, FALSE },
- { N_("W3M Text Browser"), "w3m", "w3m %s", TRUE, FALSE },
- { N_("Lynx Text Browser"), "lynx", "lynx %s", TRUE, FALSE },
- { N_("Links Text Browser") , "links", "links %s", TRUE, FALSE }
-};
-
-struct _MailerDescription {
- gchar const *name;
- gchar const *executable_name;
- gchar const *command;
- gboolean needs_term;
- gboolean in_path;
-};
-MailerDescription possible_mailers[] = {
- /* The code in gnome-default-applications-properties.c makes sure
- * there is only one (the first entry in this list) Evolution entry
- * in the list shown to the user
- */
- { N_("Evolution Mail Reader"), "evolution-2.2", "evolution-2.2 %s", FALSE, FALSE, },
- { N_("Evolution Mail Reader"), "evolution-2.0", "evolution-2.0 %s", FALSE, FALSE, },
- { N_("Evolution Mail Reader"), "evolution-1.6", "evolution-1.6 %s", FALSE, FALSE, },
- { N_("Evolution Mail Reader"), "evolution-1.5", "evolution-1.5 %s", FALSE, FALSE, },
- { N_("Evolution Mail Reader"), "evolution-1.4", "evolution-1.4 %s", FALSE, FALSE, },
- { N_("Evolution Mail Reader"), "evolution", "evolution %s", FALSE, FALSE, },
- { N_("Balsa"), "balsa", "balsa -m %s", FALSE, FALSE },
- { N_("KMail"), "kmail", "kmail %s", FALSE, FALSE },
- { N_("Thunderbird"), "thunderbird", "thunderbird -mail %s", FALSE, FALSE},
- { N_("Thunderbird"), "mozilla-thunderbird", "mozilla-thunderbird -mail %s", FALSE, FALSE},
- { N_("Mozilla Mail"), "mozilla", "mozilla -mail %s", FALSE, FALSE},
- { N_("Mutt") , "mutt", "mutt %s", TRUE, FALSE },
-
-};
-
-struct _TerminalDesciption {
- gchar const *name;
- gchar const *exec;
- gchar const *exec_arg;
- gboolean in_path;
-};
-TerminalDescription possible_terminals[] = {
- { N_("Debian Terminal Emulator"), "x-terminal-emulator", "-e", FALSE },
- { N_("GNOME Terminal"), "gnome-terminal", "-x", FALSE },
- { N_("Standard XTerminal"), "xterm", "-e", FALSE },
- { N_("NXterm"), "nxterm", "-e", FALSE },
- { N_("RXVT"), "rxvt", "-e", FALSE },
- { N_("aterm"), "aterm", "-e", FALSE },
- { N_("ETerm"), "Eterm", "-e", FALSE }
-};
diff --git a/capplets/default-applications/gnome-default-applications-properties.c b/capplets/default-applications/gnome-default-applications-properties.c
deleted file mode 100644
index 0374e28b0..000000000
--- a/capplets/default-applications/gnome-default-applications-properties.c
+++ /dev/null
@@ -1,794 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mouse-properties-capplet.c
- * Copyright (C) 2001 Red Hat, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by: Jonathon Blandford <jrb@redhat.com>,
- * Bradford Hovinen <hovinen@ximian.com>,
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <math.h>
-
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs-application-registry.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-
-// Set http, https, about, and unknown keys to the chosen web browser.
-#define DEFAULT_APPS_KEY_HTTP_PATH "/desktop/gnome/url-handlers/http"
-#define DEFAULT_APPS_KEY_HTTP_NEEDS_TERM DEFAULT_APPS_KEY_HTTP_PATH"/needs_terminal"
-#define DEFAULT_APPS_KEY_HTTP_EXEC DEFAULT_APPS_KEY_HTTP_PATH"/command"
-
-#define DEFAULT_APPS_KEY_HTTPS_PATH "/desktop/gnome/url-handlers/https"
-#define DEFAULT_APPS_KEY_HTTPS_NEEDS_TERM DEFAULT_APPS_KEY_HTTPS_PATH"/needs_terminal"
-#define DEFAULT_APPS_KEY_HTTPS_EXEC DEFAULT_APPS_KEY_HTTPS_PATH"/command"
-
-// While gnome-vfs2 does not use the "unknown" key, several widespread apps like htmlview
-// have read it for the past few years. Setting it should not hurt.
-#define DEFAULT_APPS_KEY_UNKNOWN_PATH "/desktop/gnome/url-handlers/unknown"
-#define DEFAULT_APPS_KEY_UNKNOWN_NEEDS_TERM DEFAULT_APPS_KEY_UNKNOWN_PATH"/needs_terminal"
-#define DEFAULT_APPS_KEY_UNKNOWN_EXEC DEFAULT_APPS_KEY_UNKNOWN_PATH"/command"
-
-// about:blank and other about: URI's are commonly used by browsers too
-#define DEFAULT_APPS_KEY_ABOUT_PATH "/desktop/gnome/url-handlers/about"
-#define DEFAULT_APPS_KEY_ABOUT_NEEDS_TERM DEFAULT_APPS_KEY_ABOUT_PATH"/needs_terminal"
-#define DEFAULT_APPS_KEY_ABOUT_EXEC DEFAULT_APPS_KEY_ABOUT_PATH"/command"
-
-#define DEFAULT_APPS_KEY_MAILER_PATH "/desktop/gnome/url-handlers/mailto"
-#define DEFAULT_APPS_KEY_MAILER_NEEDS_TERM DEFAULT_APPS_KEY_MAILER_PATH"/needs_terminal"
-#define DEFAULT_APPS_KEY_MAILER_EXEC DEFAULT_APPS_KEY_MAILER_PATH"/command"
-
-#define DEFAULT_APPS_KEY_TERMINAL_PATH "/desktop/gnome/applications/terminal"
-#define DEFAULT_APPS_KEY_TERMINAL_EXEC_ARG DEFAULT_APPS_KEY_TERMINAL_PATH"/exec_arg"
-#define DEFAULT_APPS_KEY_TERMINAL_EXEC DEFAULT_APPS_KEY_TERMINAL_PATH"/exec"
-
-#define MIME_APPLICATION_ID "gnome-default-applications-editor"
-
-typedef struct _BrowserDescription BrowserDescription;
-typedef struct _MailerDescription MailerDescription;
-typedef struct _TerminalDesciption TerminalDescription;
-
-/* All defined below */
-#include "gnome-default-applications-properties-structs.c"
-
-static GList *text_editors = NULL;
-
-static GConfClient *client = NULL;
-
-static void
-on_text_custom_properties_clicked (GtkWidget *w, GladeXML *dialog)
-{
- GtkWidget *d;
- int res;
- GnomeVFSMimeApplication *mime_app;
- const char *command, *name;
-
- d = WID ("custom_editor_dialog");
- gtk_window_set_transient_for (GTK_WINDOW (d), GTK_WINDOW (WID ("default_applications_dialog")));
-
- mime_app = gnome_vfs_application_registry_get_mime_application (MIME_APPLICATION_ID);
-
- gtk_entry_set_text (GTK_ENTRY (WID ("text_custom_name_entry")),
- mime_app ? _(mime_app->name) : "");
- gtk_entry_set_text (GTK_ENTRY (WID ("text_custom_command_entry")),
- mime_app ? mime_app->command : "");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_multi_toggle")),
- mime_app ? mime_app->can_open_multiple_files : FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_terminal_toggle")),
- mime_app ? mime_app->requires_terminal : FALSE);
-
- run_properties_dialog:
- res = gtk_dialog_run (GTK_DIALOG (d));
-
- if (res != GTK_RESPONSE_OK) {
- gtk_widget_hide (d);
- gnome_vfs_mime_application_free (mime_app);
- return;
- }
-
- name = gtk_entry_get_text (GTK_ENTRY (WID ("text_custom_name_entry")));
- command = gtk_entry_get_text (GTK_ENTRY (WID ("text_custom_command_entry")));
-
- if (!*name || !*command) {
- GtkWidget *d2;
- d2 = gtk_message_dialog_new (GTK_WINDOW (d),
- 0,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Please specify a name and a command for this editor."));
- gtk_dialog_run (GTK_DIALOG (d2));
- gtk_widget_destroy (d2);
- goto run_properties_dialog;
- }
-
- gtk_widget_hide (d);
-
- if (mime_app) {
- g_free (mime_app->name);
- g_free (mime_app->command);
- } else {
- mime_app = g_new0 (GnomeVFSMimeApplication, 1);
- mime_app->id = g_strdup (MIME_APPLICATION_ID);
- }
-
- mime_app->name = g_strdup (name);
- mime_app->command = g_strdup (command);
-
- mime_app->can_open_multiple_files = GTK_TOGGLE_BUTTON (WID ("text_custom_multi_toggle"))->active;
- mime_app->requires_terminal = GTK_TOGGLE_BUTTON (WID ("text_custom_terminal_toggle"))->active;
- mime_app->expects_uris = GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS;
-
-#if 0
- GTK_TOGGLE_BUTTON (WID ("text_custom_uri_toggle"))->active
- ? GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_URIS_FOR_NON_FILES
- : GNOME_VFS_MIME_APPLICATION_ARGUMENT_TYPE_PATHS;
-#endif
-
- gnome_vfs_application_registry_save_mime_application (mime_app);
-
- gnome_vfs_mime_set_default_application ("text/plain", mime_app->id);
- gnome_vfs_mime_application_free (mime_app);
-
- gnome_vfs_application_registry_sync ();
-}
-
-static void
-on_text_default_viewer_toggle (GtkWidget *toggle, GladeXML *dialog)
-{
- GnomeVFSMimeActionType old_action_type, new_action_type;
-
- old_action_type = gnome_vfs_mime_get_default_action_type ("text/plain");
- new_action_type = GTK_TOGGLE_BUTTON (toggle)->active
- ? GNOME_VFS_MIME_ACTION_TYPE_APPLICATION
- : GNOME_VFS_MIME_ACTION_TYPE_COMPONENT;
-
- if (new_action_type == old_action_type)
- return;
-
- gnome_vfs_mime_set_default_action_type ("text/plain", new_action_type);
- gnome_vfs_application_registry_sync ();
-}
-
-static void
-generic_guard (GtkWidget *toggle, GtkWidget *widget)
-{
-
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (toggle), FALSE);
- gtk_widget_set_sensitive (widget, GTK_TOGGLE_BUTTON (toggle)->active);
-
- if (GTK_TOGGLE_BUTTON (toggle)->active) {
- GtkWidget *e;
- /* Get entry associated with us */
- e = g_object_get_data (G_OBJECT (toggle), "entry");
- if (e && GTK_WIDGET_REALIZED (e)) gtk_widget_grab_focus (e);
- if (e && GTK_IS_ENTRY (e)) {
- gchar *text;
- text = g_strdup (gtk_entry_get_text (GTK_ENTRY (e)));
- /* fixme: This is not nice, but it is the only way to force combo to emit 'changed' */
- gtk_entry_set_text (GTK_ENTRY (e), "");
- gtk_entry_set_text (GTK_ENTRY (e), text);
- g_free (text);
- }
- }
-}
-
-static gboolean
-validate (GHashTable *unique, char const *name, char const *exec_name)
-{
- if (NULL == g_hash_table_lookup (unique, name)) {
- char *path = g_find_program_in_path (exec_name);
- if (path != NULL) {
- g_hash_table_insert (unique, (gpointer)name, (gpointer)exec_name);
- g_free (path);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static void
-initialize_default_applications (void)
-{
- gint i;
- GHashTable *unique;
-
- text_editors = gnome_vfs_mime_get_all_applications ("text/plain");
-
- unique = g_hash_table_new (g_str_hash, g_str_equal);
- for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ )
- possible_browsers[i].in_path = validate (unique,
- possible_browsers[i].name, possible_browsers[i].executable_name);
- g_hash_table_destroy (unique);
-
- unique = g_hash_table_new (g_str_hash, g_str_equal);
- for (i = 0; i < G_N_ELEMENTS (possible_mailers); i++ )
- possible_mailers[i].in_path = validate (unique,
- possible_mailers[i].name, possible_mailers[i].executable_name);
- g_hash_table_destroy (unique);
-
- unique = g_hash_table_new (g_str_hash, g_str_equal);
- for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ )
- possible_terminals[i].in_path = validate (unique,
- possible_terminals[i].name, possible_terminals[i].exec);
- g_hash_table_destroy (unique);
-}
-
-static void
-update_editor_sensitivity (GladeXML *dialog)
-{
- gboolean predefined = GTK_TOGGLE_BUTTON (WID ("text_select_radio"))->active;
-
- gtk_widget_set_sensitive (WID ("text_select_combo"), predefined);
- gtk_widget_set_sensitive (WID ("text_custom_hbox"), !predefined);
-}
-
-static void
-read_editor (GConfClient *client,
- GladeXML *dialog)
-{
- GnomeVFSMimeApplication *mime_app;
- GList *li;
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_default_viewer_toggle")),
- gnome_vfs_mime_get_default_action_type ("text/plain") == GNOME_VFS_MIME_ACTION_TYPE_APPLICATION);
-
- mime_app = gnome_vfs_mime_get_default_application ("text/plain");
-
- if (mime_app == NULL || !strcmp (mime_app->id, MIME_APPLICATION_ID))
- goto read_editor_custom;
-
- for (li = text_editors; li; li = li->next) {
- GnomeVFSMimeApplication *li_app = li->data;
-
- if (strcmp (mime_app->command, li_app->command) == 0 &&
- mime_app->requires_terminal == li_app->requires_terminal) {
- gtk_entry_set_text (GTK_ENTRY (WID ("text_select_combo_entry")), _(mime_app->name));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_select_radio")), TRUE);
- gnome_vfs_mime_application_free (mime_app);
- return;
- }
- }
-
- /*
- * the default editor wasn't set by us, and it wasn't in the
- * list.
- */
-
- g_free (mime_app->id);
- mime_app->id = g_strdup (MIME_APPLICATION_ID);
-
- gnome_vfs_application_registry_save_mime_application (mime_app);
-
- gnome_vfs_mime_set_default_application ("text/plain", mime_app->id);
- gnome_vfs_application_registry_sync ();
-
- read_editor_custom:
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_select_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_custom_radio")), TRUE);
- if (mime_app)
- gnome_vfs_mime_application_free (mime_app);
-}
-
-static void
-text_apply_editor (GtkWidget *entry,
- GladeXML *dialog)
-{
- GList *li;
- GnomeVFSMimeApplication *mime_app;
- const gchar *editor;
-
- if (!GTK_TOGGLE_BUTTON (WID ("text_select_radio"))->active)
- return;
-
- update_editor_sensitivity (dialog);
-
- editor = gtk_entry_get_text (GTK_ENTRY (WID ("text_select_combo_entry")));
-
- /* don't do anything if it was cleared. */
- if (!*editor)
- return;
-
- for (li = text_editors; li; li = li->next) {
- mime_app = li->data;
- if (! strcmp (mime_app->name, editor)) {
- gnome_vfs_mime_set_default_application ("text/plain", mime_app->id);
- gnome_vfs_application_registry_sync ();
- return;
- }
- }
-
- g_assert_not_reached ();
-}
-
-static void
-text_apply_custom (GtkWidget *entry,
- GladeXML *dialog)
-{
- GnomeVFSMimeApplication *mime_app;
-
- if (!GTK_TOGGLE_BUTTON (WID ("text_custom_radio"))->active)
- return;
-
- mime_app = gnome_vfs_application_registry_get_mime_application (MIME_APPLICATION_ID);
- if (!mime_app) {
- on_text_custom_properties_clicked (entry, dialog);
- mime_app = gnome_vfs_application_registry_get_mime_application (MIME_APPLICATION_ID);
- if (!mime_app) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("text_select_radio")), TRUE);
- return;
- }
- } else {
- gnome_vfs_mime_set_default_application ("text/plain", mime_app->id);
- gnome_vfs_mime_application_free (mime_app);
-
- gnome_vfs_application_registry_sync ();
- }
-
- update_editor_sensitivity (dialog);
-}
-
-static void
-setup_peditors (GConfClient *client,
- GladeXML *dialog)
-{
- GConfChangeSet *changeset = NULL;
-
- gconf_peditor_new_boolean (changeset, DEFAULT_APPS_KEY_HTTP_NEEDS_TERM,
- WID ("web_custom_terminal_toggle"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_HTTP_EXEC,
- WID ("web_custom_command_entry"), NULL);
-
- gconf_peditor_new_boolean (changeset, DEFAULT_APPS_KEY_HTTPS_NEEDS_TERM,
- WID ("web_custom_terminal_toggle"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_HTTPS_EXEC,
- WID ("web_custom_command_entry"), NULL);
-
- gconf_peditor_new_boolean (changeset, DEFAULT_APPS_KEY_UNKNOWN_NEEDS_TERM,
- WID ("web_custom_terminal_toggle"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_UNKNOWN_EXEC,
- WID ("web_custom_command_entry"), NULL);
-
- gconf_peditor_new_boolean (changeset, DEFAULT_APPS_KEY_ABOUT_NEEDS_TERM,
- WID ("web_custom_terminal_toggle"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_ABOUT_EXEC,
- WID ("web_custom_command_entry"), NULL);
-
- gconf_peditor_new_boolean (changeset, DEFAULT_APPS_KEY_MAILER_NEEDS_TERM,
- WID ("mail_custom_terminal_toggle"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_MAILER_EXEC,
- WID ("mail_custom_command_entry"), NULL);
-
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_TERMINAL_EXEC,
- WID ("terminal_custom_command_entry"), NULL);
- gconf_peditor_new_string (changeset, DEFAULT_APPS_KEY_TERMINAL_EXEC_ARG,
- WID ("terminal_custom_exec_entry"), NULL);
-}
-
-static void
-read_browser (GConfClient *client,
- GladeXML *dialog)
-{
- GError *error = NULL;
- gchar *browser;
- gboolean needs_term;
- gint i;
-
- needs_term = gconf_client_get_bool (client, DEFAULT_APPS_KEY_HTTP_NEEDS_TERM, &error);
- if (error) {
- /* hp will shoot me -- I'll do this later. */
- return;
- }
- browser = gconf_client_get_string (client, DEFAULT_APPS_KEY_HTTP_EXEC, &error);
- if (error) {
- return;
- }
-
- for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ ) {
- if (possible_browsers[i].in_path == FALSE)
- continue;
-
- if (browser && strcmp (browser, possible_browsers[i].command) == 0 &&
- needs_term == possible_browsers[i].needs_term) {
- gtk_entry_set_text (GTK_ENTRY (WID ("web_select_combo_entry")),
- _(possible_browsers[i].name));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("web_custom_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("web_select_radio")), TRUE);
- g_free (browser);
- return;
- }
- }
- if (browser && strlen(browser) != 0) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("web_select_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("web_custom_radio")), TRUE);
- } else {
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (WID ("web_select_radio")), TRUE);
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (WID ("web_custom_radio")), TRUE);
- }
-
- g_free (browser);
-}
-
-static void
-read_mailer (GConfClient *client,
- GladeXML *dialog)
-{
- GError *error = NULL;
- gchar *mailer;
- gboolean needs_term;
- gint i;
-
- needs_term = gconf_client_get_bool (client, DEFAULT_APPS_KEY_MAILER_NEEDS_TERM, &error);
- if (error) {
- /* hp will shoot me -- I'll do this later. */
- return;
- }
- mailer = gconf_client_get_string (client, DEFAULT_APPS_KEY_MAILER_EXEC, &error);
- if (error) {
- return;
- }
-
- for (i = 0; i < G_N_ELEMENTS (possible_mailers); i++ ) {
- if (possible_mailers[i].in_path == FALSE)
- continue;
-
- if (mailer && strcmp (mailer, possible_mailers[i].command) == 0 &&
- needs_term == possible_mailers[i].needs_term) {
- gtk_entry_set_text (GTK_ENTRY (WID ("mail_select_combo_entry")),
- _(possible_mailers[i].name));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("mail_custom_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("mail_select_radio")), TRUE);
- g_free (mailer);
- return;
- }
- }
-
- if (mailer && strlen(mailer) != 0) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("mail_select_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("mail_custom_radio")), TRUE);
- } else {
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (WID ("mail_select_radio")), TRUE);
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (WID ("mail_custom_radio")), TRUE);
- }
- g_free (mailer);
-
-
-}
-
-static void
-browser_setup_custom (GtkWidget *entry,
- GladeXML *dialog)
-{
- gint i;
- const gchar *browser = gtk_entry_get_text (GTK_ENTRY (entry));
-
- for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ ) {
- if (! strcmp (_(possible_browsers[i].name), browser) && possible_browsers[i].in_path) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("web_custom_terminal_toggle")),
- possible_browsers[i].needs_term);
- gtk_entry_set_text (GTK_ENTRY (WID ("web_custom_command_entry")),
- possible_browsers[i].command);
- return;
- }
- }
-}
-
-static void
-mailer_setup_custom (GtkWidget *entry,
- GladeXML *dialog)
-{
- gint i;
- const gchar *mailer = gtk_entry_get_text (GTK_ENTRY (entry));
-
- for (i = 0; i < G_N_ELEMENTS (possible_mailers); i++ ) {
- if (! strcmp (_(possible_mailers[i].name), mailer) && possible_mailers[i].in_path) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("mail_custom_terminal_toggle")),
- possible_mailers[i].needs_term);
- gtk_entry_set_text (GTK_ENTRY (WID ("mail_custom_command_entry")),
- possible_mailers[i].command);
- return;
- }
- }
-}
-
-
-static void
-read_terminal (GConfClient *client,
- GladeXML *dialog)
-{
- GError *error = NULL;
- gchar *exec;
- gchar *exec_arg;
- gint i;
-
- exec = gconf_client_get_string (client, DEFAULT_APPS_KEY_TERMINAL_EXEC, &error);
- if (error) {
- return;
- }
- exec_arg = gconf_client_get_string (client, DEFAULT_APPS_KEY_TERMINAL_EXEC_ARG, &error);
- if (error) {
- exec_arg = NULL;
- }
-
- gtk_entry_set_text (GTK_ENTRY (WID ("terminal_custom_command_entry")), exec?exec:"");
- gtk_entry_set_text (GTK_ENTRY (WID ("terminal_custom_exec_entry")), exec_arg?exec_arg:"");
-
- for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ ) {
- if (possible_terminals[i].in_path == FALSE)
- continue;
-
- if (strcmp (exec?exec:"", possible_terminals[i].exec) == 0 &&
- strcmp (exec_arg?exec_arg:"", possible_terminals[i].exec_arg) == 0) {
- gtk_entry_set_text (GTK_ENTRY (WID ("terminal_select_combo_entry")),
- _(possible_terminals[i].name));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_custom_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_select_radio")), TRUE);
- g_free (exec);
- g_free (exec_arg);
- return;
- }
- }
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_select_radio")), TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("terminal_custom_radio")), TRUE);
- g_free (exec);
- g_free (exec_arg);
-}
-
-static void
-terminal_setup_custom (GtkWidget *entry,
- GladeXML *dialog)
-{
- gint i;
- const gchar *terminal = gtk_entry_get_text (GTK_ENTRY (entry));
-
- for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ ) {
- if (! strcmp (_(possible_terminals[i].name), terminal) && possible_terminals[i].in_path) {
- gtk_entry_set_text (GTK_ENTRY (WID ("terminal_custom_command_entry")), possible_terminals[i].exec);
- gtk_entry_set_text (GTK_ENTRY (WID ("terminal_custom_exec_entry")), possible_terminals[i].exec_arg);
- return;
- }
- }
-}
-
-static void
-value_changed_cb (GConfClient *client,
- const gchar *key,
- GConfValue *value,
- GladeXML *dialog)
-{
- g_return_if_fail (key != NULL);
- if (strncmp (key, DEFAULT_APPS_KEY_MAILER_PATH, strlen (DEFAULT_APPS_KEY_MAILER_PATH)) == 0) {
- gconf_client_set_bool (client, DEFAULT_APPS_KEY_MAILER_PATH"/enabled", TRUE, NULL);
- } else if (strncmp (key, DEFAULT_APPS_KEY_HTTP_PATH, strlen (DEFAULT_APPS_KEY_HTTP_PATH)) == 0) {
- } else if (strncmp (key, DEFAULT_APPS_KEY_TERMINAL_PATH, strlen (DEFAULT_APPS_KEY_TERMINAL_PATH)) == 0) {
- }
-}
-
-static void
-dialog_response (GtkDialog *widget,
- gint response_id,
- GladeXML *dialog)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (widget), "user-guide.xml", "goscustdoc-2");
- else
- gtk_main_quit ();
-}
-
-static GladeXML *
-create_dialog (GConfClient *client)
-{
- GladeXML *dialog;
- GList *strings = NULL, *li;
- gint i;
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-default-applications-properties.glade", NULL, NULL);
- capplet_set_icon (WID ("default_applications_dialog"), "gnome-settings-default-applications");
-
- setup_peditors (client, dialog);
-
- /* Editors page */
- for (li = text_editors; li; li = li->next) {
- strings = g_list_append (strings, _(((GnomeVFSMimeApplication *)li->data)->name));
- }
- if (strings) {
- /* We have default editors */
- gtk_combo_set_popdown_strings (GTK_COMBO(WID ("text_select_combo")), strings);
- g_list_free (strings);
- strings = NULL;
- } else {
- /* No default editors */
- gtk_widget_set_sensitive (WID ("text_select_radio"), FALSE);
- }
-
- read_editor (client, dialog);
- update_editor_sensitivity (dialog);
-
- g_signal_connect (G_OBJECT (WID ("text_select_combo_entry")),
- "changed", G_CALLBACK (text_apply_editor),
- dialog);
- g_signal_connect (WID ("text_custom_properties"), "clicked",
- G_CALLBACK (on_text_custom_properties_clicked),
- dialog);
- g_signal_connect (WID ("text_default_viewer_toggle"), "toggled",
- G_CALLBACK (on_text_default_viewer_toggle),
- dialog);
- g_signal_connect_after (G_OBJECT (WID ("text_select_radio")), "toggled",
- G_CALLBACK (text_apply_editor), dialog);
- g_signal_connect_after (G_OBJECT (WID ("text_custom_radio")), "toggled",
- G_CALLBACK (text_apply_custom), dialog);
-
- /* Web browsers page */
- for (i = 0; i < G_N_ELEMENTS (possible_browsers); i++ ) {
- if (possible_browsers[i].in_path)
- strings = g_list_append (strings, _(possible_browsers[i].name));
- }
- if (strings) {
- /* We have default browsers */
- gtk_combo_set_popdown_strings (GTK_COMBO(WID ("web_select_combo")), strings);
- g_list_free (strings);
- strings = NULL;
- } else {
- /* No default browsers */
- gtk_widget_set_sensitive (WID ("web_select_radio"), FALSE);
- }
-
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("web_select_radio")), "entry", WID ("web_select_combo_entry"));
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("web_custom_radio")), "entry", WID ("web_custom_command_entry"));
-
- g_signal_connect (G_OBJECT (WID ("web_select_combo_entry")),
- "changed", (GCallback) browser_setup_custom,
- dialog);
- g_signal_connect (G_OBJECT (WID ("web_select_radio")),
- "clicked", (GCallback) generic_guard,
- WID ("web_select_combo"));
- g_signal_connect (G_OBJECT (WID ("web_custom_radio")),
- "clicked", (GCallback) generic_guard,
- WID ("web_custom_vbox"));
-
- read_browser (client, dialog);
-
-
- /* Mail readers page */
- for (i = 0; i < G_N_ELEMENTS (possible_mailers); i++ ) {
- if (possible_mailers[i].in_path)
- strings = g_list_append (strings, _(possible_mailers[i].name));
- }
- if (strings) {
- /* We have default browsers */
- gtk_combo_set_popdown_strings (GTK_COMBO(WID ("mail_select_combo")), strings);
- g_list_free (strings);
- strings = NULL;
- } else {
- /* No default browsers */
- gtk_widget_set_sensitive (WID ("mail_select_radio"), FALSE);
- }
-
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("mail_select_radio")), "entry", WID ("mail_select_combo_entry"));
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("mail_custom_radio")), "entry", WID ("mail_custom_command_entry"));
-
- g_signal_connect (G_OBJECT (WID ("mail_select_combo_entry")),
- "changed", (GCallback) mailer_setup_custom,
- dialog);
- g_signal_connect (G_OBJECT (WID ("mail_select_radio")),
- "clicked", (GCallback) generic_guard,
- WID ("mail_select_combo"));
- g_signal_connect (G_OBJECT (WID ("mail_custom_radio")),
- "clicked", (GCallback) generic_guard,
- WID ("mail_custom_vbox"));
-
- read_mailer (client, dialog);
-
-
- /* Terminal */
-
- for (i = 0; i < G_N_ELEMENTS (possible_terminals); i++ ) {
- if (possible_terminals[i].in_path)
- strings = g_list_append (strings, _(possible_terminals[i].name));
- }
- if (strings) {
- /* We have default terminals */
- gtk_combo_set_popdown_strings (GTK_COMBO (WID ("terminal_select_combo")), strings);
- g_list_free (strings);
- strings = NULL;
- } else {
- /* No default terminals */
- gtk_widget_set_sensitive (WID ("terminal_select_radio"), FALSE);
- }
-
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("terminal_select_radio")), "entry", WID ("terminal_select_combo_entry"));
- /* Source of command string */
- g_object_set_data (G_OBJECT (WID ("terminal_custom_radio")), "entry", WID ("terminal_custom_command_entry"));
-
- g_signal_connect (G_OBJECT (WID ("terminal_select_combo_entry")),
- "changed", (GCallback) terminal_setup_custom,
- dialog);
- g_signal_connect (G_OBJECT (WID ("terminal_select_radio")),
- "toggled", (GCallback) generic_guard,
- WID ("terminal_select_combo"));
- g_signal_connect (G_OBJECT (WID ("terminal_custom_radio")),
- "toggled", (GCallback) generic_guard,
- WID ("terminal_custom_table"));
- read_terminal (client, dialog);
-
-
- g_signal_connect (G_OBJECT (client), "value-changed", (GCallback) value_changed_cb, dialog);
- g_signal_connect (G_OBJECT (WID ("default_applications_dialog")), "response", (GCallback) dialog_response, dialog);
-
- gtk_widget_show (WID ("default_applications_dialog"));
-
- return dialog;
-}
-
-static void
-get_legacy_settings (void)
-{
-}
-
-int
-main (int argc, char **argv)
-{
- GladeXML *dialog;
-
- static gboolean get_legacy;
- static struct poptOption cap_options[] = {
- { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0,
- N_("Retrieve and store legacy settings"), NULL },
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-default-applications-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_POPT_TABLE, cap_options,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- client = gconf_client_get_default ();
-
- gconf_client_add_dir (client, "/desktop/gnome/applications/browser", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/desktop/gnome/applications/terminal", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- if (get_legacy) {
- get_legacy_settings ();
- } else {
- initialize_default_applications ();
- dialog = create_dialog (client);
- gtk_main ();
- }
- g_object_unref (client);
-
- return 0;
-}
diff --git a/capplets/default-applications/gnome-default-applications-properties.glade b/capplets/default-applications/gnome-default-applications-properties.glade
deleted file mode 100644
index 097121238..000000000
--- a/capplets/default-applications/gnome-default-applications-properties.glade
+++ /dev/null
@@ -1,1623 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="default_applications_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Preferred Applications</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button5">
- <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">2</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button10">
- <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>
- </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="GtkNotebook" id="notebook">
- <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="enable_popup">False</property>
-
- <child>
- <widget class="GtkFrame" id="frame3">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">16</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkRadioButton" id="web_select_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Select:</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>
- <accessibility>
- <atkrelation target="web_select_combo" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="web_select_combo">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
- <accessibility>
- <atkrelation target="web_select_radio" type="labelled-by"/>
- </accessibility>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="web_select_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget4">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget5">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget6">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="web_custom_vbox">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Co_mmand:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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="mnemonic_widget">web_custom_command_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="web_custom_command_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkCheckButton" id="web_custom_terminal_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Run in a t_erminal</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="web_custom_remote_toggle">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Understands _Netscape Remote Control</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="web_custom_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ustom:</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>
- <property name="group">web_select_radio</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Web Browser</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">label_item</property>
- </packing>
- </child>
- </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">Web Browser</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkFrame" id="frame6">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkTable" id="table6">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">16</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkRadioButton" id="mail_select_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Select:</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>
- <accessibility>
- <atkrelation target="mail_select_combo" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="mail_select_combo">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
- <accessibility>
- <atkrelation target="mail_select_radio" type="labelled-by"/>
- </accessibility>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="mail_select_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="list1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="listitem1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="mail_custom_vbox">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Co_mmand:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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="mnemonic_widget">mail_custom_command_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="mail_custom_command_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkCheckButton" id="mail_custom_terminal_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Run in a t_erminal</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="mail_custom_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ustom:</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>
- <property name="group">mail_select_radio</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Mail Reader</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mail Reader</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>
-
- <child>
- <widget class="GtkFrame" id="frame1">
- <property name="border_width">12</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">16</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkRadioButton" id="text_select_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Select:</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>
- <accessibility>
- <atkrelation target="text_select_combo" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="text_select_combo">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
- <accessibility>
- <atkrelation target="text_select_radio" type="labelled-by"/>
- </accessibility>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="text_select_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget1">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget2">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="text_custom_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ustom</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>
- <property name="group">text_select_radio</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="text_custom_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkButton" id="text_custom_properties">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Properties...</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="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="text_default_viewer_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Use this _editor to open text files in the file manager</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>
- </widget>
- <packing>
- <property name="left_attach">0</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>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Text Editor</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">label_item</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">Text Editor</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkFrame" id="frame5">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkTable" id="table4">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">16</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkRadioButton" id="terminal_select_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Select:</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>
- <accessibility>
- <atkrelation target="terminal_select_combo" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCombo" id="terminal_select_combo">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="value_in_list">False</property>
- <property name="allow_empty">True</property>
- <property name="case_sensitive">False</property>
- <property name="enable_arrow_keys">True</property>
- <property name="enable_arrows_always">False</property>
- <accessibility>
- <atkrelation target="terminal_select_radio" type="labelled-by"/>
- </accessibility>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="terminal_select_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
-
- <child internal-child="list">
- <widget class="GtkList" id="convertwidget10">
- <property name="visible">True</property>
- <property name="selection_mode">GTK_SELECTION_BROWSE</property>
-
- <child>
- <widget class="GtkListItem" id="convertwidget11">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkLabel" id="convertwidget12">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="terminal_custom_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_ustom:</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>
- <property name="group">terminal_select_radio</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="terminal_custom_table">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">4</property>
- <property name="column_spacing">4</property>
-
- <child>
- <widget class="GtkEntry" id="terminal_custom_command_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- <accessibility>
- <atkrelation target="label13" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="terminal_custom_exec_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- <accessibility>
- <atkrelation target="label14" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Co_mmand:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">terminal_custom_command_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">E_xec Flag:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">terminal_custom_exec_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Terminal</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Terminal</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkFrame" id="wm_frame">
- <property name="border_width">12</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <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_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="treeview1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</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="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkButton" id="wm_add_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Add...</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>
-
- <child>
- <widget class="GtkButton" id="wm_edit_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Edit...</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>
-
- <child>
- <widget class="GtkButton" id="wm_delete_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Delete</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">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="GtkHSeparator" id="hseparator1">
- <property name="visible">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Select the window manager you want. You will need to hit apply, wave the magic wand, and do a magic dance for it to work.</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">True</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Default Window Manager</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Window Manager</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="custom_editor_dialog">
- <property name="title" translatable="yes">Custom Editor 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-vbox2">
- <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_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button8">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button9">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</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="GtkTable" id="table5">
- <property name="border_width">16</property>
- <property name="visible">True</property>
- <property name="n_rows">5</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Name:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">text_custom_name_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Command:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">text_custom_command_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="text_custom_terminal_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Run in a _terminal</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>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="text_custom_uri_toggle">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Can open _URIs</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>
- </widget>
- <packing>
- <property name="left_attach">1</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>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="text_custom_multi_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Can open multiple _files</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>
- </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>
-
- <child>
- <widget class="GtkEntry" id="text_custom_command_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- <accessibility>
- <atkrelation target="label5" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="text_custom_name_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- <accessibility>
- <atkrelation target="label16" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </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>
diff --git a/capplets/display/.cvsignore b/capplets/display/.cvsignore
deleted file mode 100644
index 4cf7c30d2..000000000
--- a/capplets/display/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-gnome-display-properties
-display-properties.desktop
-display-properties.desktop.in
diff --git a/capplets/display/ChangeLog b/capplets/display/ChangeLog
deleted file mode 100644
index b90511ed7..000000000
--- a/capplets/display/ChangeLog
+++ /dev/null
@@ -1,70 +0,0 @@
-2005-02-08 Sebastien Bacher <seb128@debian.org>
-
- * main.c: (wrap_in_label):
- patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
- (Closes: #166267).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * display-properties.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-06-10 David Sedeño <david@alderia.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=136483
- * main.c (run_revert_dialog, cb_dialog_response) : Hide
- the configuration dialog and center the confirmation one.
-
-2004-06-09 David Sedeño <david@alderia.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=137579
- * main.c (main) : Put title to the confirmation dialog box
-
-2004-05-11 Jody Goldberg <jody@gnome.org>
-
- From ruben@lambda1.be
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=140047
- * main.c (main) : s/XServer/X Server/
- and a patch to use g_signal_connect
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- For Alex Larsson :
- https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=119494
- * main.c : fix reverting size change
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-03-02 Fernando Herrera <fherrera@onirica.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=125315
- * main.c: (cb_dialog_response): Point help to the right section
-
-2004-03-02 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=135908
- * main.c (apply_config) : restart the screensaver
-
diff --git a/capplets/display/Makefile.am b/capplets/display/Makefile.am
deleted file mode 100644
index 886ca1b39..000000000
--- a/capplets/display/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-bin_PROGRAMS = gnome-display-properties
-
-gnome_display_properties_LDADD = $(DISPLAY_CAPPLET_LIBS) $(top_builddir)/capplets/common/libcommon.la
-gnome_display_properties_SOURCES = \
- main.c
-gnome_display_properties_LDFLAGS = -export-dynamic
-
-@INTLTOOL_DESKTOP_RULE@
-
-iconsdir = $(GNOMECC_ICONS_DIR)
-icons_DATA = display-capplet.png
-
-desktop_iconsdir = $(datadir)/pixmaps
-desktop_icons_DATA = display-capplet.png
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = display-properties.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(DISPLAY_CAPPLET_CFLAGS) \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DPIXMAPDIR=\""$(pixmapdir)"\"
-
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(icons_DATA)
diff --git a/capplets/display/display-capplet.png b/capplets/display/display-capplet.png
deleted file mode 100644
index 529731766..000000000
--- a/capplets/display/display-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/display/display-properties.desktop.in.in b/capplets/display/display-properties.desktop.in.in
deleted file mode 100644
index 5ed3d39af..000000000
--- a/capplets/display/display-properties.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Screen Resolution
-_Comment=Change screen resolution
-Exec=gnome-display-properties
-Icon=display-capplet.png
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Settings;Appearance;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=display properties
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/display/main.c b/capplets/display/main.c
deleted file mode 100644
index 240cd0729..000000000
--- a/capplets/display/main.c
+++ /dev/null
@@ -1,828 +0,0 @@
-#include <config.h>
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <gdk/gdkx.h>
-
-#include <X11/extensions/Xrandr.h>
-
-#include "capplet-util.h"
-
-#define REVERT_COUNT 20
-
-struct ScreenInfo
-{
- int current_width;
- int current_height;
- SizeID current_size;
- short current_rate;
- Rotation current_rotation;
-
- SizeID old_size;
- short old_rate;
- Rotation old_rotation;
-
- XRRScreenConfiguration *config;
- XRRScreenSize *sizes;
- int n_sizes;
-
- GtkWidget *resolution_widget;
- GtkWidget *rate_widget;
-};
-
-struct DisplayInfo {
- int n_screens;
- struct ScreenInfo *screens;
-
- GtkWidget *per_computer_check;
- gboolean was_per_computer;
-};
-
-
-static void generate_rate_menu (struct ScreenInfo *screen_info);
-static void generate_resolution_menu(struct ScreenInfo* screen_info);
-
-struct DisplayInfo *
-read_display_info (GdkDisplay *display)
-{
- struct DisplayInfo *info;
- struct ScreenInfo *screen_info;
- GdkScreen *screen;
- GdkWindow *root_window;
- int i;
-
- info = g_new (struct DisplayInfo, 1);
- info->n_screens = gdk_display_get_n_screens (display);
- info->screens = g_new (struct ScreenInfo, info->n_screens);
-
- for (i = 0; i < info->n_screens; i++)
- {
- screen = gdk_display_get_screen (display, i);
-
- screen_info = &info->screens[i];
- screen_info->current_width = gdk_screen_get_width (screen);
- screen_info->current_height = gdk_screen_get_height (screen);
-
- root_window = gdk_screen_get_root_window (screen);
- screen_info->config = XRRGetScreenInfo (gdk_x11_display_get_xdisplay (display),
- gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)));
-
- screen_info->current_rate = XRRConfigCurrentRate (screen_info->config);
- screen_info->current_size = XRRConfigCurrentConfiguration (screen_info->config, &screen_info->current_rotation);
- screen_info->sizes = XRRConfigSizes (screen_info->config, &screen_info->n_sizes);
- }
-
- return info;
-}
-
-void
-update_display_info (struct DisplayInfo *info, GdkDisplay *display)
-{
- struct ScreenInfo *screen_info;
- GdkScreen *screen;
- GdkWindow *root_window;
- int i;
-
- g_assert (info->n_screens == gdk_display_get_n_screens (display));
-
- for (i = 0; i < info->n_screens; i++)
- {
- screen = gdk_display_get_screen (display, i);
-
- screen_info = &info->screens[i];
-
- screen_info->old_rate = screen_info->current_rate;
- screen_info->old_size = screen_info->current_size;
- screen_info->old_rotation = screen_info->current_rotation;
-
- screen_info->current_width = gdk_screen_get_width (screen);
- screen_info->current_height = gdk_screen_get_height (screen);
-
- root_window = gdk_screen_get_root_window (screen);
- XRRFreeScreenConfigInfo (screen_info->config);
- screen_info->config = XRRGetScreenInfo (gdk_x11_display_get_xdisplay (display),
- gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)));
-
- screen_info->current_rate = XRRConfigCurrentRate (screen_info->config);
- screen_info->current_size = XRRConfigCurrentConfiguration (screen_info->config, &screen_info->current_rotation);
- screen_info->sizes = XRRConfigSizes (screen_info->config, &screen_info->n_sizes);
- }
-}
-
-static int
-get_current_resolution (struct ScreenInfo *screen_info)
-{
- GtkWidget *menu;
- GList *children;
- GList *child;
- int i;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (screen_info->resolution_widget));
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (screen_info->resolution_widget));
- children = gtk_container_get_children (GTK_CONTAINER (menu));
- child = g_list_nth (children, i);
-
- if (child != NULL)
- return GPOINTER_TO_INT (g_object_get_data (child->data, "screen_nr"));
- else
- return 0;
-}
-
-static int
-get_current_rate (struct ScreenInfo *screen_info)
-{
- GtkWidget *menu;
- GList *children;
- GList *child;
- int i;
-
- i = gtk_option_menu_get_history (GTK_OPTION_MENU (screen_info->rate_widget));
- menu = gtk_option_menu_get_menu (GTK_OPTION_MENU (screen_info->rate_widget));
- children = gtk_container_get_children (GTK_CONTAINER (menu));
- child = g_list_nth (children, i);
-
- if (child != NULL)
- return GPOINTER_TO_INT (g_object_get_data (child->data, "rate"));
- else
- return 0;
-}
-
-static gboolean
-apply_config (struct DisplayInfo *info)
-{
- int i;
- GdkDisplay *display;
- Display *xdisplay;
- GdkScreen *screen;
- gboolean changed;
-
- display = gdk_display_get_default ();
- xdisplay = gdk_x11_display_get_xdisplay (display);
-
- changed = FALSE;
- for (i = 0; i < info->n_screens; i++)
- {
- struct ScreenInfo *screen_info = &info->screens[i];
- Status status;
- GdkWindow *root_window;
- int new_res, new_rate;
-
- screen = gdk_display_get_screen (display, i);
- root_window = gdk_screen_get_root_window (screen);
-
- new_res = get_current_resolution (screen_info);
- new_rate = get_current_rate (screen_info);
-
- if (new_res != screen_info->current_size ||
- new_rate != screen_info->current_rate)
- {
- changed = TRUE;
- status = XRRSetScreenConfigAndRate (xdisplay,
- screen_info->config,
- gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)),
- new_res,
- screen_info->current_rotation,
- new_rate,
- GDK_CURRENT_TIME);
- }
- }
-
- update_display_info (info, display);
-
- /* xscreensaver should handle this itself, but does not currently so we hack
- * it. Ignore failures in case xscreensaver is not installed */
- if (changed)
- g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
-
- return changed;
-}
-
-static int
-revert_config (struct DisplayInfo *info)
-{
- int i;
- GdkDisplay *display;
- Display *xdisplay;
- GdkScreen *screen;
-
- display = gdk_display_get_default ();
- xdisplay = gdk_x11_display_get_xdisplay (display);
-
- for (i = 0; i < info->n_screens; i++)
- {
- struct ScreenInfo *screen_info = &info->screens[i];
- Status status;
- GdkWindow *root_window;
-
- screen = gdk_display_get_screen (display, i);
- root_window = gdk_screen_get_root_window (screen);
-
- status = XRRSetScreenConfigAndRate (xdisplay,
- screen_info->config,
- gdk_x11_drawable_get_xid (GDK_DRAWABLE (root_window)),
- screen_info->old_size,
- screen_info->old_rotation,
- screen_info->old_rate,
- GDK_CURRENT_TIME);
-
- }
-
- update_display_info (info, display);
-
- /* Need to update the menus to the new settings */
- for (i = 0; i < info->n_screens; i++)
- {
- struct ScreenInfo *screen_info = &info->screens[i];
-
- generate_resolution_menu (screen_info);
- generate_rate_menu (screen_info);
- }
-
- /* xscreensaver should handle this itself, but does not currently so we hack
- * it. Ignore failures in case xscreensaver is not installed */
- g_spawn_command_line_async ("xscreensaver-command -restart", NULL);
-
- return 0;
-}
-
-static GtkWidget *
-wrap_in_label (GtkWidget *child, char *text)
-{
- GtkWidget *vbox, *hbox;
- GtkWidget *label;
- char *str;
-
- vbox = gtk_vbox_new (FALSE, 6);
- label = NULL;
-
- label = gtk_label_new ("");
-
- str = g_strdup_printf ("<b>%s</b>", text);
- gtk_label_set_markup (GTK_LABEL (label), str);
- g_free (str);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (vbox),
- label,
- FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, 0);
-
- label = gtk_label_new (" ");
- gtk_widget_show (label);
- gtk_box_pack_start (GTK_BOX (hbox),
- label,
- FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (hbox),
- child,
- TRUE, TRUE, 0);
-
- gtk_widget_show (hbox);
-
- gtk_box_pack_start (GTK_BOX (vbox),
- hbox,
- FALSE, FALSE, 0);
-
- gtk_widget_show (vbox);
-
- return vbox;
-}
-
-static gboolean
-show_resolution (int width, int height)
-{
- if (width >= 800 && height >= 600)
- return TRUE;
-
- if (width == 640 && height == 480)
- return TRUE;
-
- return FALSE;
-}
-
-static void
-resolution_changed_callback (GtkWidget *optionmenu, struct ScreenInfo *screen_info)
-{
- generate_rate_menu(screen_info);
-}
-
-static void
-generate_rate_menu (struct ScreenInfo *screen_info)
-{
- GtkWidget *menu;
- GtkWidget *menuitem;
- short *rates;
- int nrates, i;
- int size_nr;
- char *str;
- int closest_rate_nr;
-
- gtk_option_menu_remove_menu (GTK_OPTION_MENU (screen_info->rate_widget));
-
- menu = gtk_menu_new ();
-
- size_nr = get_current_resolution (screen_info);
-
- closest_rate_nr = -1;
- rates = XRRConfigRates (screen_info->config, size_nr, &nrates);
- for (i = 0; i < nrates; i++)
- {
- str = g_strdup_printf (_("%d Hz"), rates[i]);
-
- if ((closest_rate_nr < 0) ||
- (ABS (rates[i] - screen_info->current_rate) <
- ABS (rates[closest_rate_nr] - screen_info->current_rate)))
- closest_rate_nr = i;
-
- menuitem = gtk_menu_item_new_with_label (str);
-
- g_object_set_data (G_OBJECT (menuitem), "rate", GINT_TO_POINTER ((int)rates[i]));
-
- g_free (str);
- gtk_widget_show (menuitem);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (screen_info->rate_widget), menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (screen_info->rate_widget),
- closest_rate_nr);
-}
-
-static void
-generate_resolution_menu(struct ScreenInfo* screen_info)
-{
- GtkWidget *menu;
- GtkWidget *menuitem;
- int i, item, current_item;
- XRRScreenSize *sizes;
- char *str;
- SizeID current_size;
- Rotation rot;
-
- gtk_option_menu_remove_menu(GTK_OPTION_MENU(screen_info->resolution_widget));
- menu = gtk_menu_new ();
- current_size = XRRConfigCurrentConfiguration (screen_info->config, &rot);
-
- current_item = 0;
- item = 0;
- sizes = screen_info->sizes;
- for (i = 0; i < screen_info->n_sizes; i++)
- {
- if (i == current_size || show_resolution (sizes[i].width, sizes[i].height))
- {
- str = g_strdup_printf ("%dx%d", sizes[i].width, sizes[i].height);
-
- if (i == current_size)
- current_item = item;
-
- menuitem = gtk_menu_item_new_with_label (str);
-
- g_object_set_data (G_OBJECT (menuitem), "screen_nr", GINT_TO_POINTER (i));
-
- g_free (str);
- gtk_widget_show (menuitem);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menuitem);
- item++;
- }
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (screen_info->resolution_widget), menu);
- gtk_option_menu_set_history (GTK_OPTION_MENU (screen_info->resolution_widget), current_item);
-
- g_signal_connect (screen_info->resolution_widget, "changed", G_CALLBACK (resolution_changed_callback), screen_info);
-
- gtk_widget_show (screen_info->resolution_widget);
-}
-
-static GtkWidget *
-create_resolution_menu (struct ScreenInfo *screen_info)
-{
- screen_info->resolution_widget = gtk_option_menu_new ();
- generate_resolution_menu (screen_info);
-
- return screen_info->resolution_widget;
-}
-
-static GtkWidget *
-create_rate_menu (struct ScreenInfo *screen_info)
-{
- GtkWidget *optionmenu;
-
- screen_info->rate_widget = optionmenu = gtk_option_menu_new ();
-
- generate_rate_menu (screen_info);
-
- gtk_widget_show (optionmenu);
- return optionmenu;
-}
-
-static GtkWidget *
-create_screen_widgets (struct ScreenInfo *screen_info, int nr, gboolean no_header)
-{
- GtkWidget *table;
- GtkWidget *label;
- GtkWidget *option_menu;
- GtkWidget *ret;
- char *str;
-
- table = gtk_table_new (2, 2, FALSE);
-
- gtk_table_set_row_spacings ( GTK_TABLE (table), 6);
- gtk_table_set_col_spacings ( GTK_TABLE (table), 12);
-
- label = gtk_label_new_with_mnemonic (_("_Resolution:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table),
- label,
- 0, 1,
- 0, 1,
- GTK_FILL, 0,
- 0, 0);
-
- option_menu = create_resolution_menu (screen_info);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), option_menu);
- gtk_table_attach (GTK_TABLE (table),
- option_menu,
- 1, 2,
- 0, 1,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- label = gtk_label_new_with_mnemonic (_("Re_fresh rate:"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_widget_show (label);
- gtk_table_attach (GTK_TABLE (table),
- label,
- 0, 1,
- 1, 2,
- GTK_FILL, 0,
- 0, 0);
- gtk_widget_show (table);
-
- option_menu = create_rate_menu (screen_info);
- gtk_label_set_mnemonic_widget (GTK_LABEL (label), option_menu);
- gtk_table_attach (GTK_TABLE (table),
- option_menu,
- 1, 2,
- 1, 2,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- if (nr == 0)
- str = g_strdup (_("Default Settings"));
- else
- str = g_strdup_printf (_("Screen %d Settings\n"), nr+1);
- ret = wrap_in_label (table, str);
- g_free (str);
- return ret;
-}
-
-
-static GtkWidget *
-create_dialog (struct DisplayInfo *info)
-{
- GtkWidget *dialog;
- GtkWidget *screen_widget;
- GtkWidget *per_computer_check;
- int i;
- GtkWidget *wrapped;
- GtkWidget *vbox;
- GConfClient *client;
- char *key;
- char *resolution;
- char *str;
-#ifdef HOST_NAME_MAX
- char hostname[HOST_NAME_MAX + 1];
-#else
- char hostname[256];
-#endif
-
- dialog = gtk_dialog_new_with_buttons (_("Screen Resolution Preferences"),
- NULL,
- GTK_DIALOG_NO_SEPARATOR,
- "gtk-close",
- GTK_RESPONSE_CLOSE,
- "gtk-apply",
- GTK_RESPONSE_APPLY,
- "gtk-help",
- GTK_RESPONSE_HELP,
- NULL);
-
- gtk_window_set_resizable(GTK_WINDOW (dialog), FALSE);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 2);
- capplet_set_icon (dialog, "display-capplet.png");
-
- vbox = gtk_vbox_new (FALSE, 18);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), 5);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox),
- vbox, FALSE, FALSE, 0);
- gtk_widget_show (vbox);
-
- for (i = 0; i < info->n_screens; i++)
- {
- screen_widget = create_screen_widgets (&info->screens[i], i, info->n_screens == 1);
- gtk_box_pack_start (GTK_BOX (vbox),
- screen_widget, FALSE, FALSE, 0);
- gtk_widget_show (screen_widget);
- }
-
- per_computer_check = NULL;
- info->was_per_computer = FALSE;
- if (gethostname (hostname, sizeof (hostname)) == 0 &&
- strcmp (hostname, "localhost") != 0 &&
- strcmp (hostname, "localhost.localdomain") != 0)
- {
-
- str = g_strdup_printf (_("_Make default for this computer (%s) only"), hostname);
- per_computer_check = gtk_check_button_new_with_mnemonic (str);
-
- /* If we previously set the resolution specifically for this hostname, default
- to it on */
- client = gconf_client_get_default ();
- key = g_strconcat ("/desktop/gnome/screen/", hostname, "/0/resolution",NULL);
- resolution = gconf_client_get_string (client, key, NULL);
- g_free (resolution);
- g_free (key);
- g_object_unref (client);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (per_computer_check),
- resolution != NULL);
- info->was_per_computer = resolution != NULL;
-
- gtk_widget_show (per_computer_check);
-
- wrapped = wrap_in_label (per_computer_check, _("Options"));
- gtk_box_pack_start (GTK_BOX (vbox),
- wrapped, FALSE, FALSE, 0);
- gtk_widget_show (wrapped);
- }
-
- info->per_computer_check = per_computer_check;
-
- return dialog;
-}
-
-struct TimeoutData {
- int time;
- GtkLabel *label;
- GtkDialog *dialog;
- gboolean timed_out;
-};
-
-char *
-timeout_string (int time)
-{
- return g_strdup_printf (ngettext ("Testing the new settings. If you don't respond in %d second the previous settings will be restored.", "Testing the new settings. If you don't respond in %d seconds the previous settings will be restored.", time), time);
-}
-
-gboolean
-save_timeout_callback (gpointer _data)
-{
- struct TimeoutData *data = _data;
- char *str;
-
- data->time--;
-
- if (data->time == 0)
- {
- gtk_dialog_response (data->dialog, GTK_RESPONSE_NO);
- data->timed_out = TRUE;
- return FALSE;
- }
-
- str = timeout_string (data->time);
- gtk_label_set_text (data->label, str);
- g_free (str);
-
- return TRUE;
-}
-
-static int
-run_revert_dialog (struct DisplayInfo *info,
- GtkWidget *parent)
-{
- GtkWidget *dialog;
- GtkWidget *hbox;
- GtkWidget *vbox;
- GtkWidget *label;
- GtkWidget *label_sec;
- GtkWidget *image;
- int res;
- struct TimeoutData timeout_data;
- guint timeout;
- char *str;
-
- dialog = gtk_dialog_new ();
- gtk_window_set_transient_for (GTK_WINDOW (dialog), GTK_WINDOW (parent));
- gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
- gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
- gtk_window_set_title (GTK_WINDOW (dialog), _("Keep Resolution"));
- gtk_window_set_position(GTK_WINDOW(dialog),GTK_WIN_POS_CENTER_ALWAYS);
-
- label = gtk_label_new (NULL);
- str = g_strdup_printf ("<b>%s</b>", _("Do you want to keep this resolution?"));
- gtk_label_set_markup (GTK_LABEL (label), str);
- g_free (str);
- image = gtk_image_new_from_stock (GTK_STOCK_DIALOG_QUESTION, GTK_ICON_SIZE_DIALOG);
- gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0);
-
- gtk_label_set_line_wrap (GTK_LABEL (label), TRUE);
- gtk_label_set_selectable (GTK_LABEL (label), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-
- str = timeout_string (REVERT_COUNT);
- label_sec = gtk_label_new (str);
- g_free (str);
- gtk_label_set_line_wrap (GTK_LABEL (label_sec), TRUE);
- gtk_label_set_selectable (GTK_LABEL (label_sec), TRUE);
- gtk_misc_set_alignment (GTK_MISC (label_sec), 0.0, 0.5);
-
- hbox = gtk_hbox_new (FALSE, 6);
- vbox = gtk_vbox_new (FALSE, 6);
-
- gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), label_sec, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hbox, FALSE, FALSE, 0);
- gtk_dialog_add_buttons (GTK_DIALOG (dialog),_("Use _previous resolution"), GTK_RESPONSE_NO, _("_Keep resolution"), GTK_RESPONSE_YES, NULL);
-
- gtk_widget_show_all (hbox);
-
- timeout_data.time = REVERT_COUNT;
- timeout_data.label = GTK_LABEL (label_sec);
- timeout_data.dialog = GTK_DIALOG (dialog);
- timeout_data.timed_out = FALSE;
-
- timeout = g_timeout_add (1000, save_timeout_callback, &timeout_data);
- res = gtk_dialog_run (GTK_DIALOG (dialog));
-
- if (!timeout_data.timed_out)
- g_source_remove (timeout);
-
- gtk_widget_destroy (dialog);
-
- return res == GTK_RESPONSE_YES;
-}
-
-static void
-save_to_gconf (struct DisplayInfo *info, gboolean save_computer, gboolean clear_computer)
-{
- GConfClient *client;
- gboolean res;
-#ifdef HOST_NAME_MAX
- char hostname[HOST_NAME_MAX + 1];
-#else
- char hostname[256];
-#endif
- char *path, *key, *str;
- int i;
-
- gethostname (hostname, sizeof(hostname));
-
- client = gconf_client_get_default ();
-
- if (clear_computer)
- {
- for (i = 0; i < info->n_screens; i++)
- {
- key = g_strdup_printf ("/desktop/gnome/screen/%s/%d/resolution",
- hostname, i);
- gconf_client_unset (client, key, NULL);
- g_free (key);
- key = g_strdup_printf ("/desktop/gnome/screen/%s/%d/rate",
- hostname, i);
- gconf_client_unset (client, key, NULL);
- g_free (key);
- }
- }
-
- if (save_computer)
- {
- path = g_strconcat ("/desktop/gnome/screen/",
- hostname,
- "/",
- NULL);
- }
- else
- path = g_strdup ("/desktop/gnome/screen/default/");
-
- for (i = 0; i < info->n_screens; i++)
- {
- struct ScreenInfo *screen_info = &info->screens[i];
- int new_res, new_rate;
-
- new_res = get_current_resolution (screen_info);
- new_rate = get_current_rate (screen_info);
-
- key = g_strdup_printf ("%s%d/resolution", path, i);
- str = g_strdup_printf ("%dx%d",
- screen_info->sizes[new_res].width,
- screen_info->sizes[new_res].height);
-
- res = gconf_client_set_string (client, key, str, NULL);
- g_free (str);
- g_free (key);
-
- key = g_strdup_printf ("%s%d/rate", path, i);
- res = gconf_client_set_int (client, key, new_rate, NULL);
- g_free (key);
- }
-
- g_free (path);
- g_object_unref (client);
-}
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id, struct DisplayInfo *info)
-{
- gboolean save_computer, clear_computer;
- switch (response_id)
- {
- case GTK_RESPONSE_DELETE_EVENT:
- gtk_main_quit ();
- break;
- case GTK_RESPONSE_HELP:
- capplet_help (GTK_WINDOW (dialog), "user-guide.xml", "goscustdesk-70");
- break;
- case GTK_RESPONSE_APPLY:
- save_computer = info->per_computer_check != NULL && gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (info->per_computer_check));
- clear_computer = !save_computer && info->was_per_computer;
-
- if (apply_config (info))
- {
- gtk_widget_hide(GTK_WIDGET(dialog));
- if (!run_revert_dialog (info, GTK_WIDGET (dialog)))
- {
- gtk_widget_show(GTK_WIDGET(dialog));
- revert_config (info);
- return;
- }
- }
-
- save_to_gconf (info, save_computer, clear_computer);
- gtk_main_quit ();
- break;
- case GTK_RESPONSE_CLOSE:
- gtk_main_quit ();
- break;
- }
-}
-
-int
-main (int argc, char *argv[])
-{
- int major, minor;
- int event_base, error_base;
- GdkDisplay *display;
- GtkWidget *dialog;
- struct DisplayInfo *info;
- Display *xdisplay;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-display-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
-
- display = gdk_display_get_default ();
- xdisplay = gdk_x11_display_get_xdisplay (display);
-
- if (!XRRQueryExtension (xdisplay, &event_base, &error_base) ||
- XRRQueryVersion (xdisplay, &major, &minor) == 0)
- {
- GtkWidget *msg_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("The X Server does not support the XRandR extension. Runtime resolution changes to the display size are not available."));
- gtk_dialog_run (GTK_DIALOG (msg_dialog));
- gtk_widget_destroy (msg_dialog);
- exit (0);
- }
- else if (major != 1 || minor < 1)
- {
- GtkWidget *msg_dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_ERROR, GTK_BUTTONS_OK,
- _("The version of the XRandR extension is incompatible with this program. Runtime changes to the display size are not available."));
- gtk_dialog_run (GTK_DIALOG (msg_dialog));
- gtk_widget_destroy (msg_dialog);
- exit (0);
- }
-
- info = read_display_info (display);
- dialog = create_dialog (info);
-
- g_signal_connect (G_OBJECT (dialog), "response", G_CALLBACK (cb_dialog_response), info);
- gtk_widget_show (dialog);
-
- gtk_main ();
- return 0;
-}
diff --git a/capplets/file-types/.cvsignore b/capplets/file-types/.cvsignore
deleted file mode 100644
index b549d1b23..000000000
--- a/capplets/file-types/.cvsignore
+++ /dev/null
@@ -1,6 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-gnome-file-types-properties
-file-types.desktop
diff --git a/capplets/file-types/ChangeLog b/capplets/file-types/ChangeLog
deleted file mode 100644
index 1034c22b7..000000000
--- a/capplets/file-types/ChangeLog
+++ /dev/null
@@ -1,1288 +0,0 @@
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * file-types.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-19-05 Muktha <muktha.narayan@wipro.com>
-
- * mime-type-info.c (get_icon_pixbuf): Avoid recursive call of this
- function when the icon file is not found. Fixes file-types capplet
- hang. Bug #142894.
-
-2003-06-10 Shailesh Mittal <shailesh.mittal@wipro.com>
-
- * libuuid/gen_uuid.c (get_node_id): Creating an IPv6 socket if AF_INET6
- is defined on the system. If IPv6 socket cannot be created, then we are
- falling back to IPv4 socket creation, as was done previously.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-03-02 Dan T. Murphy <dtmurphy@acm.org>
-
- * file-types-properties.glade: Added use_filechooser=true
- property to GnomeFileEntry widgets to make use of new file
- selector. Fixes bug #135791.
-
-2004-02-19 Kaushal Kumar <kaushal.kumar@wipro.com>
-
- * file-types-capplet.c (remove_cb): Added warning dialog to prompt
- the user before an entry is deleted permanently. (Release team's
- approval taken regarding the string addition).
- Fix bug #109091.
-
-2004-02-16 Padraig O'Briain <padraig.obriain@sun.com>
-
- * file-types-properties.glade: Remove unnecessary setting of ATK
- relations. The module gail will ensure that the labels are set
- correctly. Set mnemonic widget to be a GnomeFileEntry instead of
- a GtkEntry in the combo box. Fixes bug #134131.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-10 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c : rework to match nautilus and use icon themes
- somewhat. There is some serious cruft left in here.
-
-2004-02-04 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_class_init) : do not call these
- construct only properties so that the info can change later.
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * file-types-capplet.c: (cb_file_type_dialog_response): Update help
- link to point to user-guide.xml
-
-2004-02-10 Kjartan Maraas <kmaraas@gnome.org>
-
- * mime-edit-dialog.c: (mime_edit_dialog_get_app), (validate_data):
- Fix some typos.
-
-2004-02-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * mime-edit-dialog.c: (validate_data): Remove extra
- full stop. Closes bug #132563.
-
-2004-02-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * file-types-icon-entry.c: Replace deprecated calls
- to g_dirname and g_basename.
- (#133174, Kjartan Maraas)
-
-2004-01-20 Sivaiah Nallagatla <snallagatla@novell.com>
-
- * mime-edit-dialog.c (mime_add_dialog_new ) : do not try to set
- construct only property after object is constructed. Fixes #128374
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-12-03 Muktha <muktha.narayan@wipro.com>
-
- * file-types-properties.glade: Added the label-for/by relation.
- Fixes #127304.
-
-2003-12-01 Sivaiah Nallagatla <snallagatla@novell.com>
-
- * service-info.c (service_info_save): Patch to remeber
- custome program configured for Internet Services. #123976 in b.g.o
-
-Mon Nov 17 00:13:07 2003 Jonathan Blandford <jrb@gnome.org>
-
- * service-edit-dialog.c (populate_app_list): Patch from
- snallagatla@novell.com to fix a crash.
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-10-07 Muktha <muktha.narayan@wipro.com>
-
- * file-types-properties.glade: Added title to the icon entry browse
- dialog. Fixes #122394.
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * file-types-properties.glade: Patch to fix spacing between action
- area and vbox of preferences dialog.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * file-types-properties.glade: Minor HIG widget padding adjustments.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-06-06 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (populate_component_list) : be careful about menu
- sensitivity, the order is important. Setting the menu of an option
- menu makes it sensitive even if the menu is empty). However, if the
- option menu is initially insensitive then the first item in the menu
- gets marked insensitive when the menu is reparented. Once one item
- is in the option menu becomes sensitive and the rest are ok.
-
-2003-06-02 Balamurali Viswanathan <balamurali.viswanathan@wipro.com>
-
- * mime-edit-dialog.c: (validate_data): Give an error dialog if the
- users clicks on OK button when the MIME type is not entered
- Fixes bug #113963
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * service-info.c: (service_info_get_description): Translate
- the url descriptions too. Merged from head.
-
-2003-04-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * mime-type-info.c: (mime_type_get_pretty_name_for_server),
- (get_lang_list): Fix i18n problems. Patch from Mike Lei at Sun.
- Fixes bug #105700.
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * mime-type-info.c: (mime_category_info_get_full_name),
- (mime_category_info_get_full_description): Use g_string_new (NULL)
- instead of g_string_new (""). Reported to be more efficient.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-30 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=101128
- * mime-types-model.c (mime_types_model_iter_children) : apply patch
- from padraig.
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-12-09 Rajkumar Sivasamy <rajkumar.siva@wipro.com>
-
- * mime-edit-dialog.c: Display the list of applications installed
- in the system for a mime type rather than displaying all the
- applications associated to that mime type.
- Fixes bug 94757
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-03 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=93279
- * file-types-properties.glade : missing & conflicting accerators.
-
- http://bugzilla.gnome.org/show_bug.cgi?id=93211
- * file-types-capplet.c (edit_count_cb) : delete.
- (selection_count_cb) : rename from remove_count_cb.
- (selection_changed_cb) : simplify code, disable edit button for
- catagories.
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-09-09 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (update_sensitivity) : As FCrozat points out
- use category default has been lobotomized.
-
-2002-08-31 Jacob Berkman <jacob@krunk.local.>
-
- * Makefile.am (gnome_file_types_properties_LDADD): link against -lpopt
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * file-types.desktop.in: Fix the desktop file so that it
- validates.
-
-2002-08-19 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=88354
- * file-types.desktop.in : minor update
-
-2002-08-10 Jody Goldberg <jody@gnome.org>
-
- * file-types-properties.glade : fix missed capitalization for the
- ui-review.
-
-2002-08-07 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_get_app) : Be extra anal, just
- in case the db is corrupt.
-
-2002-08-05 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_get_app) : work around
- gnome_file_entry's propensity for prepending the current dir if none
- is specified. This allows a user to type a nme with no
- qualifications and have it look things up in the path.
-
- * mime-type-info.c (mime_category_info_save) : lobotomize this just in
- case.
-
-2002-08-03 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=88775
- * file-types-properties.glade : make the other sub dialogs modal too.
-
-2002-08-01 Federico Mena Quintero <federico@ximian.com>
-
- * file-types-properties.glade: Made the file entries modal as they
- live in modal dialogs. Fixes #89370.
-
- * service-edit-dialog.c (service_add_dialog_new): Return a
- GObject, not a GtkWidget.
-
- * file-types-capplet.c (add_service_cb): Do not assign a GtkWidget
- to a GObject.
-
-2002-07-17 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_type_info_new) : no need to preload the icon.
- (mime_type_info_load_all) : nor here.
-
-2002-07-17 Jody Goldberg <jody@gnome.org>
-
- * file-types-properties.glade : tweak the padding a touch
-
-2002-07-17 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_init) : only enable the remove
- button when there is a selection.
-
-2002-07-16 Jody Goldberg <jody@gnome.org>
-
- * file-types-properties.glade (</) : rearrange the extensions area.
- * mime-edit-dialog.c (mime_edit_dialog_init) : add when the entry is
- activated.
-
-2002-07-10 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_init) : set the icon here.
-
-2002-07-09 Jody Goldberg <jody@gnome.org>
-
- * file-types-properties.glade : disable the use of category defaults
- * file-types-capplet.c (launch_edit_dialog) : disable editing category
- handlers.
-
-2002-06-26 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_type_info_load_all) : do not trust
- gnome_vfs_mime_get_default_application. It silently removes
- applications that do not exist on the current system. That makes it
- look like they are not being assigned.
- (mime_category_info_save) : be anal.
-
- * mime-edit-dialog.c (validate_data) : relax the restriction here. By
- supplying a reasonable default to the new info it was appearing in
- our internal data structures. That was a useful test before we were
- instant apply, but is no longer helpful.
-
-2002-06-26 Jody Goldberg <jody@gnome.org>
-
- * file-types-capplet.c (main) : blah, test things _before_ I commit.
-
-2002-06-25 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_add_dialog_new) : add de
-
- * file-types-capplet.c (main) : fix cmd line arg support
- And support optional 'file_name' as a helper for generating smarter
- defaults.
-
-2002-06-25 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_edit_dialog_get_app) : typo.
-
-2002-06-15 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=85397
- http://bugzilla.gnome.org/show_bug.cgi?id=84545
- * mime-types-model.c (mime_types_model_get_value) :
- gtk_tree_view_search_equal_func does not like NULL.
- (IS_CATEGORY) : check for NULL.
- * file-types-capplet.c (create_dialog) : search the description not
- the mime type.
-
-2002-06-08 Jody Goldberg <jody@gnome.org>
-
- * mime-types-model.c (IS_CATEGORY) : test for null in case we are
- stupid.
-
-2002-06-07 Jody Goldberg <jody@gnome.org>
-
- * file-types-capplet.c (dialog_done_cb) : no need to save things
- again. The only caller had already done that.
-
- * mime-type-info.c (mime_type_info_save) : Don't mess with the
- application here, it should already be setup. However, be really
- really anal about verifying it because I do not trust the
- surrounding code or know it well enough to trust it. Make sure that
- the assigned app is on the short list of associated apps.
-
- * mime-category-edit-dialog.c (store_data) : Use
- mime_edit_dialog_get_app.
- * mime-edit-dialog.c (store_data) : Use it here too.
- (mime_edit_dialog_get_app) : new. split some duplicated code out of
- the type and category dialogs and move it here. Then make it
- readable and less stupid about creating copies of existing
- applications. While we're at it have it handle the creation of new
- applications, merging commands with existing applications and other
- useful stuff.
-
-2002-06-07 Jody Goldberg <jody@gnome.org>
-
- * mime-category-edit-dialog.c (store_data) : clarify and remove the
- custom flag.
-
- * mime-type-info.c (mime_category_info_using_custom_app) : delete.
- (mime_type_info_using_custom_app) : delete.
-
- * mime-edit-dialog.c (validate_data) : correct the warning about
- invalid type, we would _not_ create one for the user :-(
- Allow a user to optionally overwrite an existing mime type.
- This is useful when editing.
- * mime-edit-dialog.c (store_data) : clarify and remove the custom flag.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-06-05 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (mime_add_dialog_new) : tidy.
-
- * mime-edit-dialog.c (mime_edit_editable_enters) : new.
- (fill_dialog) : mime type is always sensitive.
- (mime_edit_dialog_init) : use mime_edit_editable_enters and set the
- default response.
- (mime_add_dialog_new) : forceably define the model before is-add and
- set the parent.
-
-
- * model-entry.c (model_entry_insert_child) : be paranoid. Sort the
- mime entries too.
-
- * file-types-capplet.c (main) : !KLUDGE! if we are editing
- application/octet-stream assume that people really want to create a
- new mime type.
-
-2002-06-04 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_type_info_save) : Add a freeze/thaw around
- the assignments.
-
-2002-05-31 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (get_category_name) : disable debug spew.
-
- * model-entry.c (model_entry_insert_child) : order the categories
- nicely.
-
-2002-05-31 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=83545
- * mime-types-model.c (mime_types_model_iter_parent) : Use the child
- not the result.
-
-2002-05-29 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (get_category_description) : put things in Misc if
- they have no defined category.
- (get_category_name) : ditto.
-
-2002-05-24 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * file-types-capplet.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-24 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_category_info_load_all) : make this more paranoid.
- * mime-category-edit-dialog.c (update_subcategories) : Move this over
- here.
-
-2002-05-17 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_category_info_using_custom_app) : add some
- protection.
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=17728
- (mime_type_info_save): a patch inspired by Archit Baweja's proposal.
-
-2002-05-09 Archit Baweja <bighead@users.sourceforge.net>
-
- * mime-type-info.c (mime_type_info_set_file_extensions): free the old
- list.
-
-2002-05-10 jacob berkman <jacob@ximian.com>
-
- * mime-type-info.c (mime_category_info_get_full_description):
- (mime_category_info_get_full_name): work around a gcc 2.96 bug
- (fixes #77121)
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * file-types-capplet.c (cb_file_type_dialog_response) : fix path to
- help.
-
- http://bugzilla.gnome.org/show_bug.cgi?id=81030
- * service-info.c (fill_service_apps) : we don't own the app, don't
- free it.
-
-2002-04-30 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=80327
- * service-edit-dialog.c (program_changed_cb) : Doh! If the current
- tree selection is not a service then the app can be null.
-
-2002-04-26 Jody Goldberg <jody@gnome.org>
-
- * service-edit-dialog.c (populate_app_list) : always populate the
- details fields so a user can see what they selected.
- (program_changed_cb) : ditto.
-
- * service-info.c (fill_service_apps) : fix to not use freed memory.
-
-2002-04-23 Jody Goldberg <jody@gnome.org>
-
- * model-entry.c (model_entry_save) : wrap in vfs freeze/unfreeze.
- (model_entry_append_to_dirty_list) : delete.
- (model_entry_remove_from_dirty_list) : delete.
- (model_entry_commit_dirty_list) : delete.
- (model_entry_append_to_delete_list) : delete.
- (model_entry_commit_delete_list) : delete.
-
- * mime-category-edit-dialog.c (store_data) : make this instant apply.
- * mime-edit-dialog.c (store_data) : ditto.
- * service-edit-dialog.c (store_data) : ditto.
-
- * file-types-capplet.c (cb_file_type_dialog_response) : add help and
- change the buttons to help & close to be HIG compliant.
- (remove_cb) : make removal apply instantly.
- * file-types-properties.glade : Make the buttons Help & Close
-
-2002-04-22 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (validate_data) : tidy up.
- (choose_cat_cb) : reorder buttons to be hig compliant.
- (mime_edit_dialog_init) : ditto.
- * service-edit-dialog.c (service_edit_dialog_init) : ditto.
- * mime-category-edit-dialog.c (mime_category_edit_dialog_init) : ditto.
-
-2002-04-22 Jody Goldberg <jody@gnome.org>
-
- * service-edit-dialog.c (service_edit_dialog_set_prop) : set dialog
- title correctly when adding a service.
- * mime-edit-dialog.c (mime_edit_dialog_set_prop) : ditto.
-
-2002-04-21 Jody Goldberg <jody@gnome.org>
-
- * service-info.c (fill_service_apps) : Use the new hook in
- gnome_vfs_application_registry_get_applications to actually retrieve
- all the applications rather than just pretending.
-
-2002-04-21 Jody Goldberg <jody@gnome.org>
-
- * service-edit-dialog.c (service_edit_dialog_init) : fully disable the
- already disable 'check content' field. What the heck is this supposed
- to do ?
- (fill_dialog) : ditto.
- (setup_add_dialog) : ditto.
- (store_data) : ditto.
- * file-types-properties.glade : ditto. Having user visible widgets
- that don't do anything is not a good idea.
-
-2002-04-18 Jody Goldberg <jody@gnome.org>
-
- * file-types-capplet-dialogs.c (initialize_edit_applications_dialog) :
- Add some accelerators to buttons.
- (nautilus_mime_type_capplet_show_change_extension_window) : ditto.
- (run_edit_or_new_application_dialog) : and to checkboxes
- (create_application_list_item) : simplify. No need for a label and a
- checkbox in an hbox.
-
- * file-types-properties.glade : Add some accelerators to buttons and
- checkboxes.
-
-2002-04-12 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (mime_type_info_save) : revert part of Lauris's
- changes that were stripping off the first character of the category.
-
-Wed Apr 10 18:04:10 2002 Jonathan Blandford <jrb@gnome.org>
-
- * file-types.desktop.in (Exec): s/gnome2/gnome
-
-2002-04-10 Jody Goldberg <jody@gnome.org>
-
- * mime-type-info.c (get_category) : make case insensitive.
-
-2002-04-07 Jody Goldberg <jody@gnome.org>
-
- * file-types-properties.glade : assign response ids to the buttons.
-
- * file-types-capplet.c (apply_cb) : delete and merge into.
- (cb_file_type_dialog_response) : here.
- (create_dialog) : connect to reponse here.
- (main) : rather than connecting to buttons directly here.
-
- * mime-edit-dialog.c (validate_data) : actually display the dialog.
- (fill_dialog) : Add some protection.
- (safe_set_entry) : new safety utility.
-
-2002-04-07 Bradford Hovinen <hovinen@ximian.com>
-
- * model-entry.c (model_entry_remove_child): Don't signal row
- deleted or reset tmp->next if the child node was not found
-
-2002-04-02 jacob berkman <jacob@ximian.com>
-
- * service-edit-dialog.c (fill_dialog): show 'unknown' in the
- protocol name for the unknown protocol
- (validate_data): actually run and destroy the error dialogs
-
-2002-03-30 Jody Goldberg <jody@gnome.org>
-
- * mime-edit-dialog.c (populate_component_list) : add some protection
- for when there is no default.
-
-2002-03-30 Lauris Kaplinski <lauris@ximian.com>
-
- * service-info.c: Added ghelp
- (service_info_using_custom_app): Fix crash
-
- * mime-type-info.c (mime_type_info_save): Strip starting slash
-
- * mime-edit-dialog.c (store_data): Strip starting slash
-
-2002-03-08 Lauris Kaplinski <lauris@ximian.com>
-
- * mime-type-info.c (mime_type_info_using_custom_app): Return TRUE
- if default_action does not exist (it is better than crash)
-
- * mime-edit-dialog.c (store_data): Create default_action if there is none
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * file-types-applet.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-20 Mark McLoughlin <mark@skynet.ie>
-
- * file-types.desktop.in: use the proper executable name.
-
-2002-02-17 Bradford Hovinen <hovinen@ximian.com>
-
- * mime-type-info.c (get_icon_pixbuf): Try to find the icon from
- the MIME type.
- (mime_type_info_get_icon_path): Fetch the icon name from the MIME
- type if necessary
- (get_icon_pixbuf): Call get_real_icon_path
- (get_real_icon_path): Implement. Factor from
- mime_type_info_get_icon_path
- (mime_type_info_get_icon_path): Call get_real_icon_path
- (mime_type_info_new): Retrieve the icon here
-
- * mime-types-model.c (mime_types_model_get_value): Set the object
- value to NULL if the icon is NULL
-
- * mime-type-info.c (get_icon_pixbuf): Give up if it can't find
- nautilus/i-regular-24.png
- (mime_type_info_get_icon): Only ref the pixbuf if non-NULL
-
- * mime-category-edit-dialog.c (fill_dialog): Fill the name entry
- with the description, not the name field
-
- * mime-types-model.c (mime_types_model_get_value): Use description
- field when returning the description column for a category
-
- * mime-type-info.c (mime_type_info_set_category_name): Accept
- pointer to category description and pass that to get_category
- (mime_category_info_new): Initialize description; accept pointer
- to description
- (get_category): Accept a pointer to the description and initialize
- the category with that as well if necessary
- (get_category_description): Implement. Copy from
- get_category_name, but use the translated description name
-
- * mime-type-info.h (struct _MimeCategoryInfo): Add description
- field; holds the translated name
-
- * mime-type-info.c (mime_category_info_get_full_description):
- Implement. Copy from mime_category_info_get_full_name, but use
- description field rather than name field
- (mime_type_info_get_category_name): Use _get_full_description
- rather than _get_full_name
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * service-edit-dialog.c (setup_add_dialog): Use gtk_menu_shell_append
- (validate_data): Use gtk_message_dialog methods
-
- * mime-category-edit-dialog.c (populate_application_list): Use
- gtk_menu_shell_append
-
- * mime-edit-dialog.c (setup_add_dialog): Use gtk_menu_shell_append
- (validate_data): Use gtk_message_dialog methods
-
- * mime-type-info.c: #include <string.h>, kill warning
- (mime_type_info_get_icon_path): Use g_file_test
-
-2002-01-29 Bradford Hovinen <hovinen@ximian.com>
-
- * file-types-capplet.c (create_dialog): Pack the icon and
- description in the same column
-
-2002-01-28 Duarte Loreto <happyguy_pt@hotmail.com>
-
- * mime-edit-dialog.c: Fixed a i18n glitch (missing space between two words)
-
-2002-01-28 Bradford Hovinen <hovinen@ximian.com>
-
- * service-edit-dialog.c (populate_app_list): Set custom program
- entry and needs terminal here
-
- * service-info.c (service_info_using_custom_app): Implement
-
- * service-edit-dialog.c (populate_app_list): Add destroy notify
- for app
-
- * service-info.[ch]: Eliminate custom_line and needs_terminal; use
- app for that
-
- * mime-edit-dialog.c (populate_application_list): Use
- gnome_vfs_application_registry_get_applications
-
- * mime-type-info.c (mime_type_info_using_custom_app)
- (mime_category_info_using_custom_app): Implement
-
- * mime-edit-dialog.c (store_data): Update: don't use custom_line,
- needs_terminal
-
- * mime-type-info.[ch]: Eliminate custom_line and needs_terminal;
- will use default_action for that now
-
- * mime-category-edit-dialog.c (store_data): Set fields in
- default_action from custom_line
-
- * mime-type-info.c (mime_category_info_save): Don't set tmp1 with
- the full category name, free tmp too
- (mime_category_info_load_all): strdup app->command
- (get_gconf_base_name): Don't put /default-action-id after the key
- name
- (mime_category_info_load_all): Set default_action even if the app
- is custom
-
- * category-names.h: Update category names
-
- * mime-type-info.c (update_subcategories): Fix logic
- (mime_type_info_load_all): Don't load default_action if
- custom_line is set
-
- * mime-category-edit-dialog.c (store_data): Call
- mime_category_info_update
- (store_data): Don't notify the model -- nothing there could have
- changed
-
- * mime-type-info.c (mime_category_info_update): Implement
- (update_subcategories): Update; split from set_subcategory_ids
-
- * mime-category-edit-dialog.c (populate_application_list): Notify
- destruction with gnome_vfs_mime_application_free
- (store_data): Store default action
- (store_data): Store custom line, needs terminal
- (populate_application_list): Set needs_terminal_toggle
-
- * mime-type-info.c (mime_type_info_get_use_category):
- Implement. Factor from mime_type_info_load_all
- (find_possible_supported_apps, reduce_supported_app_list): Use
- mime_type_info_get_use_category
- (get_gconf_base_name): Replace parentheses with '-'
- (mime_category_info_load_all): Only load default action, custom
- line if not already loaded
-
- * mime-edit-dialog.c (populate_component_list): Use get_all_components
- (populate_application_list): Use get_all_applications
-
-2002-01-27 Seth Nickell <snickell@stanford.edu>
-
- * file-types.desktop.in:
-
- Add Categories field.
-
-2002-01-27 Bradford Hovinen <hovinen@ximian.com>
-
- * file-types-capplet.c (dialog_done_cb): Implement
- (main): Connect to dialog_done_cb
-
- * mime-edit-dialog.c (mime_edit_dialog_class_init): Add done
- signal
- (response_cb): Emite done signal
-
- * mime-type-info.c (mime_type_info_save, mime_type_info_load_all):
- Change use-category to use_category_default
-
- * file-types-capplet.c (main): Accept command line argument with
- the MIME type
-
- * service-info.c (service_info_load_all): Always set run_program
- to TRUE
-
- * service-edit-dialog.c (fill_dialog): Disable look at content toggle
-
- * mime-type-info.c (mime_category_info_load_all): Call
- _get_mime_application
-
- * mime-types-model.c (mime_types_model_get_value): Invoke gettext
- macro on the category name
-
- * mime-type-info.c (get_gconf_base_name): Implement
-
- * mime-category-edit-dialog.c (fill_dialog): Disable
- use_category_toggle if this is a toplevel category
- (populate_application_list, default_action_changed_cb)
- (use_category_toggled_cb, update_sensitivity): Set widget
- sensitivity based on various values
-
- * mime-type-info.c (mime_type_info_load_all)
- (mime_category_info_load_all): Check use_[parent_]cat_loaded
- (mime_category_info_load_all): Override use_parent_category with
- FALSE if this is a toplevel category
-
- * mime-category-edit-dialog.c (store_data, fill_dialog): Get/set
- use_parent_category
-
- * mime-type-info.c (set_subcategory_ids): Don't set subcategory
- ids unless use_parent_category is set
- (mime_category_info_save, mime_category_info_load_all): Get/set
- use_parent_category
- (reduce_supported_app_list, find_possible_supported_apps): Check
- use_parent_category field
-
- * mime-edit-dialog.c (choose_cat_cb): Use
- mime_category_info_get_full_name
-
- * mime-type-info.c (mime_type_info_load_all, mime_type_info_save):
- Rename override_category as use_category; give it the opposite
- meaning
- (reduce_supported_app_list, find_possible_supported_apps): Update
- according to the above
- (set_subcategory_ids): Implement
- (mime_category_info_save): Implement
- (mime_category_info_load_all): Implement
- (mime_category_info_get_full_name): Implement; copy from
- mime_type_info_get_category_name
- (mime_type_info_get_category_name): Call
- mime_category_info_get_full_name
-
- * mime-edit-dialog.c (fill_dialog): Set
- use_category_defaults_toggle
- (store_data): Set override_category
- (mime_edit_dialog_init): Connect to
- use_category_defaults_toggled_cb
- (use_category_defaults_toggle_cb): Implement
- (default_action_changed_cb, populate_application_list)
- (populate_component_list): Call update_sensitivity; set
- sensitivity-controlling flags
- (update_sensitivity): Implement
-
- * mime-type-info.c (find_possible_supported_apps)
- (reduce_supported_app_list): Don't consider a MIME type if its
- override_category flag is set
- (mime_type_info_save): Set the override-category flag
- (mime_type_info_load_all): Load the override-category flag
-
- * service-edit-dialog.c (validate_data): Call get_service_info to
- handle case where the service was created and not yet committed
- (fill_dialog): Desensitize the look at content toggle if GnomeVFS
- doesn't support that protocol
-
- * mime-type-info.c (get_mime_type_info, get_mime_type_info_int):
- Implement
-
- * mime-edit-dialog.c (validate_data): Check if the MIME type is
- already known and we are adding a new type
-
- * service-edit-dialog.c (service_edit_dialog_init): Change dialog
- title
-
- * file-types-capplet.c (edit_count_cb): Rename from count_cb
- (selection_changed_cb): Initialize count
- (selection_changed_cb): Iterate on remove_count_cb and use that to
- set the sensitivity of the remove button
- (create_dialog): Desensitize the remove button
-
- * model-entry.c (model_entry_insert_child): Set the parent field
- (model_entry_remove_child): Reset the parent field
- (model_entry_remove_child): Set up the path before removing the
- entry from the list
-
- * service-info.c (load_all_services): Accept model
- (get_services_category_entry): Accept model
- (service_info_new): Accept model
- (get_services_category_entry): Set the parent pointer
-
- * model-entry.c (get_model_entries): Accept model
-
- * mime-type-info.c (mime_type_info_new, load_all_mime_types):
- Accept model
-
- * mime-edit-dialog.c (store_data): Don't perform notification
-
- * model-entry.c (model_entry_insert_child)
- (model_entry_remove_child): Perform notification here
-
- * mime-type-info.c (mime_type_info_set_category_name): Accept
- model for notification purposes
- (get_category): Ditto; notify the model that the new category has
- been created
-
- * mime-types-model.c (mime_types_model_iter_parent): Make the
- iterator invalid if the parent is the root node
-
- * mime-edit-dialog.c (collect_filename_extensions): Return NULL if
- there are no nodes in the tree at all
-
-2002-01-26 Bradford Hovinen <hovinen@ximian.com>
-
- * service-edit-dialog.c (response_cb): Free the structure if the
- user clicks cancel and this is an add dialog
-
- * mime-edit-dialog.c (response_cb): Free the structure if the user
- clicks cancel and this is an add dialog
-
- * service-info.c (load_all_services): Call
- model_entry_insert_child here
- (service_info_new): Don't call model_entry_insert_child
- (get_services_category_entry): Make this public
-
- * service-edit-dialog.c (store_data): Call
- model_entry_insert_child here
-
- * file-types-capplet.c (apply_cb): Call
- model_entry_commit_delete_list
-
- * model-entry.c (model_entry_remove): Implement
- (model_entry_append_to_delete_list)
- (model_entry_commit_delete_list): Implement
-
- * mime-type-info.c (intersect_lists, reduce_supported_app_list)
- (mime_category_info_find_apps): Implement
- (find_possible_supported_apps): Implement
-
- * mime-category-edit-dialog.c (mime_category_edit_dialog_init):
- Use mime_category_edit_widget for the dialog source
-
- * model-entry.c (model_entry_remove_from_dirty_list): Accept a
- ModelEntry structure
-
- * mime-category-edit-dialog.c (store_data): Call
- model_entry_append_to_dirty_list
-
- * service-edit-dialog.c (store_data): Call
- model_entry_append_to_dirty_list
-
- * service-info.c (service_info_new): Remove changeset
- (get_string, get_bool): Remove changeset support
- (set_string, set_bool): Ditto
-
- * file-types-capplet.c: Remove the changeset since it duplicates
- functionality already present elsewhere
-
- * model-entry.c: Move dirty list from mime-type-info.c to here;
- extend to support arbitrary model entries
-
- * mime-type-info.c (mime_type_info_new_category): Rename to
- mime_category_info_new; return MimeCategoryInfo
- (mime_category_info_new): Set parent to root node if it is NULL
- (get_category): Return a MimeCategoryInfo
- (mime_type_info_category_find_supported_apps): Rename to
- mime_type_info_find_apps
-
- * mime-type-info.h (struct _MimeCategoryInfo): Create new structure
-
- * mime-category-edit-dialog.c: Change iter property back to info
- (fill_dialog): Desensitize description, mime type entries
-
- * service-edit-dialog.c: Change iter property back to info
- (validate_data): Don't check duplicate directory unless this is an
- add dialog
-
- * mime-edit-dialog.c: Change iter property back to info
-
-2002-01-25 Bradford Hovinen <hovinen@ximian.com>
-
- * service-edit-dialog.c (store_data): Fetch the protocol name if
- this is an add dialog
- (validate_data): Implement
- (response_cb): Call validate_data
-
- * service-info.c (service_info_new): Don't strdup the protocol if
- it is NULL
-
- * service-edit-dialog.c (store_data): Use
- gtk_tree_model_row_inserted if this is an add dialog; also
- construct an iter in that case
- (service_edit_dialog_dispose): Free the iter
- (service_edit_dialog_finalize): Don't free the iter here
-
- * file-types-capplet.c (add_service_cb): Implement
- (create_dialog): Connect addd_service_button to add_service_cb
-
- * service-edit-dialog.c: Add property is-add
- (service_add_dialog_new): Implement
- (setup_add_dialog): Implement
-
- * mime-category-edit-dialog.c (fill_dialog): Desensitize component
- select
- (populate_application_list): Desensitize application select if
- there are no applications
- (fill_dialog): Flip logic on category defaults toggle sensitivity
-
- * service-edit-dialog.c (populate_app_list): Desensitize program
- select if there are no programs
- (fill_dialog): Use service_info_get_description for description
- entry
-
- * mime-edit-dialog.c (store_data): Construct an iterator if the
- one given is NULL
- (store_data): Don't notify row deletion if the object was not in
- the model to begin with
- (store_data): Don't fetch the old path if this is an add dialog
- (populate_component_list): Desensitize the component select box if
- there are no components
- (populate_application_list): Ditto
-
- * mime-type-info.c (mime_type_info_new): Initialize the parent
- field even if the mime type field is NULL
- (mime_type_info_get_category_name): Don't crash if the parent
- field is NULL
-
- * mime-edit-dialog.c (store_data): Generate random MIME type if
- not already set
- (validate_data): Implement. Make sure all the data entered are valid
- (response_cb): Call validate_data
-
- * file-types-capplet.c (remove_cb): Check the entry type and
- notify the tree of the deletion; update according to earlier
- changes
-
- * mime-edit-dialog.c: Add property is-add
- (setup_add_dialog): Implement
- (add_ext_cb): Clear the entry after adding
- (choose_cat_cb): Pack the tree in a scrolled window
- (choose_cat_cb): Set the minimum size on the dialog to 300x300
-
- * mime-type-info.c (mime_type_info_free): Free icon_path
-
- * mime-edit-dialog.c (fill_dialog): Set icon entry with the full
- path of the icon
-
- * mime-type-info.c (mime_type_info_get_icon_path):
- Implement. Factor from get_pixbuf
-
- * mime-edit-dialog.c (store_data): Reset the icon pixbufs so that
- they get reloaded
-
- * mime-type-info.c (get_icon_pixbuf): Use
- gnome_vfs_icon_path_from_filename and install the nautilus/ hack
- from the old capplet *sigh*
-
-2002-01-24 Bradford Hovinen <hovinen@ximian.com>
-
- * file-types-capplet.c (launch_edit_dialog): Implement. Factor
- from edit_cb, row_activated_cb
-
- * mime-type-info.c (mime_type_info_save): Disable setting edit,
- print lines
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * mime-type-info.c (mime_type_info_update): Reparent the iterator
- if necessary
- (mime_type_info_update): Don't call reinsert_model_entry
-
- * mime-types-model.c (insert_mime_type): Implement. Factor from
- mime_types_model_new
-
- * mime-category-edit-dialog.c (populate_application_list):
- Implement. Mostly a copy from the corresponding function in
- mime-edit-dialog.c
-
- * mime-types-model.c (get_insertion_point): Make this public
- (find_supported_apps_for_category, reduce_supported_app_list)
- (intersect_lists, find_possible_supported_apps): Implement
-
- * mime-edit-dialog.c (fill_dialog): Fill category_entry
- (choose_cat_cb): Implement
- (mime_edit_dialog_init): Connect choose_button to choose_cat_cb
-
- * mime-type-info.c (mime_type_info_load): Load category name
- (mime_type_info_save): Call reinsert_iter to affect category name
- change
-
- * mime-types-model.c (mime_types_model_new): Add parameter
- is_category_select; TRUE iff this model should be only for
- selecting a category and not list the actual file types or
- Internet services
- (get_category_name): Implement
-
- * mime-edit-dialog.c (mime_edit_dialog_init): Add category_label
- to first size group
-
-2002-01-13 Bradford Hovinen <hovinen@ximian.com>
-
- * file-types-capplet.c (edit_cb, row_activated_cb): Don't try to
- create a category edit dialog if this is the Internet Services
- category
- (count_cb): Only count other than internet services category
-
- * mime-types-model.c (model_entry_is_category): Implement
- (model_entry_is_protocol): Use categories[INTERNET_SERVICES_IDX]
- rather than string
- (model_entry_is_internet_services_category): Implement
-
- * Makefile.am (gnome_file_types_properties_SOURCES): Add
- mime-category-edit-dialog.[ch]
-
- * file-types-capplet.c (edit_cb): Construct a category edit dialog
- if the tree iterator has children
- (row_activated_cb): Ditto
-
-2002-01-11 Bradford Hovinen <hovinen@ximian.com>
-
- * file-types-capplet.c (selection_changed_cb): Implement
- (count_cb): Implement
- (create_dialog): Connect changed signal on treeview selection to
- selection_changed_cb
- (create_dialog): Desensitize edit button
- (remove_cb): Call selection_changed_cb
- (add_cb): Rename to add_mime_cb
- (create_dialog): Update add_button -> add_mime_button
-
- * mime-edit-dialog.c (default_action_changed_cb): Set sensitivity
- of needs_terminal_toggle
- (store_data): Set needs_terminal
- (fill_dialog): Set needs_terminal_toggle
-
- * mime-type-info.c (mime_type_info_free): Remove from dirty list
- (mime_type_info_save): Use libuuid to generate a unique ID for the
- custom app
- (mime_type_info_load): Check for custom line based on name
- (mime_type_info_load): Fetch needs_terminal
- (mime_type_info_save): Store info->needs_terminal in app
-
- * mime-edit-dialog.c (populate_application_list): Don't check
- default action id if default action is NULL
-
- * mime-type-info.c (mime_type_info_free): Remove data from
- mime_type_table
-
- * service-info.c (service_info_free): Free the info structure
-
- * mime-type-info.c (mime_type_info_load): Ditto below
-
- * service-info.c (service_info_load): Use service_info_table as a
- cache
- (service_info_free): Remove data from service_info_table
-
- * mime-edit-dialog.c (populate_application_list): Use custom_line
- for program_entry
-
- * mime-type-info.c (mime_type_info_load): Read custom_line from
- default_action
- (mime_type_info_save): Set custom line through GnomeVFS app
- registry
-
- * file-types-capplet.c (row_activated_cb): Implement. Callback for
- row_activated signal
-
- * mime-edit-dialog.c (add_ext_cb): Don't create a separate dialog;
- just read from new_ext_entry
-
- * service-info.c (get_apps_for_service_type): Implement
-
- * service-edit-dialog.c (program_changed_cb): Implement
- (service_edit_dialog_init): Connect program_select changed signal
- (populate_app_list): Fill app menu with results from
- get_apps_for_service_type
-
- * service-info.c (fill_service_apps): Implement
-
- * service-edit-dialog.c (store_data): Retrieve app info from
- option menu
-
- * file-types-capplet.c (apply_cb): Commit the changeset
- (main): Construct a changeset
- (edit_cb): Pass the changeset to service_info_new
-
- * service-info.c (set_string): Don't set the value if it is NULL
- (service_info_load): Store changeset in info structure
- (service_info_save): Don't require a changeset; use the one stored
- in the structure
-
- * service-edit-dialog.c (store_data): Call service_info_save
-
- * mime-edit-dialog.c (add_ext_cb): Terminate column list with -1
-
- * service-edit-dialog.c (store_data): Call service_info_update
-
- * mime-edit-dialog.c (store_data): Call mime_type_info_update
-
- * mime-type-info.c (mime_type_info_update): Implement. Updates the
- model with data from the structure
-
- * service-info.c (service_info_update): Implement. Updates the
- model with data from the structure
-
- * mime-type-info.c (form_extensions_string): Implement. Factor
- from mime_type_info_save
-
- * service-info.c (service_info_load): Accept model and iter rather
- than protocol name; read protocol name from model
-
- * mime-type-info.c (mime_type_info_load): Accept model and iter
- rather than mime type; read the mime type from the model
-
- * mime-types-model.c (get_icon_pixbuf): Make this public
-
- * service-edit-dialog.c (fill_dialog): Set the protocol entry
- insensitive if the protocol is already set; don't put unknown in
- the protocol entry
-
- * mime-types-model.c: Include gnome-vfs-mime-info.h
-
- * service-info.c (get_string): Call get_description_for_protocol
- if we are fetching the description and it is not in the changeset
-
- * mime-types-model.c (get_description_for_protocol): Make this
- public
-
- * service-edit-dialog.c (store_data): Implement
- (program_sensitive_cb): Implement
- (response_cb): Call store_data if response_id is OK
- (service_edit_dialog_init): Connect toggled signal on
- run_program_toggle to program_sensitive_cb
-
- * mime-type-info.h: Add #include gnome-vfs-mime-info.h
-
- * service-edit-dialog.c (populate_app_list): Implement
-
- * mime-edit-dialog.c (populate_component_list): Make sure custom
- menu item is shown
-
-2002-01-04 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Clean up
-
-2001-12-09 Havoc Pennington <hp@pobox.com>
-
- * file-types-capplet.c: remove no-longer-existing header
- gnome-vfs-mime-info.h so it compiles
-
- * file-types-capplet-dialogs.c: ditto
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * file-types-capplet.c: Port away from libcapplet.
-
- * file-types-capplet-dialogs.c: Don't include capplet-widget.h.
-
-Tue Dec 4 00:46:45 2001 Owen Taylor <otaylor@redhat.com>
-
- * file-types-icon-entry.h: Use G_BEGIN_DECLS/G_END_DECLS.
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-24 Chema Celorio <chema@celorio.com>
-
- * file-types-capplet.c (create_mime_list_and_scroller): add a usize
- the GUI sucks, we need to revisit the gui SOON !
-
-2001-07-22 Zbigniew Chyla <cyba@gnome.pl>
-
- * file-types.desktop.in.in:
- s/Name/_Name/
- s/Comment/_Comment/
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
diff --git a/capplets/file-types/Makefile.am b/capplets/file-types/Makefile.am
deleted file mode 100644
index ca3eece12..000000000
--- a/capplets/file-types/Makefile.am
+++ /dev/null
@@ -1,28 +0,0 @@
-SUBDIRS = libuuid
-
-bin_PROGRAMS = gnome-file-types-properties
-
-gnome_file_types_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(VFS_CAPPLET_LIBS) libuuid/libuuid.a -lpopt
-
-gnome_file_types_properties_SOURCES = \
- file-types-capplet.c \
- mime-types-model.c mime-types-model.h \
- model-entry.c model-entry.h \
- mime-type-info.c mime-type-info.h \
- mime-edit-dialog.c mime-edit-dialog.h \
- mime-category-edit-dialog.c mime-category-edit-dialog.h \
- service-info.c service-info.h \
- service-edit-dialog.c service-edit-dialog.h
-
-@INTLTOOL_DESKTOP_RULE@
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = file-types-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = file-types.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(VFS_CAPPLET_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(Glade_DATA) $(Desktop_in_files) $(Desktop_in_files)
diff --git a/capplets/file-types/TODO_NOTES b/capplets/file-types/TODO_NOTES
deleted file mode 100644
index 09c617973..000000000
--- a/capplets/file-types/TODO_NOTES
+++ /dev/null
@@ -1,2 +0,0 @@
- - Add categories to many types in MIME database
- - Better sorting on the MIME types tree
diff --git a/capplets/file-types/file-types-capplet.c b/capplets/file-types/file-types-capplet.c
deleted file mode 100644
index d58936154..000000000
--- a/capplets/file-types/file-types-capplet.c
+++ /dev/null
@@ -1,323 +0,0 @@
-/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
-
-/* file-types-capplet.h
- *
- * Copyright (C) 1998 Redhat Software Inc.
- * Copyright (C) 2000 Free Software Foundaton
- * Copyright (C) 2000 Eazel, Inc.
- * Copyright (C) 2002 Ximian, Inc.
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- *
- * Authors: Jonathan Blandford <jrb@redhat.com>,
- * Gene Z. Ragan <gzr@eazel.com>,
- * Bradford Hovinen <hovinen@ximian.com>
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <gnome.h>
-#include <glade/glade.h>
-#include <gconf/gconf-client.h>
-
-#include "capplet-util.h"
-#include "mime-types-model.h"
-#include "mime-edit-dialog.h"
-#include "mime-category-edit-dialog.h"
-#include "mime-type-info.h"
-#include "service-edit-dialog.h"
-#include "service-info.h"
-
-static void
-add_mime_cb (GtkButton *button, GladeXML *dialog)
-{
- GtkTreeView *treeview;
- GtkTreeModel *model;
- GObject *add_dialog;
-
- treeview = GTK_TREE_VIEW (WID ("mime_types_tree"));
- model = gtk_tree_view_get_model (treeview);
-
- add_dialog = mime_add_dialog_new (model,
- GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))),
- NULL);
-}
-
-static void
-add_service_cb (GtkButton *button, GladeXML *dialog)
-{
- GtkTreeView *treeview;
- GtkTreeModel *model;
-
- treeview = GTK_TREE_VIEW (WID ("mime_types_tree"));
- model = gtk_tree_view_get_model (treeview);
-
- service_add_dialog_new (model);
-}
-
-static GObject *
-launch_edit_dialog (GtkTreeModel *model, GtkTreeIter *iter)
-{
- ModelEntry *entry;
-
- entry = MODEL_ENTRY_FROM_ITER (iter);
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- return mime_edit_dialog_new (model, MIME_TYPE_INFO (entry));
-
- case MODEL_ENTRY_SERVICE:
- return service_edit_dialog_new (model, SERVICE_INFO (entry));
-
-#if 0
- case MODEL_ENTRY_CATEGORY:
- return mime_category_edit_dialog_new (model, MIME_CATEGORY_INFO (entry));
-#endif
-
- default:
- return NULL;
- }
-}
-
-static void
-edit_cb (GtkButton *button, GladeXML *dialog)
-{
- GtkTreeView *treeview;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
-
- treeview = GTK_TREE_VIEW (WID ("mime_types_tree"));
- selection = gtk_tree_view_get_selection (treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
-
- launch_edit_dialog (model, &iter);
-}
-
-static void
-row_activated_cb (GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *column, GladeXML *dialog)
-{
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- model = gtk_tree_view_get_model (view);
- gtk_tree_model_get_iter (model, &iter, path);
- launch_edit_dialog (model, &iter);
-}
-
-static void
-selection_count_cb (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gint *count)
-{
- if (MODEL_ENTRY_FROM_ITER (iter)->type != MODEL_ENTRY_SERVICES_CATEGORY &&
- MODEL_ENTRY_FROM_ITER (iter)->type != MODEL_ENTRY_CATEGORY)
- (*count)++;
-}
-
-static void
-selection_changed_cb (GtkTreeSelection *selection, GladeXML *dialog)
-{
- gint count = 0;
-
- gtk_tree_selection_selected_foreach (selection, (GtkTreeSelectionForeachFunc) selection_count_cb, &count);
-
- gtk_widget_set_sensitive (WID ("edit_button"), count != 0);
- gtk_widget_set_sensitive (WID ("remove_button"), count != 0);
-}
-
-static void
-remove_cb (GtkButton *button, GladeXML *dialog)
-{
- GtkTreeView *treeview;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- ModelEntry *entry;
- GtkWidget *warning_dialog;
- gint response;
-
- warning_dialog = gtk_message_dialog_new (
- GTK_WINDOW (WID("main_dialog")),
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK_CANCEL,
- _("Are you sure you want to permanently delete this entry?"));
-
- gtk_dialog_set_default_response (GTK_DIALOG (warning_dialog), GTK_RESPONSE_CANCEL);
- gtk_window_set_resizable (GTK_WINDOW (warning_dialog), FALSE);
- response = gtk_dialog_run (GTK_DIALOG (warning_dialog));
-
- if (response == GTK_RESPONSE_OK) {
- treeview = GTK_TREE_VIEW (WID ("mime_types_tree"));
- selection = gtk_tree_view_get_selection (treeview);
- gtk_tree_selection_get_selected (selection, &model, &iter);
- entry = MODEL_ENTRY_FROM_ITER (&iter);
-
- model_entry_remove_child (entry->parent, entry, model);
- model_entry_delete (entry);
- selection_changed_cb (selection, dialog);
- }
- gtk_widget_destroy (warning_dialog);
-}
-
-static void
-cb_file_type_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustdoc-7");
- else
- gtk_main_quit ();
-}
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
-
- GtkTreeModel *model;
-
- GtkWidget *treeview;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
- GtkTreeSelection *selection;
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/file-types-properties.glade", "main_dialog", NULL);
-
- model = GTK_TREE_MODEL (mime_types_model_new (FALSE));
- treeview = WID ("mime_types_tree");
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (treeview), model);
-
- /* Icon/description column */
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_resizable (column, TRUE);
- gtk_tree_view_column_set_title (column, _("Description"));
-
- renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_attributes
- (column, renderer, "pixbuf", MODEL_COLUMN_ICON, NULL);
-
- /* Description column */
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_attributes
- (column, renderer, "text", MODEL_COLUMN_DESCRIPTION, NULL);
- g_object_set (G_OBJECT (treeview),
- "search_column", MODEL_COLUMN_DESCRIPTION,
- NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
- gtk_tree_view_set_expander_column (GTK_TREE_VIEW (treeview), column);
-
- /* Extensions column */
- column = gtk_tree_view_column_new ();
- gtk_tree_view_column_set_resizable (column, TRUE);
- gtk_tree_view_column_set_title (column, _("Extensions"));
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_attributes
- (column, renderer, "text", MODEL_COLUMN_FILE_EXT, NULL);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeview), column);
-
- gtk_widget_set_sensitive (WID ("edit_button"), FALSE);
- gtk_widget_set_sensitive (WID ("remove_button"), FALSE);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- g_signal_connect (G_OBJECT (WID ("add_mime_button")), "clicked", (GCallback) add_mime_cb, dialog);
- g_signal_connect (G_OBJECT (WID ("add_service_button")), "clicked", (GCallback) add_service_cb, dialog);
- g_signal_connect (G_OBJECT (WID ("edit_button")), "clicked", (GCallback) edit_cb, dialog);
- g_signal_connect (G_OBJECT (WID ("remove_button")), "clicked", (GCallback) remove_cb, dialog);
- g_signal_connect (G_OBJECT (selection), "changed", (GCallback) selection_changed_cb, dialog);
-
- g_signal_connect (G_OBJECT (WID ("mime_types_tree")), "row-activated", (GCallback) row_activated_cb, dialog);
-
- g_signal_connect (G_OBJECT (WID ("main_dialog")),
- "response",
- G_CALLBACK (cb_file_type_dialog_response), NULL);
-
- return dialog;
-}
-
-static void
-dialog_done_cb (MimeEditDialog *dialog, gboolean done, MimeTypeInfo *info)
-{
- gtk_main_quit ();
-}
-
-
-int
-main (int argc, char **argv)
-{
- char const *mime_type = NULL;
- char const *file_name = NULL;
- GtkTreeModel *model;
- GnomeProgram *program;
- poptContext popt_ctxt = 0;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- program = gnome_program_init ("gnome-file-types-properties",
- VERSION, LIBGNOMEUI_MODULE,
- argc, argv,
- NULL);
- g_object_get (G_OBJECT (program),
- GNOME_PARAM_POPT_CONTEXT, &popt_ctxt,
- NULL);
-
- if (popt_ctxt) {
- const gchar **startup_files = poptGetArgs (popt_ctxt);
- if (startup_files != NULL) {
- mime_type = startup_files [0];
- if (mime_type != NULL)
- file_name = startup_files [1];
- }
- }
-
- if (mime_type == NULL) {
- GladeXML *dialog = create_dialog ();
- GtkWidget *mime_dialog = WID ("main_dialog");
- gtk_dialog_set_default_response (GTK_DIALOG (mime_dialog),
- GTK_RESPONSE_CLOSE);
- capplet_set_icon (mime_dialog, "gnome-ccmime.png");
- gtk_widget_show_all (mime_dialog);
- } else {
- MimeTypeInfo *info = NULL;
- GObject *mime_dialog;
-
- model = GTK_TREE_MODEL (mime_types_model_new (FALSE));
- if (strcmp (GNOME_VFS_MIME_TYPE_UNKNOWN, mime_type)) {
- info = mime_type_info_new (mime_type, model);
- mime_dialog = mime_edit_dialog_new (model, info);
- } else
- mime_dialog = mime_add_dialog_new (model, NULL, file_name);
- g_signal_connect (mime_dialog,
- "done", (GCallback) dialog_done_cb, info);
- }
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/file-types/file-types-capplet.desktop.in.in b/capplets/file-types/file-types-capplet.desktop.in.in
deleted file mode 100644
index 1c0b975d9..000000000
--- a/capplets/file-types/file-types-capplet.desktop.in.in
+++ /dev/null
@@ -1,11 +0,0 @@
-[Desktop Entry]
-_Name=File Types and Programs
-_Comment=Specify which programs are used to open or view each file type
-Icon=gnome-ccmime.png
-Exec=file-types-capplet
-Terminal=0
-Type=Application
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=mime-types
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/file-types/file-types-capplet.png b/capplets/file-types/file-types-capplet.png
deleted file mode 100644
index bfe643589..000000000
--- a/capplets/file-types/file-types-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/file-types/file-types-icon-entry.c b/capplets/file-types/file-types-icon-entry.c
deleted file mode 100644
index 88aef59d7..000000000
--- a/capplets/file-types/file-types-icon-entry.c
+++ /dev/null
@@ -1,618 +0,0 @@
-/* NautilusMimeIconEntry widget - Combo box with "Browse" button for files and
- * A pick button which can display a list of icons
- * in a current directory, the browse button displays
- * same dialog as pixmap-entry
- *
- * Copyright (C) 1998 The Free Software Foundation
- *
- * Author: George Lebl <jirka@5z.com>
- * icon selection based on original dentry-edit code which was:
- * Written by: Havoc Pennington, based on code by John Ellis.
- */
-#include <config.h>
-
-#include "file-types-icon-entry.h"
-
-#include <gdk_imlib.h>
-#include <gnome.h>
-#include <gtk/gtkbutton.h>
-#include <gtk/gtkdnd.h>
-#include <gtk/gtkentry.h>
-#include <gtk/gtkfilesel.h>
-#include <gtk/gtkframe.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtkmain.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtkpixmap.h>
-#include <gtk/gtkscrolledwindow.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include <string.h>
-#include <sys/stat.h>
-#include <unistd.h>
-
-
-
-static void nautilus_mime_type_icon_entry_class_init (GnomeIconEntryClass *class);
-static void nautilus_mime_type_icon_entry_init (NautilusMimeIconEntry *ientry);
-
-static GtkVBoxClass *parent_class;
-
-static GtkTargetEntry drop_types[] = { { "text/uri-list", 0, 0 } };
-
-GType
-nautilus_mime_type_icon_entry_get_type (void)
-{
- static GType icon_entry_type = 0;
-
- if (!icon_entry_type) {
- GtkTypeInfo icon_entry_info = {
- "NautilusMimeIconEntry",
- sizeof (NautilusMimeIconEntry),
- sizeof (GnomeIconEntryClass),
- (GtkClassInitFunc) nautilus_mime_type_icon_entry_class_init,
- (GtkObjectInitFunc) nautilus_mime_type_icon_entry_init,
- NULL,
- NULL
- };
-
- icon_entry_type = gtk_type_unique (gtk_vbox_get_type (),
- &icon_entry_info);
- }
-
- return icon_entry_type;
-}
-
-static void
-nautilus_mime_type_icon_entry_class_init (GnomeIconEntryClass *class)
-{
- parent_class = gtk_type_class (gtk_hbox_get_type ());
-}
-
-static void
-entry_changed(GtkWidget *widget, NautilusMimeIconEntry *ientry)
-{
- gchar *t;
- GtkWidget *child;
- int w,h;
-
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- t = gnome_file_entry_get_full_path(GNOME_FILE_ENTRY(ientry->fentry),
- FALSE);
-
- child = GTK_BIN(ientry->frame)->child;
-
- if(GNOME_IS_PIXMAP (child)) {
- gnome_pixmap_load_file (GNOME_PIXMAP(child), t);
- } else {
- if (child != NULL) {
- gtk_widget_destroy (child);
- }
-
- child = gnome_pixmap_new_from_file (t);
- gtk_widget_show (child);
- gtk_container_add (GTK_CONTAINER(ientry->frame), child);
-
- if(!GTK_WIDGET_NO_WINDOW(child)) {
- gtk_drag_source_set (child,
- GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,
- drop_types, 1,
- GDK_ACTION_COPY);
- }
- }
-
- /*gtk_drag_source_set (ientry->frame,
- GDK_BUTTON1_MASK|GDK_BUTTON3_MASK,
- drop_types, 1,
- GDK_ACTION_COPY);
- */
-}
-
-static void
-entry_activated(GtkWidget *widget, NautilusMimeIconEntry *ientry)
-{
- struct stat buf;
- GnomeIconSelection * gis;
- gchar *filename;
- GtkButton *OK_button;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_ENTRY (widget));
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- filename = gtk_entry_get_text (GTK_ENTRY (widget));
-
- if (!filename)
- return;
-
- stat (filename, &buf);
- if (S_ISDIR (buf.st_mode)) {
- gis = gtk_object_get_user_data(GTK_OBJECT(ientry));
- gnome_icon_selection_clear (gis, TRUE);
- gnome_icon_selection_add_directory (gis, filename);
-/* if (gis->file_list) */
- gnome_icon_selection_show_icons(gis);
- } else {
- /* FIXME: This is a hack to act exactly like we've clicked the
- * OK button. This should be structured more cleanly.
- */
- OK_button = GTK_BUTTON (GNOME_DIALOG (ientry->pick_dialog)->buttons->data);
- gtk_button_clicked (OK_button);
- }
-}
-
-static void
-setup_preview(GtkWidget *widget)
-{
- gchar *p;
- GList *l;
- GtkWidget *pp = NULL;
- int w,h;
- GtkWidget *frame;
- GtkFileSelection *fs;
-
- g_return_if_fail (widget != NULL);
- g_return_if_fail (GTK_IS_WIDGET (widget));
-
- frame = gtk_object_get_data(GTK_OBJECT(widget),"frame");
- fs = gtk_object_get_data(GTK_OBJECT(frame),"fs");
-
- if((l = gtk_container_children(GTK_CONTAINER(frame))) != NULL) {
- pp = l->data;
- g_list_free(l);
- }
-
- if(pp)
- gtk_widget_destroy(pp);
-
- p = gtk_file_selection_get_filename(fs);
- if(!p || !g_file_test (p,G_FILE_TEST_IS_SYMLINK|G_FILE_TEST_IS_REGULAR))
- return;
-
- pp = gnome_pixmap_new_from_file (p);
- gtk_widget_show(pp);
- gtk_container_add(GTK_CONTAINER(frame),pp);
-}
-
-static void
-ientry_destroy(NautilusMimeIconEntry *ientry)
-{
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- if(ientry->fentry)
- gtk_widget_unref (ientry->fentry);
- if(ientry->pick_dialog)
- gtk_widget_destroy(ientry->pick_dialog);
- g_free(ientry->pick_dialog_dir);
-}
-
-
-static void
-browse_clicked (GnomeFileEntry *fentry, NautilusMimeIconEntry *ientry)
-{
- GtkWidget *w;
- GtkWidget *hbox;
-
- GtkFileSelection *fs;
-
- g_return_if_fail (fentry != NULL);
- g_return_if_fail (GNOME_IS_FILE_ENTRY (fentry));
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- if(!fentry->fsw)
- return;
- fs = GTK_FILE_SELECTION(fentry->fsw);
-
- hbox = fs->file_list;
- do {
- hbox = hbox->parent;
- if(!hbox) {
- g_warning(_("Can't find an hbox, using a normal file "
- "selection"));
- return;
- }
- } while(!GTK_IS_HBOX(hbox));
-
- w = gtk_frame_new(_("Preview"));
- gtk_widget_show(w);
- gtk_box_pack_end(GTK_BOX(hbox),w,FALSE,FALSE,0);
- gtk_widget_set_usize(w,110,110);
- gtk_object_set_data(GTK_OBJECT(w),"fs",fs);
-
- gtk_object_set_data(GTK_OBJECT(fs->file_list),"frame",w);
- gtk_signal_connect(GTK_OBJECT(fs->file_list),"select_row",
- GTK_SIGNAL_FUNC(setup_preview),NULL);
- gtk_object_set_data(GTK_OBJECT(fs->selection_entry),"frame",w);
- gtk_signal_connect_while_alive(GTK_OBJECT(fs->selection_entry),
- "changed",
- GTK_SIGNAL_FUNC(setup_preview),NULL,
- GTK_OBJECT(fs));
-}
-
-static void
-cancel_pressed (GtkButton * button, NautilusMimeIconEntry * icon_entry)
-{
- GnomeIconSelection * gis;
-
- g_return_if_fail (icon_entry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (icon_entry));
-
- gis = gtk_object_get_user_data(GTK_OBJECT(icon_entry));
- gnome_icon_selection_stop_loading(gis);
-}
-
-
-void
-nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry *icon_entry)
-{
- GnomeFileEntry *fe;
- gchar *p;
- gchar *curfile, *filename;
- GtkWidget *tl;
-
- g_return_if_fail (icon_entry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (icon_entry));
-
- fe = GNOME_FILE_ENTRY (icon_entry->fentry);
- p = gnome_file_entry_get_full_path (fe, FALSE);
- curfile = nautilus_mime_type_icon_entry_get_full_filename (icon_entry);
-
- /* Are we part of a modal window? If so, we need to be modal too. */
- tl = gtk_widget_get_toplevel (GTK_WIDGET (icon_entry->frame));
-
- if (!p) {
- if (fe->default_path) {
- p = g_strdup (fe->default_path);
- } else {
- /* get around the g_free/free issue */
- gchar *cwd = g_get_current_dir ();
- p = g_strdup (cwd);
- g_free (cwd);
- }
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (icon_entry->fentry))),
- p);
- }
-
- /* figure out the directory */
- if (!g_file_test (p, G_FILE_TEST_IS_DIR)) {
- gchar *d;
- d = g_path_get_dirname (p);
- g_free (p);
- p = d;
- if (!g_file_test (p, G_FILE_TEST_IS_DIR)) {
- g_free (p);
- if (fe->default_path) {
- p = g_strdup (fe->default_path);
- } else {
- /*get around the g_free/free issue*/
- gchar *cwd = g_get_current_dir ();
- p = g_strdup (cwd);
- free(cwd);
- }
- gtk_entry_set_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (icon_entry->fentry))),
- p);
- g_return_if_fail (g_file_test (p,G_FILE_TEST_IS_DIR));
- }
- }
-
-
- if (icon_entry->pick_dialog == NULL || icon_entry->pick_dialog_dir == NULL ||
- strcmp(p, icon_entry->pick_dialog_dir) != 0) {
- GtkWidget *iconsel;
-
- if (icon_entry->pick_dialog) {
- gtk_container_remove (GTK_CONTAINER (icon_entry->fentry->parent), icon_entry->fentry);
- gtk_widget_destroy (icon_entry->pick_dialog);
- }
-
- g_free(icon_entry->pick_dialog_dir);
- icon_entry->pick_dialog_dir = NULL;
-
- icon_entry->pick_dialog_dir = p;
- icon_entry->pick_dialog =
- gnome_dialog_new("",
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- if (GTK_WINDOW (tl)->modal) {
- gtk_window_set_modal (GTK_WINDOW (icon_entry->pick_dialog), TRUE);
- gnome_dialog_set_parent (GNOME_DIALOG (icon_entry->pick_dialog), GTK_WINDOW (tl));
- }
- gnome_dialog_close_hides(GNOME_DIALOG(icon_entry->pick_dialog), TRUE);
- gnome_dialog_set_close (GNOME_DIALOG(icon_entry->pick_dialog), TRUE);
-
- gtk_window_set_policy(GTK_WINDOW(icon_entry->pick_dialog),
- TRUE, TRUE, TRUE);
-
- iconsel = gnome_icon_selection_new();
-
- gtk_object_set_user_data(GTK_OBJECT(icon_entry), iconsel);
-
- gnome_icon_selection_add_directory (GNOME_ICON_SELECTION(iconsel), icon_entry->pick_dialog_dir);
-
- gtk_window_set_title (GTK_WINDOW (icon_entry->pick_dialog), _("Select an icon"));
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (icon_entry->pick_dialog)->vbox),
- icon_entry->fentry, FALSE, FALSE, 0);
-
- gtk_box_pack_start(GTK_BOX(GNOME_DIALOG(icon_entry->pick_dialog)->vbox),
- iconsel, TRUE, TRUE, 0);
-
- gtk_widget_show_all(icon_entry->pick_dialog);
-
- gnome_icon_selection_show_icons(GNOME_ICON_SELECTION(iconsel));
-
- if(curfile)
- filename = g_path_get_basename(curfile);
-
- if(filename)
- gnome_icon_selection_select_icon(GNOME_ICON_SELECTION(iconsel),
- filename);
-
- /* FIXME:
- * OK button is handled by caller, Cancel button is handled here.
- * This could be cleaned up further.
- */
- gnome_dialog_button_connect(GNOME_DIALOG(icon_entry->pick_dialog),
- 1, /* Cancel button */
- GTK_SIGNAL_FUNC(cancel_pressed),
- icon_entry);
-
- } else {
- GnomeIconSelection *gis =
- gtk_object_get_user_data(GTK_OBJECT(icon_entry));
- if(!GTK_WIDGET_VISIBLE(icon_entry->pick_dialog))
- gtk_widget_show(icon_entry->pick_dialog);
- if(gis) {
- gnome_icon_selection_show_icons(gis);
- }
- }
-}
-
-gchar *
-nautilus_mime_type_icon_entry_get_relative_filename (NautilusMimeIconEntry *ientry)
-{
- char *filename;
- char *result;
- char **path_parts;
-
- result = NULL;
- filename = nautilus_mime_type_icon_entry_get_full_filename (NAUTILUS_MIME_ICON_ENTRY (ientry));
- if (filename != NULL) {
- path_parts = g_strsplit (filename, "/share/pixmaps/", 0);
- g_free (filename);
-
- if (path_parts[1] != NULL) {
- result = g_strdup (path_parts[1]);
- }
-
- g_strfreev (path_parts);
- }
-
- return result;
-}
-
-static void
-nautilus_mime_type_icon_entry_init (NautilusMimeIconEntry *ientry)
-{
- GtkWidget *w;
- gchar *p;
-
- gtk_box_set_spacing (GTK_BOX (ientry), 4);
-
- gtk_signal_connect(GTK_OBJECT(ientry),"destroy",
- GTK_SIGNAL_FUNC(ientry_destroy), NULL);
-
- ientry->pick_dialog = NULL;
- ientry->pick_dialog_dir = NULL;
-
- w = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_widget_show(w);
- gtk_box_pack_start (GTK_BOX (ientry), w, TRUE, TRUE, 0);
- ientry->frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (ientry->frame), GTK_SHADOW_IN);
- gtk_drag_dest_set (GTK_WIDGET (ientry->frame),
- GTK_DEST_DEFAULT_MOTION |
- GTK_DEST_DEFAULT_HIGHLIGHT |
- GTK_DEST_DEFAULT_DROP,
- drop_types, 1, GDK_ACTION_COPY);
-
- /*60x60 is just larger then default 48x48, though icon sizes
- are supposed to be selectable I guess*/
- gtk_widget_set_usize (ientry->frame,60,60);
- gtk_container_add (GTK_CONTAINER (w), ientry->frame);
- gtk_widget_show (ientry->frame);
-
- ientry->fentry = gnome_file_entry_new (NULL,NULL);
- gnome_file_entry_set_modal (GNOME_FILE_ENTRY (ientry->fentry), TRUE);
- gtk_widget_ref (ientry->fentry);
- gtk_signal_connect_after(GTK_OBJECT(ientry->fentry),"browse_clicked",
- GTK_SIGNAL_FUNC(browse_clicked),
- ientry);
-
- gtk_widget_show (ientry->fentry);
-
- p = gnome_pixmap_file (".");
- gnome_file_entry_set_default_path (GNOME_FILE_ENTRY(ientry->fentry), p);
- g_free (p);
-
- w = gnome_file_entry_gtk_entry(GNOME_FILE_ENTRY(ientry->fentry));
-/* gtk_signal_connect_while_alive(GTK_OBJECT(w), "changed",
- GTK_SIGNAL_FUNC(entry_changed),
- ientry, GTK_OBJECT(ientry));*/
- gtk_signal_connect_while_alive(GTK_OBJECT(w), "activate",
- GTK_SIGNAL_FUNC(entry_activated),
- ientry, GTK_OBJECT(ientry));
-
-
- /*just in case there is a default that is an image*/
- entry_changed(w,ientry);
-}
-
-/**
- * nautilus_mime_type_icon_entry_new:
- * @history_id: the id given to #gnome_entry_new
- * @browse_dialog_title: title of the browse dialog and icon selection dialog
- *
- * Description: Creates a new icon entry widget
- *
- * Returns: Returns the new object
- **/
-GtkWidget *
-nautilus_mime_type_icon_entry_new (const gchar *history_id, const gchar *browse_dialog_title)
-{
- NautilusMimeIconEntry *ientry;
- GtkWidget *gentry;
-
- ientry = gtk_type_new (nautilus_mime_type_icon_entry_get_type ());
-
- /* Keep in sync with gnome_entry_new() - or better yet,
- add a _construct() method once we are in development
- branch.
- */
-
- gentry = gnome_file_entry_gnome_entry(GNOME_FILE_ENTRY(ientry->fentry));
-
- gnome_entry_set_history_id (GNOME_ENTRY (gentry), history_id);
- /* gnome_entry_load_history (GNOME_ENTRY (gentry)); */
- gnome_file_entry_set_title (GNOME_FILE_ENTRY(ientry->fentry),
- browse_dialog_title);
-
- return GTK_WIDGET (ientry);
-}
-
-/**
- * nautilus_mime_type_icon_entry_gnome_file_entry:
- * @ientry: the NautilusMimeIconEntry to work with
- *
- * Description: Get the GnomeFileEntry widget that's part of the entry
- *
- * Returns: Returns GnomeFileEntry widget
- **/
-GtkWidget *
-nautilus_mime_type_icon_entry_gnome_file_entry (NautilusMimeIconEntry *ientry)
-{
- g_return_val_if_fail (ientry != NULL, NULL);
- g_return_val_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry), NULL);
-
- return ientry->fentry;
-}
-
-/**
- * nautilus_mime_type_icon_entry_gnome_entry:
- * @ientry: the NautilusMimeIconEntry to work with
- *
- * Description: Get the GnomeEntry widget that's part of the entry
- *
- * Returns: Returns GnomeEntry widget
- **/
-GtkWidget *
-nautilus_mime_type_icon_entry_gnome_entry (NautilusMimeIconEntry *ientry)
-{
- g_return_val_if_fail (ientry != NULL, NULL);
- g_return_val_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry), NULL);
-
- return gnome_file_entry_gnome_entry(GNOME_FILE_ENTRY(ientry->fentry));
-}
-
-/**
- * nautilus_mime_type_icon_entry_gtk_entry:
- * @ientry: the NautilusMimeIconEntry to work with
- *
- * Description: Get the GtkEntry widget that's part of the entry
- *
- * Returns: Returns GtkEntry widget
- **/
-GtkWidget *
-nautilus_mime_type_icon_entry_gtk_entry (NautilusMimeIconEntry *ientry)
-{
- g_return_val_if_fail (ientry != NULL, NULL);
- g_return_val_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry), NULL);
-
- return gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (ientry->fentry));
-}
-
-/**
- * nautilus_mime_type_icon_entry_set_pixmap_subdir:
- * @ientry: the NautilusMimeIconEntry to work with
- * @subdir: subdirectory
- *
- * Description: Sets the subdirectory below gnome's default
- * pixmap directory to use as the default path for the file
- * entry.
- *
- * Returns:
- **/
-void
-nautilus_mime_type_icon_entry_set_pixmap_subdir(NautilusMimeIconEntry *ientry, const gchar *subdir)
-{
- gchar *p;
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- if(!subdir)
- subdir = ".";
-
- p = gnome_pixmap_file (subdir);
- gnome_file_entry_set_default_path(GNOME_FILE_ENTRY(ientry->fentry),p);
- g_free(p);
-}
-
-/**
- * nautilus_mime_type_icon_entry_set_icon:
- * @ientry: the NautilusMimeIconEntry to work with
- * @filename: a filename
- *
- * Description: Sets the icon of NautilusMimeIconEntry to be the one pointed to by
- * @filename (in the current subdirectory).
- *
- * Returns:
- **/
-void
-nautilus_mime_type_icon_entry_set_icon (NautilusMimeIconEntry *ientry, const gchar *filename)
-{
- g_return_if_fail (ientry != NULL);
- g_return_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry));
-
- if(!filename) {
- filename = "";
- }
-
- gtk_entry_set_text (GTK_ENTRY (nautilus_mime_type_icon_entry_gtk_entry (ientry)), filename);
- entry_changed (NULL, ientry);
-}
-
-/**
- * nautilus_mime_type_icon_entry_get_full_filename:
- * @ientry: the NautilusMimeIconEntry to work with
- *
- * Description: Gets the file name of the image if it was possible
- * to load it into the preview. That is, it will only return a filename
- * if the image exists and it was possible to load it as an image.
- *
- * Returns: a newly allocated string with the path or %NULL if it
- * couldn't load the file
- **/
-gchar *
-nautilus_mime_type_icon_entry_get_full_filename (NautilusMimeIconEntry *ientry)
-{
- GtkWidget *child;
-
- g_return_val_if_fail (ientry != NULL,NULL);
- g_return_val_if_fail (NAUTILUS_MIME_IS_ICON_ENTRY (ientry),NULL);
-
- child = GTK_BIN(ientry->frame)->child;
-
- /* this happens if it doesn't exist or isn't an image */
- if (!GNOME_IS_PIXMAP (child)) {
- return NULL;
- }
-
- return gnome_file_entry_get_full_path(GNOME_FILE_ENTRY(ientry->fentry),
- TRUE);
-}
diff --git a/capplets/file-types/file-types-icon-entry.h b/capplets/file-types/file-types-icon-entry.h
deleted file mode 100644
index fe7811def..000000000
--- a/capplets/file-types/file-types-icon-entry.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* NautilusMimeIconEntry widget - Combo box with "Browse" button for files and
- * A pick button which can display a list of icons
- * in a current directory, the browse button displays
- * same dialog as pixmap-entry
- *
- * Copyright (C) 1998 The Free Software Foundation
- *
- * Author: George Lebl <jirka@5z.com>
- * icon selection based on original dentry-edit code which was:
- * Written by: Havoc Pennington, based on code by John Ellis.
- */
-
-#ifndef NAUTILUS_MIME_TYPE_ICON_ENTRY_H
-#define NAUTILUS_MIME_TYPE_ICON_ENTRY_H
-
-#include <gtk/gtkframe.h>
-#include <gtk/gtkvbox.h>
-#include <libgnomeui/gnome-file-entry.h>
-
-
-G_BEGIN_DECLS
-
-
-#define NAUTILUS_TYPE_MIME_ICON_ENTRY (nautilus_mime_type_icon_entry_get_type ())
-#define NAUTILUS_MIME_ICON_ENTRY(obj) (GTK_CHECK_CAST ((obj), NAUTILUS_TYPE_MIME_ICON_ENTRY, NautilusMimeIconEntry))
-#define NAUTILUS_MIME_ICON_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), NAUTILUS_TYPE_MIME_ICON_ENTRY, NautilusMimeIconEntryClass))
-#define NAUTILUS_MIME_IS_ICON_ENTRY(obj) (GTK_CHECK_TYPE ((obj), NAUTILUS_TYPE_MIME_ICON_ENTRY))
-#define NAUTILUS_MIME_IS_ICON_ENTRY_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), NAUTILUS_TYPE_MIME_ICON_ENTRY))
-
-
-typedef struct _NautilusMimeIconEntry NautilusMimeIconEntry;
-typedef struct _NautilusMimeIconEntryClass NautilusMimeIconEntryClass;
-
-struct _NautilusMimeIconEntry {
- GtkVBox vbox;
-
- GtkWidget *fentry;
- GtkWidget *frame;
-
- GtkWidget *pick_dialog;
- gchar *pick_dialog_dir;
-};
-
-struct _NautilusMimeIconEntryClass {
- GtkVBoxClass parent_class;
-};
-
-
-GType nautilus_mime_type_icon_entry_get_type (void);
-GtkWidget *nautilus_mime_type_icon_entry_new (const gchar *history_id,
- const gchar *browse_dialog_title);
-
-/*by default gnome_pixmap entry sets the default directory to the
- gnome pixmap directory, this will set it to a subdirectory of that,
- or one would use the file_entry functions for any other path*/
-void nautilus_mime_type_icon_entry_set_pixmap_subdir(NautilusMimeIconEntry *ientry,
- const gchar *subdir);
-void nautilus_mime_type_icon_entry_set_icon(NautilusMimeIconEntry *ientry,
- const gchar *filename);
-GtkWidget *nautilus_mime_type_icon_entry_gnome_file_entry(NautilusMimeIconEntry *ientry);
-GtkWidget *nautilus_mime_type_icon_entry_gnome_entry (NautilusMimeIconEntry *ientry);
-GtkWidget *nautilus_mime_type_icon_entry_gtk_entry (NautilusMimeIconEntry *ientry);
-
-/*only return a file if it was possible to load it with imlib*/
-gchar *nautilus_mime_type_icon_entry_get_full_filename (NautilusMimeIconEntry *ientry);
-gchar *nautilus_mime_type_icon_entry_get_relative_filename (NautilusMimeIconEntry *ientry);
-void nautilus_mime_type_show_icon_selection (NautilusMimeIconEntry * ientry);
-
-G_END_DECLS
-
-#endif
diff --git a/capplets/file-types/file-types-properties.glade b/capplets/file-types/file-types-properties.glade
deleted file mode 100644
index dda4996a8..000000000
--- a/capplets/file-types/file-types-properties.glade
+++ /dev/null
@@ -1,1470 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd" >
-
-<glade-interface>
- <requires lib="gnome" />
-
- <widget class="GtkDialog" id="main_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">File Types and Programs</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">no</property>
- <property name="default_width">500</property>
- <property name="default_height">400</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">yes</property>
- <property name="visible">no</property>
- <property name="has_separator">False</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="homogeneous">no</property>
- <property name="spacing">2</property>
- <property name="visible">yes</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">6</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="help_button">
- <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="close_button">
- <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="GtkHBox" id="prefs_widget">
- <property name="homogeneous">no</property>
- <property name="border_width">5</property>
- <property name="spacing">6</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkTreeView" id="mime_types_tree">
- <property name="can_focus">yes</property>
- <property name="headers-visible">yes</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="Placeholder" id="None">
- <property name="child_name">CTree:title</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="Placeholder" id="None">
- <property name="child_name">CTree:title</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="Placeholder" id="None">
- <property name="child_name">CTree:title</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child internal-child="hscrollbar">
- <widget class="GtkHScrollbar" id="convertwidget1">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child internal-child="vscrollbar">
- <widget class="GtkVScrollbar" id="convertwidget2">
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVButtonBox" id="vbuttonbox1">
- <property name="layout_style">GTK_BUTTONBOX_START</property>
- <property name="spacing">0</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="add_mime_button">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Add _File Type...</property>
- <property name="use_underline">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="add_service_button">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Add _Service...</property>
- <property name="use_underline">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="edit_button">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Edit...</property>
- <property name="use_underline">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="remove_button">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">_Remove</property>
- <property name="use_underline">yes</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
-
-
-<widget class="GtkDialog" id="edit_dialog">
- <property name="title" translatable="yes">Edit file type</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</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-vbox2">
- <property name="border_width">2</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <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">0</property>
-
- <child>
- <widget class="GtkButton" id="edit_apply_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="edit_close_button">
- <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">0</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="edit_widget">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GnomeIconEntry" id="icon_entry">
- <property name="visible">True</property>
- <property name="browse_dialog_title" translatable="yes">Browse icons</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="description_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="description_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Description:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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="mnemonic_widget">description_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="description_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="mime_type_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="mime_type_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_MIME type:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">mime_type_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="mime_type_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="category_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cate_gory:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">category_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="category_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="choose_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_hoose...</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">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="file_extensions_frame">
- <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="border_width">4</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">3</property>
- <property name="column_spacing">6</property>
- <property name="border_width">3</property>
-
- <child>
- <widget class="GtkLabel" id="add_ext_label">
- <property name="label" translatable="yes">_Add:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- <property name="use_underline">True</property>
- <property name="mnemonic_widget">new_ext_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="new_ext_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkButton" id="remove_ext_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow2">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="ext_list">
- <property name="can_focus">yes</property>
- <property name="headers-visible">no</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="child_name">CList:title</property>
- <property name="label" translatable="yes">label8</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Filename extensions:</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame3">
- <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="vbox2">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkHBox" id="component_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="component_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Viewer component:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">component_select</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="component_select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget5">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="default_action_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="default_action_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">D_efault action:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">default_action_select</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="default_action_select">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget6">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="program_entry_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">4</property>
-
- <child>
- <widget class="GtkLabel" id="program_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Program to run:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">program_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="program_entry">
- <property name="visible">True</property>
- <property name="max_saved">0</property>
- <property name="directory_entry">False</property>
- <property name="modal">True</property>
- <property name="use_filechooser">True"</property>
-
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkCheckButton" id="needs_terminal_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Run in _Terminal</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Actions</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">label_item</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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>
- </widget>
- </child>
-</widget>
-
- <widget class="GtkDialog" id="internet_service_dialog">
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">True</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">no</property>
- <property name="visible">no</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox4">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area4">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button10">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button11">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button12">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="service_edit_widget">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="description_label">
- <property name="label" translatable="yes">_Description:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">1</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">True</property>
- <property name="mnemonic_widget">description_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="description_entry">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="protocol_label">
- <property name="label" translatable="yes">_Protocol:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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">True</property>
- <property name="mnemonic_widget">protocol_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="protocol_entry">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
-<!--
-2002 Apr 21
- Bradford has disabled this in the capplet
- there is no point in having interface elements that don't do anything
-
- <child>
- <widget class="GtkRadioButton" id="look_at_content_toggle">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Look at content</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="run_program_toggle">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Run a program</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- <property name="group">look_at_content_toggle</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
--->
-
- <child>
- <widget class="GtkFrame" id="program_frame">
- <property name="label" translatable="yes">Program to Run</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkOptionMenu" id="program_select">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget7">
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="program_entry_box">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="custom_program_label">
- <property name="label" translatable="yes">P_rogram:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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">True</property>
- <property name="mnemonic_widget">custom_program_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="custom_program_entry">
- <property name="modal">True</property>
- <property name="directory_entry">no</property>
- <property name="visible">yes</property>
- <property name="use_filechooser">True</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="combo-entry2">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="needs_terminal_toggle">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Run in _Terminal</property>
- <property name="use_underline">True</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <widget class="GtkDialog" id="mime_category_edit_dialog">
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="modal">True</property>
- <property name="allow_shrink">no</property>
- <property name="allow_grow">no</property>
- <property name="visible">no</property>
- <property name="window-position">GTK_WIN_POS_NONE</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox5">
- <property name="homogeneous">no</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area5">
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">8</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkButton" id="button14">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-apply</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button15">
- <property name="can_default">yes</property>
- <property name="can_focus">yes</property>
- <property name="visible">yes</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">yes</property>
- <property name="use_underline">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="mime_category_edit_widget">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkHBox" id="name_box">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="name_label">
- <property name="label" translatable="yes">_Name:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</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">True</property>
- <property name="mnemonic_widget">name_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="name_entry">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFrame" id="frame4">
- <property name="label" translatable="yes">Actions</property>
- <property name="label_xalign">0</property>
- <property name="shadow">GTK_SHADOW_ETCHED_IN</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="border_width">4</property>
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkCheckButton" id="use_category_toggle">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Use parent category _defaults</property>
- <property name="use_underline">True</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="default_action_box">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="default_action_label">
- <property name="label" translatable="yes">Default _action:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="default_action_select">
- <property name="can_focus">yes</property>
- <property name="history">0</property>
- <property name="visible">yes</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget8">
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="program_entry_box">
- <property name="homogeneous">no</property>
- <property name="spacing">4</property>
- <property name="visible">yes</property>
-
- <child>
- <widget class="GtkLabel" id="program_label">
- <property name="label" translatable="yes">_Program to run:</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">no</property>
- <property name="xalign">0</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">True</property>
- <property name="mnemonic_widget">program_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="program_entry">
- <property name="modal">True</property>
- <property name="directory_entry">no</property>
- <property name="visible">yes</property>
- <property name="use_filechooser">True</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="entry2">
- <property name="can_focus">yes</property>
- <property name="editable">yes</property>
- <property name="text" translatable="yes"></property>
- <property name="max-length">0</property>
- <property name="visibility">yes</property>
- <property name="visible">yes</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="needs_terminal_toggle">
- <property name="can_focus">yes</property>
- <property name="label" translatable="yes">Run in _Terminal</property>
- <property name="use_underline">True</property>
- <property name="active">no</property>
- <property name="draw_indicator">yes</property>
- <property name="visible">yes</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">no</property>
- <property name="fill">no</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">4</property>
- <property name="expand">yes</property>
- <property name="fill">yes</property>
- </packing>
- </child>
- </widget>
-</glade-interface>
diff --git a/capplets/file-types/file-types-properties.glade1 b/capplets/file-types/file-types-properties.glade1
deleted file mode 100644
index 3b613bc45..000000000
--- a/capplets/file-types/file-types-properties.glade1
+++ /dev/null
@@ -1,1300 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>File-types-properties</name>
- <program_name>file-types-properties</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>main_dialog</name>
- <title>File types and Internet Services</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <default_width>500</default_width>
- <default_height>400</default_height>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>main_apply_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>main_close_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>prefs_widget</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow1</name>
- <hscrollbar_policy>GTK_POLICY_AUTOMATIC</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_ALWAYS</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkCTree</class>
- <name>mime_types_tree</name>
- <can_focus>True</can_focus>
- <columns>3</columns>
- <column_widths>80,80,80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>True</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>Placeholder</class>
- <child_name>CTree:title</child_name>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- <child_name>CTree:title</child_name>
- </widget>
-
- <widget>
- <class>Placeholder</class>
- <child_name>CTree:title</child_name>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVButtonBox</class>
- <name>vbuttonbox1</name>
- <layout_style>GTK_BUTTONBOX_START</layout_style>
- <spacing>10</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>add_mime_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add file type...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>add_service_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add service...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Edit...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>remove_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Remove</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>edit_dialog</name>
- <title>Edit file type</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area2</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>edit_apply_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit_close_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>edit_widget</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GnomeIconEntry</class>
- <name>icon_entry</name>
- <max_saved>10</max_saved>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>description_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>description_label</name>
- <label>Description</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>description_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>mime_type_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>mime_type_label</name>
- <label>MIME Type</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>mime_type_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>category_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>category_label</name>
- <label>Category</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>category_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>choose_button</name>
- <can_focus>True</can_focus>
- <label>Choose...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>file_extensions_frame</name>
- <label>Filename extensions</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>4</border_width>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>4</row_spacing>
- <column_spacing>4</column_spacing>
-
- <widget>
- <class>GtkButton</class>
- <name>add_ext_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Add</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>new_ext_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>remove_ext_button</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <label>Remove</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>scrolledwindow2</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>True</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkCList</class>
- <name>ext_list</name>
- <can_focus>True</can_focus>
- <columns>1</columns>
- <column_widths>80</column_widths>
- <selection_mode>GTK_SELECTION_SINGLE</selection_mode>
- <show_titles>False</show_titles>
- <shadow_type>GTK_SHADOW_IN</shadow_type>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>CList:title</child_name>
- <name>label8</name>
- <label>label8</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame3</name>
- <label>Actions</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox2</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>use_category_defaults_toggle</name>
- <can_focus>True</can_focus>
- <label>Use category defaults</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>component_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>component_label</name>
- <label>Viewing component</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>component_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>default_action_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>default_action_label</name>
- <label>Default action</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>default_action_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>program_entry_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>program_label</name>
- <label>Program to execute</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>program_entry</name>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>combo-entry1</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>needs_terminal_toggle</name>
- <can_focus>True</can_focus>
- <label>Needs terminal</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>internet_service_dialog</name>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area4</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button10</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button11</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button12</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>service_edit_widget</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox10</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>description_label</name>
- <label>Description</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>description_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox11</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>protocol_label</name>
- <label>Protocol name</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>protocol_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>look_at_content_toggle</name>
- <can_focus>True</can_focus>
- <label>Look at content</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>action_type</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>run_program_toggle</name>
- <can_focus>True</can_focus>
- <label>Run a program</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>action_type</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>program_frame</name>
- <label>Program to run</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox5</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>program_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>program_entry_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>custom_program_label</name>
- <label>Program</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>custom_program_entry</name>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>combo-entry2</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>needs_terminal_toggle</name>
- <can_focus>True</can_focus>
- <label>Needs terminal</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>mime_category_edit_dialog</name>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox5</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area5</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button14</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button15</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CLOSE</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>mime_category_edit_widget</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>name_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>name_label</name>
- <label>Name</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkEntry</class>
- <name>name_entry</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>frame4</name>
- <label>Actions</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox7</name>
- <border_width>4</border_width>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>use_category_toggle</name>
- <can_focus>True</can_focus>
- <label>Use parent category defaults</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>default_action_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>default_action_label</name>
- <label>Default action</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>default_action_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>program_entry_box</name>
- <homogeneous>False</homogeneous>
- <spacing>4</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>program_label</name>
- <label>Program to execute</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>program_entry</name>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>entry2</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkCheckButton</class>
- <name>needs_terminal_toggle</name>
- <can_focus>True</can_focus>
- <label>Needs terminal</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/capplets/file-types/file-types.desktop.in.in b/capplets/file-types/file-types.desktop.in.in
deleted file mode 100644
index e2151b781..000000000
--- a/capplets/file-types/file-types.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=File types and programs
-_Comment=Specify which programs are used to open or view each type of file
-Icon=gnome-ccmime
-Exec=gnome-file-types-properties
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;AdvancedSettings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=mime-types
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/file-types/libuuid/.cvsignore b/capplets/file-types/libuuid/.cvsignore
deleted file mode 100644
index 051d1bd50..000000000
--- a/capplets/file-types/libuuid/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-.deps
diff --git a/capplets/file-types/libuuid/Makefile.am b/capplets/file-types/libuuid/Makefile.am
deleted file mode 100644
index d3c503058..000000000
--- a/capplets/file-types/libuuid/Makefile.am
+++ /dev/null
@@ -1,27 +0,0 @@
-NULL =
-
-noinst_LIBRARIES = libuuid.a
-
-
-noinst_HEADERS = \
- uuid.h \
- uuidP.h \
- $(NULL)
-
-libuuid_a_SOURCES = \
- clear.c \
- compare.c \
- copy.c \
- gen_uuid.c \
- isnull.c \
- pack.c \
- parse.c \
- unpack.c \
- unparse.c \
- uuid_time.c \
- $(NULL)
-
-INCLUDES = \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- $(WERROR) \
- $(NULL)
diff --git a/capplets/file-types/libuuid/clear.c b/capplets/file-types/libuuid/clear.c
deleted file mode 100644
index 32e26d4fb..000000000
--- a/capplets/file-types/libuuid/clear.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * clear.c -- Clear a UUID
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include "string.h"
-
-#include "uuidP.h"
-
-void uuid_clear(uuid_t uu)
-{
- memset(uu, 0, 16);
-}
-
diff --git a/capplets/file-types/libuuid/compare.c b/capplets/file-types/libuuid/compare.c
deleted file mode 100644
index 3d07b5dbc..000000000
--- a/capplets/file-types/libuuid/compare.c
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * compare.c --- compare whether or not two UUID's are the same
- *
- * Returns 0 if the two UUID's are different, and 1 if they are the same.
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include "uuidP.h"
-#include <string.h>
-
-#define UUCMP(u1,u2) if (u1 != u2) return((u1 < u2) ? -1 : 1);
-
-int uuid_compare(uuid_t uu1, uuid_t uu2)
-{
- struct uuid uuid1, uuid2;
-
- uuid_unpack(uu1, &uuid1);
- uuid_unpack(uu2, &uuid2);
-
- UUCMP(uuid1.time_low, uuid2.time_low);
- UUCMP(uuid1.time_mid, uuid2.time_mid);
- UUCMP(uuid1.time_hi_and_version, uuid2.time_hi_and_version);
- UUCMP(uuid1.clock_seq, uuid2.clock_seq);
- return memcmp(uuid1.node, uuid2.node, 6);
-}
-
diff --git a/capplets/file-types/libuuid/copy.c b/capplets/file-types/libuuid/copy.c
deleted file mode 100644
index 5d0efc4aa..000000000
--- a/capplets/file-types/libuuid/copy.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/*
- * copy.c --- copy UUIDs
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include "uuidP.h"
-
-void uuid_copy(uuid_t uu1, uuid_t uu2)
-{
- unsigned char *cp1, *cp2;
- int i;
-
- for (i=0, cp1 = uu1, cp2 = uu2; i < 16; i++)
- *cp1++ = *cp2++;
-}
diff --git a/capplets/file-types/libuuid/gen_uuid.c b/capplets/file-types/libuuid/gen_uuid.c
deleted file mode 100644
index 0d08f356c..000000000
--- a/capplets/file-types/libuuid/gen_uuid.c
+++ /dev/null
@@ -1,265 +0,0 @@
-/*
- * gen_uuid.c --- generate a DCE-compatible uuid
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <config.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#include <stdlib.h>
-#include <string.h>
-#include <fcntl.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/stat.h>
-#include <sys/file.h>
-#include <sys/ioctl.h>
-#include <sys/socket.h>
-#ifdef HAVE_SYS_SOCKIO_H
-#include <sys/sockio.h>
-#endif
-#ifdef HAVE_NET_IF_H
-#include <net/if.h>
-#endif
-#ifdef HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-
-#include "uuidP.h"
-
-#ifdef HAVE_SRANDOM
-#define srand(x) srandom(x)
-#define rand() random()
-#endif
-
-/*
- * Generate a series of random bytes. Use /dev/urandom if possible,
- * and if not, use srandom/random.
- */
-static void get_random_bytes(void *buf, int nbytes)
-{
- static int fd = -2;
- int i;
- char *cp = (char *) buf;
-
- if (fd == -2) {
- fd = open("/dev/urandom", O_RDONLY);
- srand((getpid() << 16) ^ getuid() ^ time(0));
- }
- if (fd >= 0) {
- while (nbytes > 0) {
- i = read(fd, cp, nbytes);
- if (i < 0) {
- if ((errno == EINTR) || (errno == EAGAIN))
- continue;
- break;
- }
- nbytes -= i;
- cp += i;
- }
- }
- if (nbytes == 0)
- return;
-
- /* XXX put something better here if no /dev/random! */
- for (i=0; i < nbytes; i++)
- *cp++ = rand() & 0xFF;
- return;
-
-}
-
-/*
- * Get the ethernet hardware address, if we can find it...
- */
-static int get_node_id(unsigned char *node_id)
-{
-#ifdef HAVE_NET_IF_H
- int sd;
- struct ifreq ifr, *ifrp;
- struct ifconf ifc;
- char buf[1024];
- int n, i;
- unsigned char *a;
-
-/*
- * BSD 4.4 defines the size of an ifreq to be
- * max(sizeof(ifreq), sizeof(ifreq.ifr_name)+ifreq.ifr_addr.sa_len
- * However, under earlier systems, sa_len isn't present, so the size is
- * just sizeof(struct ifreq)
- */
-#ifdef HAVE_SA_LEN
-#ifndef max
-#define max(a,b) ((a) > (b) ? (a) : (b))
-#endif
-#define ifreq_size(i) max(sizeof(struct ifreq),\
- sizeof((i).ifr_name)+(i).ifr_addr.sa_len)
-#else
-#define ifreq_size(i) sizeof(struct ifreq)
-#endif /* HAVE_SA_LEN*/
-#ifdef AF_INET6
- sd = socket(AF_INET6, SOCK_DGRAM, IPPROTO_IP);
-
- /* If IPv6 fails then try with IPv4 socket. */
- if (sd < 0)
-#endif
- {
- sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
- if (sd < 0) {
- return -1;
- }
- }
-
- memset(buf, 0, sizeof(buf));
- ifc.ifc_len = sizeof(buf);
- ifc.ifc_buf = buf;
- if (ioctl (sd, SIOCGIFCONF, (char *)&ifc) < 0) {
- close(sd);
- return -1;
- }
- n = ifc.ifc_len;
- for (i = 0; i < n; i+= ifreq_size(*ifr) ) {
- ifrp = (struct ifreq *)((char *) ifc.ifc_buf+i);
- strncpy(ifr.ifr_name, ifrp->ifr_name, IFNAMSIZ);
-#ifdef SIOCGIFHWADDR
- if (ioctl(sd, SIOCGIFHWADDR, &ifr) < 0)
- continue;
- a = (unsigned char *) &ifr.ifr_hwaddr.sa_data;
-#else
-#ifdef SIOCGENADDR
- if (ioctl(sd, SIOCGENADDR, &ifr) < 0)
- continue;
- a = (unsigned char *) ifr.ifr_enaddr;
-#else
- /*
- * XXX we don't have a way of getting the hardware
- * address
- */
- close(sd);
- return 0;
-#endif /* SIOCGENADDR */
-#endif /* SIOCGIFHWADDR */
- if (!a[0] && !a[1] && !a[2] && !a[3] && !a[4] && !a[5])
- continue;
- if (node_id) {
- memcpy(node_id, a, 6);
- close(sd);
- return 1;
- }
- }
- close(sd);
-#endif
- return 0;
-}
-
-/* Assume that the gettimeofday() has microsecond granularity */
-#define MAX_ADJUSTMENT 10
-
-static int get_clock(guint32 *clock_high, guint32 *clock_low, guint16 *ret_clock_seq)
-{
- static int adjustment = 0;
- static struct timeval last = {0, 0};
- static guint16 clock_seq;
- struct timeval tv;
- unsigned long long clock_reg;
-
-try_again:
- gettimeofday(&tv, 0);
- if ((last.tv_sec == 0) && (last.tv_usec == 0)) {
- get_random_bytes(&clock_seq, sizeof(clock_seq));
- clock_seq &= 0x1FFF;
- last = tv;
- last.tv_sec--;
- }
- if ((tv.tv_sec < last.tv_sec) ||
- ((tv.tv_sec == last.tv_sec) &&
- (tv.tv_usec < last.tv_usec))) {
- clock_seq = (clock_seq+1) & 0x1FFF;
- adjustment = 0;
- } else if ((tv.tv_sec == last.tv_sec) &&
- (tv.tv_usec == last.tv_usec)) {
- if (adjustment >= MAX_ADJUSTMENT)
- goto try_again;
- adjustment++;
- } else
- adjustment = 0;
-
- clock_reg = tv.tv_usec*10 + adjustment;
- clock_reg += ((unsigned long long) tv.tv_sec)*10000000;
- clock_reg += (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
-
- *clock_high = clock_reg >> 32;
- *clock_low = clock_reg;
- *ret_clock_seq = clock_seq;
- return 0;
-}
-
-void uuid_generate_time(uuid_t out)
-{
- static unsigned char node_id[6];
- static int has_init = 0;
- struct uuid uu;
- guint32 clock_mid;
-
- if (!has_init) {
- if (get_node_id(node_id) <= 0) {
- get_random_bytes(node_id, 6);
- /*
- * Set multicast bit, to prevent conflicts
- * with IEEE 802 addresses obtained from
- * network cards
- */
- node_id[0] |= 0x80;
- }
- has_init = 1;
- }
- get_clock(&clock_mid, &uu.time_low, &uu.clock_seq);
- uu.clock_seq |= 0x8000;
- uu.time_mid = (guint16) clock_mid;
- uu.time_hi_and_version = (clock_mid >> 16) | 0x1000;
- memcpy(uu.node, node_id, 6);
- uuid_pack(&uu, out);
-}
-
-void uuid_generate_random(uuid_t out)
-{
- uuid_t buf;
- struct uuid uu;
-
- get_random_bytes(buf, sizeof(buf));
- uuid_unpack(buf, &uu);
-
- uu.clock_seq = (uu.clock_seq & 0x3FFF) | 0x8000;
- uu.time_hi_and_version = (uu.time_hi_and_version & 0x0FFF) | 0x4000;
- uuid_pack(&uu, out);
-}
-
-/*
- * This is the generic front-end to uuid_generate_random and
- * uuid_generate_time. It uses uuid_generate_random only if
- * /dev/urandom is available, since otherwise we won't have
- * high-quality randomness.
- */
-void uuid_generate(uuid_t out)
-{
- static int has_random = -1;
-
- if (has_random < 0) {
- if (access("/dev/urandom", R_OK) == 0)
- has_random = 1;
- else
- has_random = 0;
- }
- if (has_random)
- uuid_generate_random(out);
- else
- uuid_generate_time(out);
-}
-
diff --git a/capplets/file-types/libuuid/gen_uuid_nt.c b/capplets/file-types/libuuid/gen_uuid_nt.c
deleted file mode 100644
index 6092c070d..000000000
--- a/capplets/file-types/libuuid/gen_uuid_nt.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * gen_uuid_nt.c -- Use NT api to generate uuid
- *
- * Written by Andrey Shedel (andreys@ns.cr.cyco.com)
- */
-
-
-#include "uuidP.h"
-
-#pragma warning(push,4)
-
-#pragma comment(lib, "ntdll.lib")
-
-//
-// Here is a nice example why it's not a good idea
-// to use native API in ordinary applications.
-// Number of parameters in function below was changed from 3 to 4
-// for NT5.
-//
-//
-// NTSYSAPI
-// NTSTATUS
-// NTAPI
-// NtAllocateUuids(
-// OUT PULONG p1,
-// OUT PULONG p2,
-// OUT PULONG p3,
-// OUT PUCHAR Seed // 6 bytes
-// );
-//
-//
-
-unsigned long
-__stdcall
-NtAllocateUuids(
- void* p1, // 8 bytes
- void* p2, // 4 bytes
- void* p3 // 4 bytes
- );
-
-typedef
-unsigned long
-(__stdcall*
-NtAllocateUuids_2000)(
- void* p1, // 8 bytes
- void* p2, // 4 bytes
- void* p3, // 4 bytes
- void* seed // 6 bytes
- );
-
-
-
-//
-// Nice, but instead of including ntddk.h ot winnt.h
-// I should define it here because they MISSED __stdcall in those headers.
-//
-
-__declspec(dllimport)
-struct _TEB*
-__stdcall
-NtCurrentTeb(void);
-
-
-//
-// The only way to get version information from the system is to examine
-// one stored in PEB. But it's pretty dangerouse because this value could
-// be altered in image header.
-//
-
-static
-int
-Nt5(void)
-{
- //return NtCuttentTeb()->Peb->OSMajorVersion >= 5;
- return (int)*(int*)((char*)(int)(*(int*)((char*)NtCurrentTeb() + 0x30)) + 0xA4) >= 5;
-}
-
-
-
-
-void uuid_generate(uuid_t out)
-{
- if(Nt5())
- {
- unsigned char seed[6];
- ((NtAllocateUuids_2000)NtAllocateUuids)(out, ((char*)out)+8, ((char*)out)+12, &seed[0] );
- }
- else
- {
- NtAllocateUuids(out, ((char*)out)+8, ((char*)out)+12);
- }
-}
diff --git a/capplets/file-types/libuuid/isnull.c b/capplets/file-types/libuuid/isnull.c
deleted file mode 100644
index 43b81f879..000000000
--- a/capplets/file-types/libuuid/isnull.c
+++ /dev/null
@@ -1,25 +0,0 @@
-/*
- * isnull.c --- Check whether or not the UUID is null
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include "uuidP.h"
-
-/* Returns 1 if the uuid is the NULL uuid */
-int uuid_is_null(uuid_t uu)
-{
- unsigned char *cp;
- int i;
-
- for (i=0, cp = uu; i < 16; i++)
- if (*cp++)
- return 0;
- return 1;
-}
-
diff --git a/capplets/file-types/libuuid/pack.c b/capplets/file-types/libuuid/pack.c
deleted file mode 100644
index 94be488aa..000000000
--- a/capplets/file-types/libuuid/pack.c
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * Internal routine for packing UUID's
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <string.h>
-#include "uuidP.h"
-
-void uuid_pack(struct uuid *uu, uuid_t ptr)
-{
- guint32 tmp;
- unsigned char *out = ptr;
-
- tmp = uu->time_low;
- out[3] = (unsigned char) tmp;
- tmp >>= 8;
- out[2] = (unsigned char) tmp;
- tmp >>= 8;
- out[1] = (unsigned char) tmp;
- tmp >>= 8;
- out[0] = (unsigned char) tmp;
-
- tmp = uu->time_mid;
- out[5] = (unsigned char) tmp;
- tmp >>= 8;
- out[4] = (unsigned char) tmp;
-
- tmp = uu->time_hi_and_version;
- out[7] = (unsigned char) tmp;
- tmp >>= 8;
- out[6] = (unsigned char) tmp;
-
- tmp = uu->clock_seq;
- out[9] = (unsigned char) tmp;
- tmp >>= 8;
- out[8] = (unsigned char) tmp;
-
- memcpy(out+10, uu->node, 6);
-}
-
diff --git a/capplets/file-types/libuuid/parse.c b/capplets/file-types/libuuid/parse.c
deleted file mode 100644
index ea6ce7909..000000000
--- a/capplets/file-types/libuuid/parse.c
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * parse.c --- UUID parsing
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <ctype.h>
-#include <string.h>
-
-#include "uuidP.h"
-
-int uuid_parse(char *in, uuid_t uu)
-{
- struct uuid uuid;
- int i;
- char *cp, buf[3];
-
- if (strlen(in) != 36)
- return -1;
- for (i=0, cp = in; i <= 36; i++,cp++) {
- if ((i == 8) || (i == 13) || (i == 18) ||
- (i == 23))
- if (*cp == '-')
- continue;
- if (i== 36)
- if (*cp == 0)
- continue;
- if (!isxdigit((guchar) *cp))
- return -1;
- }
- uuid.time_low = strtoul(in, NULL, 16);
- uuid.time_mid = strtoul(in+9, NULL, 16);
- uuid.time_hi_and_version = strtoul(in+14, NULL, 16);
- uuid.clock_seq = strtoul(in+19, NULL, 16);
- cp = in+24;
- buf[2] = 0;
- for (i=0; i < 6; i++) {
- buf[0] = *cp++;
- buf[1] = *cp++;
- uuid.node[i] = strtoul(buf, NULL, 16);
- }
-
- uuid_pack(&uuid, uu);
- return 0;
-}
diff --git a/capplets/file-types/libuuid/tst_uuid.c b/capplets/file-types/libuuid/tst_uuid.c
deleted file mode 100644
index b9fc5f69a..000000000
--- a/capplets/file-types/libuuid/tst_uuid.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * tst_uuid.c --- test program from the UUID library
- *
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <stdio.h>
-#include <linux/ext2_fs.h>
-
-#include "uuid.h"
-
-int
-main(int argc, char **argv)
-{
- uuid_t buf, tst;
- char str[100];
- struct timeval tv;
- time_t time_reg;
- unsigned char *cp;
- int i;
- int failed = 0;
- int type, variant;
-
- uuid_generate(buf);
- uuid_unparse(buf, str);
- printf("UUID generate = %s\n", str);
- printf("UUID: ");
- for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
- printf("%02x", *cp++);
- }
- printf("\n");
- type = uuid_type(buf); variant = uuid_variant(buf);
- printf("UUID type = %d, UUID variant = %d\n", type, variant);
- if (variant != UUID_VARIANT_DCE) {
- printf("Incorrect UUID Variant; was expecting DCE!\n");
- failed++;
- }
- printf("\n");
-
- uuid_generate_random(buf);
- uuid_unparse(buf, str);
- printf("UUID random string = %s\n", str);
- printf("UUID: ");
- for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
- printf("%02x", *cp++);
- }
- printf("\n");
- type = uuid_type(buf); variant = uuid_variant(buf);
- printf("UUID type = %d, UUID variant = %d\n", type, variant);
- if (variant != UUID_VARIANT_DCE) {
- printf("Incorrect UUID Variant; was expecting DCE!\n");
- failed++;
- }
- if (type != 4) {
- printf("Incorrect UUID type; was expecting "
- "4 (random type)!\n");
- failed++;
- }
- printf("\n");
-
- uuid_generate_time(buf);
- uuid_unparse(buf, str);
- printf("UUID string = %s\n", str);
- printf("UUID time: ");
- for (i=0, cp = (unsigned char *) &buf; i < 16; i++) {
- printf("%02x", *cp++);
- }
- printf("\n");
- type = uuid_type(buf); variant = uuid_variant(buf);
- printf("UUID type = %d, UUID variant = %d\n", type, variant);
- if (variant != UUID_VARIANT_DCE) {
- printf("Incorrect UUID Variant; was expecting DCE!\n");
- failed++;
- }
- if (type != 1) {
- printf("Incorrect UUID type; was expecting "
- "1 (time-based type)!\\n");
- failed++;
- }
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- time_reg = uuid_time(buf, &tv);
- printf("UUID time is: (%d, %d): %s\n", tv.tv_sec, tv.tv_usec,
- ctime(&time_reg));
- uuid_parse(str, tst);
- if (!uuid_compare(buf, tst))
- printf("UUID parse and compare succeeded.\n");
- else {
- printf("UUID parse and compare failed!\n");
- failed++;
- }
- uuid_clear(tst);
- if (uuid_is_null(tst))
- printf("UUID clear and is null succeeded.\n");
- else {
- printf("UUID clear and is null failed!\n");
- failed++;
- }
- uuid_copy(buf, tst);
- if (!uuid_compare(buf, tst))
- printf("UUID copy and compare succeeded.\n");
- else {
- printf("UUID copy and compare failed!\n");
- failed++;
- }
- if (failed) {
- printf("%d failures.\n", failed);
- exit(1);
- }
- return 0;
-}
-
-
-
diff --git a/capplets/file-types/libuuid/unpack.c b/capplets/file-types/libuuid/unpack.c
deleted file mode 100644
index 8a80a9962..000000000
--- a/capplets/file-types/libuuid/unpack.c
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Internal routine for unpacking UUID
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <string.h>
-#include "uuidP.h"
-
-void uuid_unpack(uuid_t in, struct uuid *uu)
-{
- guint8 *ptr = in;
- guint32 tmp;
-
- tmp = *ptr++;
- tmp = (tmp << 8) | *ptr++;
- tmp = (tmp << 8) | *ptr++;
- tmp = (tmp << 8) | *ptr++;
- uu->time_low = tmp;
-
- tmp = *ptr++;
- tmp = (tmp << 8) | *ptr++;
- uu->time_mid = tmp;
-
- tmp = *ptr++;
- tmp = (tmp << 8) | *ptr++;
- uu->time_hi_and_version = tmp;
-
- tmp = *ptr++;
- tmp = (tmp << 8) | *ptr++;
- uu->clock_seq = tmp;
-
- memcpy(uu->node, ptr, 6);
-}
-
diff --git a/capplets/file-types/libuuid/unparse.c b/capplets/file-types/libuuid/unparse.c
deleted file mode 100644
index ab904bc16..000000000
--- a/capplets/file-types/libuuid/unparse.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * unparse.c -- convert a UUID to string
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <stdio.h>
-
-#include "uuidP.h"
-
-void uuid_unparse(uuid_t uu, char *out)
-{
- struct uuid uuid;
-
- uuid_unpack(uu, &uuid);
- sprintf(out,
- "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
- uuid.time_low, uuid.time_mid, uuid.time_hi_and_version,
- uuid.clock_seq >> 8, uuid.clock_seq & 0xFF,
- uuid.node[0], uuid.node[1], uuid.node[2],
- uuid.node[3], uuid.node[4], uuid.node[5]);
-}
-
diff --git a/capplets/file-types/libuuid/uuid.h b/capplets/file-types/libuuid/uuid.h
deleted file mode 100644
index 12afabffe..000000000
--- a/capplets/file-types/libuuid/uuid.h
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Public include file for the UUID library
- *
- * Copyright (C) 1996, 1997, 1998 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-typedef unsigned char uuid_t[16];
-
-/* UUID Variant definitions */
-#define UUID_VARIANT_NCS 0
-#define UUID_VARIANT_DCE 1
-#define UUID_VARIANT_MICROSOFT 2
-#define UUID_VARIANT_OTHER 3
-
-/* clear.c */
-void uuid_clear(uuid_t uu);
-
-/* compare.c */
-int uuid_compare(uuid_t uu1, uuid_t uu2);
-
-/* copy.c */
-void uuid_copy(uuid_t uu1, uuid_t uu2);
-
-/* gen_uuid.c */
-void uuid_generate(uuid_t out);
-void uuid_generate_random(uuid_t out);
-void uuid_generate_time(uuid_t out);
-
-/* isnull.c */
-int uuid_is_null(uuid_t uu);
-
-/* parse.c */
-int uuid_parse(char *in, uuid_t uu);
-
-/* unparse.c */
-void uuid_unparse(uuid_t uu, char *out);
-
-/* uuid_time.c */
-time_t uuid_time(uuid_t uu, struct timeval *ret_tv);
-int uuid_type(uuid_t uu);
-int uuid_variant(uuid_t uu);
diff --git a/capplets/file-types/libuuid/uuidP.h b/capplets/file-types/libuuid/uuidP.h
deleted file mode 100644
index 995db687c..000000000
--- a/capplets/file-types/libuuid/uuidP.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * uuid.h -- private header file for uuids
- *
- * Copyright (C) 1996, 1997 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <sys/types.h>
-#include <glib.h>
-
-#include "uuid.h"
-
-/*
- * Offset between 15-Oct-1582 and 1-Jan-70
- */
-#define TIME_OFFSET_HIGH 0x01B21DD2
-#define TIME_OFFSET_LOW 0x13814000
-
-struct uuid {
- guint32 time_low;
- guint16 time_mid;
- guint16 time_hi_and_version;
- guint16 clock_seq;
- guint8 node[6];
-};
-
-
-/*
- * prototypes
- */
-void uuid_pack(struct uuid *uu, uuid_t ptr);
-void uuid_unpack(uuid_t in, struct uuid *uu);
-
-
-
-
diff --git a/capplets/file-types/libuuid/uuid_time.c b/capplets/file-types/libuuid/uuid_time.c
deleted file mode 100644
index 9a302202a..000000000
--- a/capplets/file-types/libuuid/uuid_time.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- * uuid_time.c --- Interpret the time field from a uuid. This program
- * violates the UUID abstraction barrier by reaching into the guts
- * of a UUID and interpreting it.
- *
- * Copyright (C) 1998, 1999 Theodore Ts'o.
- *
- * %Begin-Header%
- * This file may be redistributed under the terms of the GNU Public
- * License.
- * %End-Header%
- */
-
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/time.h>
-#include <time.h>
-
-#include "uuidP.h"
-
-time_t uuid_time(uuid_t uu, struct timeval *ret_tv)
-{
- struct uuid uuid;
- guint32 high;
- struct timeval tv;
- unsigned long long clock_reg;
-
- uuid_unpack(uu, &uuid);
-
- high = uuid.time_mid | ((uuid.time_hi_and_version & 0xFFF) << 16);
- clock_reg = uuid.time_low | ((unsigned long long) high << 32);
-
- clock_reg -= (((unsigned long long) 0x01B21DD2) << 32) + 0x13814000;
- tv.tv_sec = clock_reg / 10000000;
- tv.tv_usec = (clock_reg % 10000000) / 10;
-
- if (ret_tv)
- *ret_tv = tv;
-
- return tv.tv_sec;
-}
-
-int uuid_type(uuid_t uu)
-{
- struct uuid uuid;
-
- uuid_unpack(uu, &uuid);
- return ((uuid.time_hi_and_version >> 12) & 0xF);
-}
-
-int uuid_variant(uuid_t uu)
-{
- struct uuid uuid;
- int var;
-
- uuid_unpack(uu, &uuid);
- var = uuid.clock_seq;
-
- if ((var & 0x8000) == 0)
- return UUID_VARIANT_NCS;
- if ((var & 0x4000) == 0)
- return UUID_VARIANT_DCE;
- if ((var & 0x2000) == 0)
- return UUID_VARIANT_MICROSOFT;
- return UUID_VARIANT_OTHER;
-}
-
-#ifdef DEBUG
-static const char *variant_string(int variant)
-{
- switch (variant) {
- case UUID_VARIANT_NCS:
- return "NCS";
- case UUID_VARIANT_DCE:
- return "DCE";
- case UUID_VARIANT_MICROSOFT:
- return "Microsoft";
- default:
- return "Other";
- }
-}
-
-
-int
-main(int argc, char **argv)
-{
- uuid_t buf;
- time_t time_reg;
- struct timeval tv;
- int type, variant;
-
- if (argc != 2) {
- fprintf(stderr, "Usage: %s uuid\n", argv[0]);
- exit(1);
- }
- if (uuid_parse(argv[1], buf)) {
- fprintf(stderr, "Invalid UUID: %s\n", argv[1]);
- exit(1);
- }
- variant = uuid_variant(buf);
- type = uuid_type(buf);
- time_reg = uuid_time(buf, &tv);
-
- printf("UUID variant is %d (%s)\n", variant, variant_string(variant));
- if (variant != UUID_VARIANT_DCE) {
- printf("Warning: This program only knows how to interpret "
- "DCE UUIDs.\n\tThe rest of the output is likely "
- "to be incorrect!!\n");
- }
- printf("UUID type is %d", type);
- switch (type) {
- case 1:
- printf(" (time based)\n");
- break;
- case 2:
- printf(" (DCE)\n");
- break;
- case 3:
- printf(" (name-based)\n");
- break;
- case 4:
- printf(" (random)\n");
- break;
- default:
- printf("\n");
- }
- if (type != 1) {
- printf("Warning: not a time-based UUID, so UUID time "
- "decoding will likely not work!\n");
- }
- printf("UUID time is: (%u, %u): %s\n", (unsigned)tv.tv_sec, (unsigned)tv.tv_usec,
- ctime(&time_reg));
-
- return 0;
-}
-#endif
diff --git a/capplets/file-types/mime-category-edit-dialog.c b/capplets/file-types/mime-category-edit-dialog.c
deleted file mode 100644
index 3604f45f3..000000000
--- a/capplets/file-types/mime-category-edit-dialog.c
+++ /dev/null
@@ -1,449 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-category-edit-dialog.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-application-registry.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include "mime-types-model.h"
-#include "mime-type-info.h"
-#include "mime-category-edit-dialog.h"
-#include "mime-edit-dialog.h"
-
-#define WID(x) (glade_xml_get_widget (dialog->p->dialog_xml, x))
-
-enum {
- PROP_0,
- PROP_MODEL,
- PROP_INFO
-};
-
-struct _MimeCategoryEditDialogPrivate
-{
- GladeXML *dialog_xml;
- GtkWidget *dialog_win;
- MimeCategoryInfo *info;
-
- GtkTreeModel *model;
-
- gboolean default_action_active : 1;
- gboolean custom_action : 1;
- gboolean use_cat_dfl : 1;
-};
-
-static GObjectClass *parent_class;
-
-static void mime_category_edit_dialog_init (MimeCategoryEditDialog *dialog,
- MimeCategoryEditDialogClass *class);
-static void mime_category_edit_dialog_class_init (MimeCategoryEditDialogClass *class);
-static void mime_category_edit_dialog_base_init (MimeCategoryEditDialogClass *class);
-
-static void mime_category_edit_dialog_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void mime_category_edit_dialog_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void mime_category_edit_dialog_dispose (GObject *object);
-static void mime_category_edit_dialog_finalize (GObject *object);
-
-static void populate_application_list (MimeCategoryEditDialog *dialog);
-
-static void fill_dialog (MimeCategoryEditDialog *dialog);
-static void store_data (MimeCategoryEditDialog *dialog);
-
-static void default_action_changed_cb (MimeCategoryEditDialog *dialog);
-static void use_category_toggled_cb (MimeCategoryEditDialog *dialog,
- GtkToggleButton *tb);
-static void response_cb (MimeCategoryEditDialog *dialog,
- gint response_id);
-
-static void update_sensitivity (MimeCategoryEditDialog *dialog);
-
-GType
-mime_category_edit_dialog_get_type (void)
-{
- static GType mime_category_edit_dialog_type = 0;
-
- if (!mime_category_edit_dialog_type) {
- GTypeInfo mime_category_edit_dialog_info = {
- sizeof (MimeCategoryEditDialogClass),
- (GBaseInitFunc) mime_category_edit_dialog_base_init,
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) mime_category_edit_dialog_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (MimeCategoryEditDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mime_category_edit_dialog_init,
- NULL
- };
-
- mime_category_edit_dialog_type =
- g_type_register_static (G_TYPE_OBJECT,
- "MimeCategoryEditDialog",
- &mime_category_edit_dialog_info, 0);
- }
-
- return mime_category_edit_dialog_type;
-}
-
-static void
-mime_category_edit_dialog_init (MimeCategoryEditDialog *dialog, MimeCategoryEditDialogClass *class)
-{
- GtkSizeGroup *size_group;
-
- dialog->p = g_new0 (MimeCategoryEditDialogPrivate, 1);
- dialog->p->dialog_xml = glade_xml_new
- (GNOMECC_DATA_DIR "/interfaces/file-types-properties.glade", "mime_category_edit_widget", NULL);
-
- dialog->p->model = NULL;
- dialog->p->info = NULL;
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("default_action_label"));
- gtk_size_group_add_widget (size_group, WID ("program_label"));
-
- gtk_widget_set_sensitive (WID ("name_box"), FALSE);
-
- dialog->p->dialog_win = gtk_dialog_new_with_buttons
- (_("Edit file category"), NULL, -1,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->p->dialog_win)->vbox), WID ("mime_category_edit_widget"), TRUE, TRUE, 0);
-
- g_signal_connect_swapped (G_OBJECT (WID ("default_action_select")), "changed", (GCallback) default_action_changed_cb, dialog);
- g_signal_connect_swapped (G_OBJECT (WID ("use_category_toggle")), "toggled",
- (GCallback) use_category_toggled_cb, dialog);
-
- g_signal_connect_swapped (G_OBJECT (dialog->p->dialog_win), "response", (GCallback) response_cb, dialog);
-}
-
-static void
-mime_category_edit_dialog_base_init (MimeCategoryEditDialogClass *class)
-{
-}
-
-static void
-mime_category_edit_dialog_class_init (MimeCategoryEditDialogClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->dispose = mime_category_edit_dialog_dispose;
- object_class->finalize = mime_category_edit_dialog_finalize;
- object_class->set_property = mime_category_edit_dialog_set_prop;
- object_class->get_property = mime_category_edit_dialog_get_prop;
-
- g_object_class_install_property
- (object_class, PROP_MODEL,
- g_param_spec_pointer ("model",
- _("Model"),
- _("GtkTreeModel that contains the category data"),
- G_PARAM_READWRITE));
- g_object_class_install_property
- (object_class, PROP_INFO,
- g_param_spec_pointer ("mime-cat-info",
- _("MIME category info"),
- _("Structure containing information on the MIME category"),
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- parent_class = G_OBJECT_CLASS
- (g_type_class_ref (G_TYPE_OBJECT));
-}
-
-static void
-mime_category_edit_dialog_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- MimeCategoryEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_CATEGORY_EDIT_DIALOG (object));
-
- dialog = MIME_CATEGORY_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- dialog->p->model = g_value_get_pointer (value);
-
- if (dialog->p->info != NULL)
- fill_dialog (dialog);
-
- break;
-
- case PROP_INFO:
- dialog->p->info = g_value_get_pointer (value);
-
- if (dialog->p->model != NULL)
- fill_dialog (dialog);
-
- break;
-
- default:
- g_warning ("Bad property set");
- break;
- }
-}
-
-static void
-mime_category_edit_dialog_get_prop (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- MimeCategoryEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_CATEGORY_EDIT_DIALOG (object));
-
- dialog = MIME_CATEGORY_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- g_value_set_pointer (value, dialog->p->model);
- break;
-
- case PROP_INFO:
- g_value_set_pointer (value, dialog->p->info);
- break;
-
- default:
- g_warning ("Bad property get");
- break;
- }
-}
-
-static void
-mime_category_edit_dialog_dispose (GObject *object)
-{
- MimeCategoryEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_CATEGORY_EDIT_DIALOG (object));
-
- dialog = MIME_CATEGORY_EDIT_DIALOG (object);
-
- if (dialog->p->dialog_xml != NULL) {
- g_object_unref (G_OBJECT (dialog->p->dialog_xml));
- dialog->p->dialog_xml = NULL;
- }
-
- if (dialog->p->dialog_win != NULL) {
- gtk_widget_destroy (GTK_WIDGET (dialog->p->dialog_win));
- dialog->p->dialog_win = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-mime_category_edit_dialog_finalize (GObject *object)
-{
- MimeCategoryEditDialog *mime_category_edit_dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_CATEGORY_EDIT_DIALOG (object));
-
- mime_category_edit_dialog = MIME_CATEGORY_EDIT_DIALOG (object);
-
- g_free (mime_category_edit_dialog->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GObject *
-mime_category_edit_dialog_new (GtkTreeModel *model, MimeCategoryInfo *info)
-{
- return g_object_new (mime_category_edit_dialog_get_type (),
- "model", model,
- "mime-cat-info", info,
- NULL);
-}
-
-static void
-fill_dialog (MimeCategoryEditDialog *dialog)
-{
- mime_category_info_load_all (dialog->p->info);
-
- gtk_entry_set_text (GTK_ENTRY (WID ("name_entry")), dialog->p->info->description);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("use_category_toggle")), dialog->p->info->use_parent_category);
-
- if (dialog->p->info->entry.parent->type == MODEL_ENTRY_NONE)
- gtk_widget_set_sensitive (WID ("use_category_toggle"), FALSE);
-
- populate_application_list (dialog);
-
- gtk_widget_show_all (dialog->p->dialog_win);
-}
-
-/* FIXME: This should be factored with corresponding functions in mime-edit-dialog.c and service-edit-dialog.c */
-
-static void
-populate_application_list (MimeCategoryEditDialog *dialog)
-{
- GList *app_list, *tmp;
- GtkMenu *menu;
- GtkWidget *menu_item;
- GtkOptionMenu *app_select;
- GnomeVFSMimeApplication *app;
- int found_idx = -1, i;
-
- menu = GTK_MENU (gtk_menu_new ());
-
- app_list = mime_category_info_find_apps (dialog->p->info);
-
- for (tmp = app_list, i = 0; tmp != NULL; tmp = tmp->next, i++) {
- app = gnome_vfs_application_registry_get_mime_application (tmp->data);
- if (dialog->p->info->default_action != NULL &&
- dialog->p->info->default_action->id != NULL &&
- !strcmp (tmp->data, dialog->p->info->default_action->id))
- found_idx = i;
-
- menu_item = gtk_menu_item_new_with_label (app->name);
-
- /* Store copy of application in item; free when item destroyed. */
- g_object_set_data_full (G_OBJECT (menu_item),
- "app", app,
- (GDestroyNotify) gnome_vfs_mime_application_free);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
- }
-
- dialog->p->default_action_active = !(i == 0);
- dialog->p->custom_action = (found_idx < 0);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new_with_label (_("Custom")));
-
- if (found_idx < 0) {
- gboolean req_terminal = FALSE;
- found_idx = i;
- if (dialog->p->info->default_action != NULL) {
- if (dialog->p->info->default_action->command != NULL)
- gnome_file_entry_set_filename (GNOME_FILE_ENTRY (WID ("program_entry")),
- dialog->p->info->default_action->command);
- req_terminal = dialog->p->info->default_action->requires_terminal;
- }
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("needs_terminal_toggle")),
- req_terminal);
- } else {
- gtk_widget_set_sensitive (WID ("program_entry_box"), FALSE);
- }
-
- app_select = GTK_OPTION_MENU (WID ("default_action_select"));
- gtk_option_menu_set_menu (app_select, GTK_WIDGET (menu));
- gtk_option_menu_set_history (app_select, found_idx);
-
- g_list_free (app_list);
-
- update_sensitivity (dialog);
-}
-
-static void
-update_subcategories (ModelEntry *entry, MimeCategoryInfo *category)
-{
- ModelEntry *tmp;
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- if (MIME_TYPE_INFO (entry)->use_category) {
- gnome_vfs_mime_application_free (MIME_TYPE_INFO (entry)->default_action);
-
- if (category->default_action == NULL)
- MIME_TYPE_INFO (entry)->default_action = NULL;
- else
- MIME_TYPE_INFO (entry)->default_action = gnome_vfs_mime_application_copy (category->default_action);
- }
-
- break;
-
- case MODEL_ENTRY_CATEGORY:
- if (entry == MODEL_ENTRY (category) || MIME_CATEGORY_INFO (entry)->use_parent_category)
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next)
- update_subcategories (tmp, category);
- break;
-
- default:
- break;
- }
-}
-
-static void
-store_data (MimeCategoryEditDialog *dialog)
-{
- mime_edit_dialog_get_app (dialog->p->dialog_xml,
- dialog->p->info->description,
- &(dialog->p->info->default_action));
- dialog->p->info->use_parent_category = gtk_toggle_button_get_active (
- GTK_TOGGLE_BUTTON (WID ("use_category_toggle")));
- model_entry_save (MODEL_ENTRY (dialog->p->info));
- update_subcategories (MODEL_ENTRY (dialog->p->info), dialog->p->info);
-}
-
-static void
-default_action_changed_cb (MimeCategoryEditDialog *dialog)
-{
- int id;
- GtkOptionMenu *option_menu;
- GtkMenuShell *menu;
-
- option_menu = GTK_OPTION_MENU (WID ("default_action_select"));
- menu = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu));
- id = gtk_option_menu_get_history (option_menu);
-
- dialog->p->custom_action = (id == g_list_length (menu->children) - 1);
- update_sensitivity (dialog);
-}
-
-static void
-use_category_toggled_cb (MimeCategoryEditDialog *dialog, GtkToggleButton *tb)
-{
- dialog->p->use_cat_dfl = gtk_toggle_button_get_active (tb);
- update_sensitivity (dialog);
-}
-
-static void
-response_cb (MimeCategoryEditDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_OK)
- store_data (dialog);
-
- g_object_unref (G_OBJECT (dialog));
-}
-
-static void
-update_sensitivity (MimeCategoryEditDialog *dialog)
-{
- gtk_widget_set_sensitive (WID ("default_action_box"), dialog->p->default_action_active && !dialog->p->use_cat_dfl);
- gtk_widget_set_sensitive (WID ("program_entry_box"), dialog->p->custom_action && !dialog->p->use_cat_dfl);
- gtk_widget_set_sensitive (WID ("needs_terminal_toggle"), dialog->p->custom_action && !dialog->p->use_cat_dfl);
-}
diff --git a/capplets/file-types/mime-category-edit-dialog.h b/capplets/file-types/mime-category-edit-dialog.h
deleted file mode 100644
index 0718525c8..000000000
--- a/capplets/file-types/mime-category-edit-dialog.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-category-edit-dialog.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __MIME_CATEGORY_EDIT_DIALOG_H
-#define __MIME_CATEGORY_EDIT_DIALOG_H
-
-#include <gnome.h>
-
-
-G_BEGIN_DECLS
-
-#define MIME_CATEGORY_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mime_category_edit_dialog_get_type (), MimeCategoryEditDialog)
-#define MIME_CATEGORY_EDIT_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mime_category_edit_dialog_get_type (), MimeCategoryEditDialogClass)
-#define IS_MIME_CATEGORY_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mime_category_edit_dialog_get_type ())
-
-typedef struct _MimeCategoryEditDialog MimeCategoryEditDialog;
-typedef struct _MimeCategoryEditDialogClass MimeCategoryEditDialogClass;
-typedef struct _MimeCategoryEditDialogPrivate MimeCategoryEditDialogPrivate;
-
-struct _MimeCategoryEditDialog
-{
- GObject parent;
-
- MimeCategoryEditDialogPrivate *p;
-};
-
-struct _MimeCategoryEditDialogClass
-{
- GObjectClass g_object_class;
-};
-
-GType mime_category_edit_dialog_get_type (void);
-
-GObject *mime_category_edit_dialog_new (GtkTreeModel *model,
- MimeCategoryInfo *info);
-
-G_END_DECLS
-
-#endif /* __MIME_CATEGORY_EDIT_DIALOG_H */
diff --git a/capplets/file-types/mime-edit-dialog.c b/capplets/file-types/mime-edit-dialog.c
deleted file mode 100644
index c0adfbbea..000000000
--- a/capplets/file-types/mime-edit-dialog.c
+++ /dev/null
@@ -1,1000 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-edit-dialog.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-#include <libgnomevfs/gnome-vfs-application-registry.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-
-#include "capplet-util.h"
-#include "mime-edit-dialog.h"
-#include "mime-types-model.h"
-
-#include "libuuid/uuid.h"
-
-#undef WID
-#define WID(x) (glade_xml_get_widget (dialog->p->dialog_xml, x))
-
-enum {
- DONE,
- LAST_SIGNAL
-};
-
-enum {
- PROP_0,
- PROP_MODEL,
- PROP_INFO,
- PROP_IS_ADD
-};
-
-struct _MimeEditDialogPrivate
-{
- MimeTypeInfo *info;
- GladeXML *dialog_xml;
- GtkWidget *dialog_win;
- GtkTreeStore *ext_store;
-
- gboolean is_add;
-
- GtkTreeModel *model;
-
- gboolean component_active : 1;
- gboolean default_action_active : 1;
- gboolean custom_action : 1;
-};
-
-static guint dialog_signals[LAST_SIGNAL];
-
-static GObjectClass *parent_class;
-
-static void mime_edit_dialog_init (MimeEditDialog *mime_edit_dialog,
- MimeEditDialogClass *class);
-static void mime_edit_dialog_class_init (MimeEditDialogClass *class);
-
-static void mime_edit_dialog_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void mime_edit_dialog_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void mime_edit_dialog_dispose (GObject *object);
-static void mime_edit_dialog_finalize (GObject *object);
-
-static void fill_dialog (MimeEditDialog *dialog);
-static void setup_add_dialog (MimeEditDialog *dialog);
-
-static void populate_component_list (MimeEditDialog *dialog);
-static void populate_application_list (MimeEditDialog *dialog);
-static void populate_extensions_list (MimeEditDialog *dialog);
-
-static void add_ext_cb (MimeEditDialog *dialog);
-static void remove_ext_cb (MimeEditDialog *dialog);
-static void choose_cat_cb (MimeEditDialog *dialog);
-static void default_action_changed_cb (MimeEditDialog *dialog);
-static void response_cb (MimeEditDialog *dialog,
- gint response_id);
-
-static void update_sensitivity (MimeEditDialog *dialog);
-
-
-GType
-mime_edit_dialog_get_type (void)
-{
- static GType mime_edit_dialog_type = 0;
-
- if (!mime_edit_dialog_type) {
- GTypeInfo mime_edit_dialog_info = {
- sizeof (MimeEditDialogClass),
- (GBaseInitFunc) NULL,
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) mime_edit_dialog_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (MimeEditDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mime_edit_dialog_init,
- NULL
- };
-
- mime_edit_dialog_type =
- g_type_register_static (G_TYPE_OBJECT,
- "MimeEditDialog",
- &mime_edit_dialog_info, 0);
- }
-
- return mime_edit_dialog_type;
-}
-
-/**
- * mime_edit_editable_enters: Make the "activate" signal of an editable click
- * the default dialog button.
- * @dialog: dialog to affect.
- * @editable: Editable to affect.
- *
- * This is a literal copy of gnome_dialog_editable_enters, but not restricted
- * to GnomeDialogs.
- *
- * Normally if there's an editable widget (such as #GtkEntry) in your
- * dialog, pressing Enter will activate the editable rather than the
- * default dialog button. However, in most cases, the user expects to
- * type something in and then press enter to close the dialog. This
- * function enables that behavior.
- *
- **/
-static void
-mime_edit_editable_enters (MimeEditDialog *dialog, GtkEditable *editable)
-{
- g_signal_connect_swapped (G_OBJECT (editable),
- "activate",
- G_CALLBACK (gtk_window_activate_default),
- GTK_WINDOW (dialog->p->dialog_win));
-}
-
-static void
-check_for_content (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
- gpointer data)
-{
- *((gboolean *)data) = TRUE;
-}
-
-static void
-remove_ext_sensitivity_cb (GtkTreeSelection *selection, GtkWidget *button)
-{
- gboolean flag = FALSE;
- gtk_tree_selection_selected_foreach (selection, check_for_content, &flag);
- gtk_widget_set_sensitive (GTK_WIDGET (button), flag);
-}
-
-static void
-mime_edit_dialog_init (MimeEditDialog *dialog, MimeEditDialogClass *class)
-{
- GtkSizeGroup *size_group;
- GtkTreeView *view;
- GtkCellRenderer *renderer;
- GtkWidget *remove_ext;
- GtkTreeSelection *selection;
-
- dialog->p = g_new0 (MimeEditDialogPrivate, 1);
- dialog->p->dialog_xml = glade_xml_new
- (GNOMECC_DATA_DIR "/interfaces/file-types-properties.glade", "edit_widget", NULL);
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("description_label"));
- gtk_size_group_add_widget (size_group, WID ("mime_type_label"));
- gtk_size_group_add_widget (size_group, WID ("category_label"));
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("component_label"));
- gtk_size_group_add_widget (size_group, WID ("default_action_label"));
- gtk_size_group_add_widget (size_group, WID ("program_label"));
-
- dialog->p->ext_store = gtk_tree_store_new (1, G_TYPE_STRING);
-
- view = GTK_TREE_VIEW (WID ("ext_list"));
- gtk_tree_view_set_model (view, GTK_TREE_MODEL (dialog->p->ext_store));
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (view, -1, _("Extension"), renderer, "text", 0, NULL);
-
- dialog->p->dialog_win = gtk_dialog_new_with_buttons
- (_("Edit file type"), NULL, -1,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
- capplet_set_icon (dialog->p->dialog_win, "gnome-ccmime.png");
- gtk_dialog_set_default_response (GTK_DIALOG (dialog->p->dialog_win),
- GTK_RESPONSE_OK);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->p->dialog_win)->vbox), WID ("edit_widget"), TRUE, TRUE, 0);
-
- remove_ext = WID ("remove_ext_button");
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("ext_list")));
- g_signal_connect (G_OBJECT (selection), "changed",
- (GCallback) remove_ext_sensitivity_cb, remove_ext);
- g_signal_connect_swapped (G_OBJECT (remove_ext), "clicked",
- (GCallback) remove_ext_cb, dialog);
- g_signal_connect_swapped (G_OBJECT (WID ("new_ext_entry")), "activate",
- (GCallback) add_ext_cb, dialog);
- g_signal_connect_swapped (G_OBJECT (WID ("choose_button")), "clicked",
- (GCallback) choose_cat_cb, dialog);
- g_signal_connect_swapped (G_OBJECT (WID ("default_action_select")), "changed",
- (GCallback) default_action_changed_cb, dialog);
- g_signal_connect_swapped (G_OBJECT (dialog->p->dialog_win), "response",
- (GCallback) response_cb, dialog);
-
- remove_ext_sensitivity_cb (selection, (gpointer)remove_ext);
-
- mime_edit_editable_enters (dialog, GTK_EDITABLE (WID ("description_entry")));
- mime_edit_editable_enters (dialog, GTK_EDITABLE (WID ("mime_type_entry")));
- mime_edit_editable_enters (dialog, GTK_EDITABLE (WID ("category_entry")));
-}
-
-static void
-mime_edit_dialog_class_init (MimeEditDialogClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->dispose = mime_edit_dialog_dispose;
- object_class->finalize = mime_edit_dialog_finalize;
- object_class->set_property = mime_edit_dialog_set_prop;
- object_class->get_property = mime_edit_dialog_get_prop;
-
- g_object_class_install_property
- (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- _("Model"),
- _("Underlying model to notify when Ok is clicked"),
- gtk_tree_model_get_type (),
- G_PARAM_READWRITE));
-
- g_object_class_install_property
- (object_class, PROP_INFO,
- g_param_spec_pointer ("mime-type-info",
- _("MIME type information"),
- _("Structure with data on the MIME type"),
- G_PARAM_READWRITE));
-
- g_object_class_install_property
- (object_class, PROP_IS_ADD,
- g_param_spec_boolean ("is-add",
- _("Is add dialog"),
- _("True if this dialog is for adding a MIME type"),
- FALSE,
- G_PARAM_READWRITE));
-
- dialog_signals[DONE] =
- g_signal_new ("done",
- G_TYPE_FROM_CLASS (object_class), 0,
- G_STRUCT_OFFSET (MimeEditDialogClass, done),
- NULL, NULL,
- (GSignalCMarshaller) g_cclosure_marshal_VOID__BOOLEAN,
- G_TYPE_NONE, 1, G_TYPE_BOOLEAN);
-
- parent_class = G_OBJECT_CLASS
- (g_type_class_ref (G_TYPE_OBJECT));
-}
-
-static void
-mime_edit_dialog_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- MimeEditDialog *mime_edit_dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_EDIT_DIALOG (object));
-
- mime_edit_dialog = MIME_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- mime_edit_dialog->p->model = GTK_TREE_MODEL (g_value_get_object (value));
- break;
-
- case PROP_INFO:
- if (g_value_get_pointer (value) != NULL) {
- mime_edit_dialog->p->info = g_value_get_pointer (value);
- fill_dialog (mime_edit_dialog);
-
- gtk_widget_show_all (mime_edit_dialog->p->dialog_win);
- }
-
- break;
-
- case PROP_IS_ADD:
- mime_edit_dialog->p->is_add = g_value_get_boolean (value);
-
- if (mime_edit_dialog->p->is_add) {
- mime_edit_dialog->p->info = mime_type_info_new (NULL,
- mime_edit_dialog->p->model);
- setup_add_dialog (mime_edit_dialog);
- gtk_window_set_title (GTK_WINDOW (mime_edit_dialog->p->dialog_win),
- (_("Add File Type")));
- gtk_widget_show_all (mime_edit_dialog->p->dialog_win);
- }
-
- break;
-
- default:
- g_warning ("Bad property set");
- break;
- }
-}
-
-static void
-mime_edit_dialog_get_prop (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- MimeEditDialog *mime_edit_dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_EDIT_DIALOG (object));
-
- mime_edit_dialog = MIME_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- g_value_set_object (value, G_OBJECT (mime_edit_dialog->p->model));
- break;
-
- case PROP_INFO:
- g_value_set_pointer (value, mime_edit_dialog->p->info);
- break;
-
- default:
- g_warning ("Bad property get");
- break;
- }
-}
-
-static void
-mime_edit_dialog_dispose (GObject *object)
-{
- MimeEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_EDIT_DIALOG (object));
-
- dialog = MIME_EDIT_DIALOG (object);
-
- if (dialog->p->dialog_xml != NULL) {
- g_object_unref (G_OBJECT (dialog->p->dialog_xml));
- dialog->p->dialog_xml = NULL;
- }
-
- if (dialog->p->dialog_win != NULL) {
- gtk_widget_destroy (GTK_WIDGET (dialog->p->dialog_win));
- dialog->p->dialog_win = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-mime_edit_dialog_finalize (GObject *object)
-{
- MimeEditDialog *mime_edit_dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_EDIT_DIALOG (object));
-
- mime_edit_dialog = MIME_EDIT_DIALOG (object);
-
- g_free (mime_edit_dialog->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GObject *
-mime_edit_dialog_new (GtkTreeModel *model, MimeTypeInfo *info)
-{
- return g_object_new (mime_edit_dialog_get_type (),
- "model", model,
- "mime-type-info", info,
- NULL);
-}
-
-GObject *
-mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
- char const *file_name)
-{
- GObject *dialog = g_object_new (mime_edit_dialog_get_type (),
- "model", model, "is-add", TRUE, /* model must be before is-add */
- NULL);
-
- if (parent != NULL)
- gtk_window_set_transient_for (
- GTK_WINDOW (MIME_EDIT_DIALOG (dialog)->p->dialog_win),
- parent);
-
- if (file_name != NULL) {
- /* quick and dirty, no tests for backslashed dots */
- char const *last = g_utf8_strrchr (file_name, -1,
- g_utf8_get_char ("."));
-
- if (last != NULL && last[1] != '\0') {
- MimeTypeInfo *info = MIME_EDIT_DIALOG (dialog)->p->info;
- char *lower = g_utf8_strdown (last +1, -1);
-
- info->mime_type = g_strdup_printf ("application/x-%s", lower);
- g_free (lower);
-
- mime_type_info_set_file_extensions (info,
- g_list_prepend (NULL, g_strdup (last+1)));
- mime_type_info_set_category_name (info,
- "Misc", _("Misc"), model);
-
- fill_dialog (MIME_EDIT_DIALOG (dialog));
- }
- }
-
- return dialog;
-}
-
-static void
-safe_set_entry (MimeEditDialog *dialog, char const *widget, char const *txt)
-{
- GtkEntry *entry = GTK_ENTRY (WID (widget));
-
- g_return_if_fail (entry != NULL);
-
- if (txt == NULL)
- txt = "";
- gtk_entry_set_text (entry, txt);
-}
-
-static void
-fill_dialog (MimeEditDialog *dialog)
-{
- gchar *category_name;
-
- g_return_if_fail (dialog->p->info != NULL);
-
- mime_type_info_load_all (dialog->p->info);
-
- safe_set_entry (dialog, "description_entry",
- dialog->p->info->description);
- safe_set_entry (dialog, "mime_type_entry",
- dialog->p->info->mime_type);
- category_name = mime_type_info_get_category_name (dialog->p->info);
- safe_set_entry (dialog, "category_entry", category_name);
- g_free (category_name);
-
- update_sensitivity (dialog);
-
- gnome_icon_entry_set_filename (GNOME_ICON_ENTRY (WID ("icon_entry")), mime_type_info_get_icon_path (dialog->p->info));
-
- populate_component_list (dialog);
- populate_application_list (dialog);
- populate_extensions_list (dialog);
-}
-
-static void
-setup_add_dialog (MimeEditDialog *dialog)
-{
- GtkWidget *menu, *item;
-
- item = gtk_menu_item_new_with_label (_("None"));
- menu = gtk_menu_new ();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("component_select")), menu);
-
- item = gtk_menu_item_new_with_label (_("Custom"));
- menu = gtk_menu_new ();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("default_action_select")), menu);
-
- gtk_widget_set_sensitive (WID ("component_box"), FALSE);
- gtk_widget_set_sensitive (WID ("default_action_box"), FALSE);
-
- gnome_icon_entry_set_filename (GNOME_ICON_ENTRY (WID ("icon_entry")),
- gnome_vfs_icon_path_from_filename ("nautilus/i-regular-24.png"));
-}
-
-static void
-populate_component_list (MimeEditDialog *dialog)
-{
- GList *component_list, *tmp;
- GtkMenu *menu;
- GtkWidget *menu_item;
- GtkOptionMenu *component_select;
- gchar *component_name;
- Bonobo_ServerInfo *info, *default_component;
- int found_idx = -1, i;
-
- menu = GTK_MENU (gtk_menu_new ());
-
- component_list = gnome_vfs_mime_get_all_components (dialog->p->info->mime_type);
- dialog->p->component_active = (component_list != NULL);
- component_select = GTK_OPTION_MENU (WID ("component_select"));
- gtk_option_menu_set_menu (component_select, GTK_WIDGET (menu));
- update_sensitivity (dialog); /* do not add items to an insensitive menu */
-
- /* FIXME: We are leaking the whole list here, but this will be the case until I know of an easy way to duplicate
- * Bonobo_ServerInfo structures */
-
- default_component = dialog->p->info->default_component;
- for (tmp = component_list, i = 0; tmp != NULL; tmp = tmp->next, i++) {
- info = tmp->data;
-
- g_return_if_fail (info != NULL);
-
- if (default_component != NULL &&
- !strcmp (info->iid, default_component->iid))
- found_idx = i;
-
- component_name = mime_type_get_pretty_name_for_server (info);
- menu_item = gtk_menu_item_new_with_label (component_name);
- g_free (component_name);
-
- /* Store copy of component name in item; free when item destroyed. */
- g_object_set_data (G_OBJECT (menu_item),
- "component", info);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
- }
-
- menu_item = gtk_menu_item_new_with_label (_("None"));
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
-
- if (found_idx < 0)
- found_idx = i;
-
- gtk_option_menu_set_history (component_select, found_idx);
-}
-
-static void
-populate_application_list (MimeEditDialog *dialog)
-{
- GList *app_list, *tmp;
- GtkMenu *menu;
- GtkWidget *menu_item;
- GtkOptionMenu *app_select;
- GnomeVFSMimeApplication *app;
- int found_idx = -1, i;
-
- menu = GTK_MENU (gtk_menu_new ());
-
- app_list = gnome_vfs_mime_get_short_list_applications (dialog->p->info->mime_type);
- dialog->p->default_action_active = (app_list != NULL);
- app_select = GTK_OPTION_MENU (WID ("default_action_select"));
- gtk_option_menu_set_menu (app_select, GTK_WIDGET (menu));
- update_sensitivity (dialog); /* do not add items to an insensitive menu */
-
- for (tmp = app_list, i = 0; tmp != NULL; tmp = tmp->next, i++) {
- app = tmp->data;
-
- if (dialog->p->info->default_action != NULL &&
- dialog->p->info->default_action->id != NULL &&
- !strcmp (app->id, dialog->p->info->default_action->id))
- found_idx = i;
-
- menu_item = gtk_menu_item_new_with_label (app->name);
-
- /* Store copy of application in item; free when item destroyed. */
- g_object_set_data_full (G_OBJECT (menu_item),
- "app", app,
- (GDestroyNotify) gnome_vfs_mime_application_free);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), menu_item);
- gtk_widget_show (menu_item);
- }
-
- dialog->p->custom_action = (found_idx < 0);
-
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_menu_item_new_with_label (_("Custom")));
-
- if (found_idx < 0) {
- found_idx = i;
- if (dialog->p->info->default_action->command != NULL)
- gnome_file_entry_set_filename (GNOME_FILE_ENTRY (WID ("program_entry")),
- dialog->p->info->default_action->command);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("needs_terminal_toggle")),
- dialog->p->info->default_action->requires_terminal);
-
- } else {
- gtk_widget_set_sensitive (WID ("program_entry_box"), FALSE);
- }
-
- gtk_option_menu_set_history (app_select, found_idx);
-
- g_list_free (app_list);
-}
-
-static void
-populate_extensions_list (MimeEditDialog *dialog)
-{
- GList *tmp;
- GtkTreeIter iter;
-
- for (tmp = dialog->p->info->file_extensions; tmp != NULL; tmp = tmp->next) {
- gtk_tree_store_append (dialog->p->ext_store, &iter, NULL);
- gtk_tree_store_set (dialog->p->ext_store, &iter, 0, tmp->data, -1);
- }
-}
-
-static GList *
-collect_filename_extensions (MimeEditDialog *dialog)
-{
- GtkTreeIter iter;
- GValue value;
- GList *ret = NULL;
-
- if (!gtk_tree_model_get_iter_root (GTK_TREE_MODEL (dialog->p->ext_store), &iter))
- return NULL;
-
- value.g_type = G_TYPE_INVALID;
-
- do {
- gtk_tree_model_get_value (GTK_TREE_MODEL (dialog->p->ext_store), &iter, 0, &value);
- ret = g_list_prepend (ret, g_value_dup_string (&value));
- g_value_unset (&value);
- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (dialog->p->ext_store), &iter));
-
- ret = g_list_reverse (ret);
-
- return ret;
-}
-
-/**
- * mime_edit_dialog_get_app :
- * @glade :
- * @mime_type : a fall back in case we can't generate a meaningful application name.
- * @current :
- *
- * A utility routine for looking up applications. it should handle life cycle
- * and hopefully merge in existing copies of custom applications.
- **/
-void
-mime_edit_dialog_get_app (GladeXML *glade, char const *mime_type,
- GnomeVFSMimeApplication **current)
-{
- GtkWidget *menu = glade_xml_get_widget (glade, "default_action_select");
- gint idx = gtk_option_menu_get_history (GTK_OPTION_MENU (menu));
- GtkWidget *shell = gtk_option_menu_get_menu (GTK_OPTION_MENU (menu));
- GObject *item = (g_list_nth (GTK_MENU_SHELL (shell)->children, idx))->data;
-
- GnomeVFSMimeApplication *res, *app = g_object_get_data (item, "app");
-
- if (app == NULL) {
- GnomeFileEntry *program_entry =
- GNOME_FILE_ENTRY (glade_xml_get_widget (glade, "program_entry"));
- char *cmd = gnome_file_entry_get_full_path (program_entry, TRUE);
- gboolean requires_terminal = gtk_toggle_button_get_active (
- GTK_TOGGLE_BUTTON (glade_xml_get_widget (glade, "needs_terminal_toggle")));
- char *base_cmd;
-
- GList *ptr, *app_list = NULL;
-
- /* If the cmd is NULL its possible that the user just types a
- * command name in their path. Because the file picker seems
- * to insist that it only return a valid path we ask it to
- * verify the app exists so that we can catch it here and just
- * use the raw non-absolute name here.
- */
- if (cmd == NULL) {
- char const *tmp = gtk_entry_get_text (
- GTK_ENTRY (gnome_file_entry_gtk_entry (program_entry)));
- cmd = g_strdup (tmp == NULL ? "" : tmp);
- }
- base_cmd = g_path_get_basename (cmd);
- if (base_cmd == NULL)
- base_cmd = g_strdup ("");
-
- app_list = gnome_vfs_application_registry_get_applications (NULL);
- for (ptr = app_list; ptr != NULL ; ptr = ptr->next) {
- char const *app_cmd = gnome_vfs_application_registry_peek_value (ptr->data,
- GNOME_VFS_APPLICATION_REGISTRY_COMMAND);
-
- /* Look for a matching application (with or without path) */
- if (app_cmd != NULL &&
- (!strcmp (cmd, app_cmd) || (*base_cmd && !strcmp (base_cmd, app_cmd)))) {
- gboolean ok, app_req = gnome_vfs_application_registry_get_bool_value (ptr->data,
- GNOME_VFS_APPLICATION_REGISTRY_REQUIRES_TERMINAL, &ok);
- if (ok && app_req == requires_terminal)
- break;
- }
- }
-
- /* No existing application, lets create one */
- if (ptr == NULL) {
- res = g_new0 (GnomeVFSMimeApplication, 1);
- res->command = cmd;
- res->requires_terminal = requires_terminal;
-
- res->name = base_cmd;
- if (res->name != NULL && *res->name) {
- /* Can we use the app name as the id?
- * We know that there are no apps with the same
- * command, so if the id is taken we are screwed
- */
- if (gnome_vfs_application_registry_get_mime_application (res->name) == NULL)
- res->id = g_strdup (res->name);
- } else { /* fail safe to ensure a name */
- g_free (res->name);
- res->name = g_strdup_printf ("Custom %s", mime_type);
- }
-
- /* If there is no id yet, make up a unique string */
- if (res->id == NULL) {
- uuid_t app_uuid;
- gchar app_uuid_str[100];
- uuid_generate (app_uuid);
- uuid_unparse (app_uuid, app_uuid_str);
- res->id = g_strdup (app_uuid_str);
- }
-
- gnome_vfs_application_registry_save_mime_application (res);
- } else {
- g_free (cmd);
- g_free (base_cmd);
- res = gnome_vfs_application_registry_get_mime_application (ptr->data);
- }
-
- g_list_free (app_list);
- } else
- res = gnome_vfs_mime_application_copy (app);
-
- gnome_vfs_mime_application_free (*current);
- *current = res;
-}
-
-static void
-store_data (MimeEditDialog *dialog)
-{
- GtkOptionMenu *option_menu;
- GtkMenuShell *menu_shell;
- GObject *menu_item;
- gint idx;
- gchar *tmp;
- const gchar *tmp1;
- gboolean cat_changed = FALSE;
-
- GList *ext_list;
-
- uuid_t mime_uuid;
- gchar mime_uuid_str[100];
-
- GtkTreeIter iter;
- GtkTreePath *path;
-
- g_free (dialog->p->info->description);
- dialog->p->info->description = g_strdup (gtk_entry_get_text (GTK_ENTRY (WID ("description_entry"))));
-
- g_free (dialog->p->info->mime_type);
- tmp1 = gtk_entry_get_text (GTK_ENTRY (WID ("mime_type_entry")));
-
- if (tmp1 != NULL && *tmp1 != '\0') {
- dialog->p->info->mime_type = g_strdup (tmp1);
- } else {
- uuid_generate (mime_uuid);
- uuid_unparse (mime_uuid, mime_uuid_str);
-
- dialog->p->info->mime_type = g_strconcat ("custom/", mime_uuid_str, NULL);
- }
-
- g_free (dialog->p->info->icon_path);
- dialog->p->info->icon_path = NULL;
-
- g_free (dialog->p->info->icon_name);
- dialog->p->info->icon_name = g_strdup (gnome_icon_entry_get_filename (GNOME_ICON_ENTRY (WID ("icon_entry"))));
-
- if (dialog->p->info->icon_pixbuf != NULL) {
- g_object_unref (G_OBJECT (dialog->p->info->icon_pixbuf));
- dialog->p->info->icon_pixbuf = NULL;
- }
-
- if (dialog->p->info->small_icon_pixbuf != NULL) {
- g_object_unref (G_OBJECT (dialog->p->info->small_icon_pixbuf));
- dialog->p->info->small_icon_pixbuf = NULL;
- }
-
- option_menu = GTK_OPTION_MENU (WID ("component_select"));
- menu_shell = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu));
- idx = gtk_option_menu_get_history (option_menu);
- menu_item = (g_list_nth (menu_shell->children, idx))->data;
-
- CORBA_free (dialog->p->info->default_component);
- dialog->p->info->default_component = g_object_get_data (menu_item, "component");
-
- mime_edit_dialog_get_app (dialog->p->dialog_xml,
- dialog->p->info->mime_type,
- &(dialog->p->info->default_action));
-
- ext_list = collect_filename_extensions (dialog);
- mime_type_info_set_file_extensions (dialog->p->info, ext_list);
-
- tmp = mime_type_info_get_category_name (dialog->p->info);
- tmp1 = gtk_entry_get_text (GTK_ENTRY (WID ("category_entry")));
- if (strcmp (tmp, tmp1)) {
- cat_changed = TRUE;
- mime_type_info_set_category_name (dialog->p->info, tmp1, tmp1, dialog->p->model);
- }
- g_free (tmp);
-
- model_entry_save (MODEL_ENTRY (dialog->p->info));
-
- if (!cat_changed) {
- mime_types_model_construct_iter (MIME_TYPES_MODEL (dialog->p->model),
- MODEL_ENTRY (dialog->p->info), &iter);
- path = gtk_tree_model_get_path (dialog->p->model, &iter);
- gtk_tree_model_row_changed (dialog->p->model, path, &iter);
- gtk_tree_path_free (path);
- }
-}
-
-static gboolean
-validate_data (MimeEditDialog *dialog)
-{
- const gchar *mime_type;
- GtkWidget *err_dialog = NULL;
-
- mime_type = gtk_entry_get_text (GTK_ENTRY (WID ("mime_type_entry")));
-
- if (mime_type != NULL && *mime_type != '\0') {
- if (strchr (mime_type, ' ') || !strchr (mime_type, '/')) {
- err_dialog = gtk_message_dialog_new (
- GTK_WINDOW (dialog->p->dialog_win),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CANCEL,
- _("Please enter a valid MIME type. It should be of the form "
- "class/type and may not contain any spaces."));
- } else if (dialog->p->is_add && gnome_vfs_mime_type_is_known (mime_type)) {
- err_dialog = gtk_message_dialog_new (
- GTK_WINDOW (dialog->p->dialog_win),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK_CANCEL,
- _("A MIME type with that name already exists, overwrite?"));
- }
- } else {
- err_dialog = gtk_message_dialog_new (
- GTK_WINDOW (dialog->p->dialog_win),
- GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CANCEL,
- _("Please enter a valid MIME type. It should be of the form "
- "class/type and may not contain any spaces."));
- }
-
- if (err_dialog) {
- int res = gtk_dialog_run (GTK_DIALOG (err_dialog));
- gtk_object_destroy (GTK_OBJECT (err_dialog));
- return res != GTK_RESPONSE_CANCEL;
- }
- return TRUE;
-}
-
-static void
-add_ext_cb (MimeEditDialog *dialog)
-{
- GtkTreeIter iter;
- const gchar *ext_name;
-
- ext_name = gtk_entry_get_text (GTK_ENTRY (WID ("new_ext_entry")));
-
- if (ext_name != NULL && *ext_name != '\0') {
- gtk_tree_store_append (dialog->p->ext_store, &iter, NULL);
- gtk_tree_store_set (dialog->p->ext_store, &iter, 0, ext_name, -1);
- }
-
- gtk_entry_set_text (GTK_ENTRY (WID ("new_ext_entry")), "");
-}
-
-static void
-remove_ext_foreach_cb (GtkTreeModel *model, GtkTreePath *path,
- GtkTreeIter *iter)
-{
- gtk_tree_store_remove (GTK_TREE_STORE (model), iter);
-}
-
-static void
-remove_ext_cb (MimeEditDialog *dialog)
-{
- gtk_tree_selection_selected_foreach (gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("ext_list"))),
- (GtkTreeSelectionForeachFunc) remove_ext_foreach_cb, NULL);
-}
-
-static void
-choose_cat_cb (MimeEditDialog *dialog)
-{
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GtkWidget *treeview;
- GtkWidget *dialog_win;
- GtkWidget *scrolled_win;
- GtkCellRenderer *renderer;
-
- model = GTK_TREE_MODEL (mime_types_model_new (TRUE));
- treeview = gtk_tree_view_new_with_model (model);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeview));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
-
- if (dialog->p->info->entry.parent != NULL) {
- mime_types_model_construct_iter (MIME_TYPES_MODEL (model), dialog->p->info->entry.parent, &iter);
- gtk_tree_selection_select_iter (selection, &iter);
- }
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes
- (GTK_TREE_VIEW (treeview), -1, _("Category"), renderer,
- "text", MODEL_COLUMN_DESCRIPTION,
- NULL);
-
- dialog_win = gtk_dialog_new_with_buttons
- (_("Choose a file category"), NULL, -1,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_widget_set_size_request (dialog_win, 300, 300);
-
- scrolled_win = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_win), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (scrolled_win), treeview);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_win)->vbox), scrolled_win, TRUE, TRUE, GNOME_PAD_SMALL);
- gtk_widget_show_all (dialog_win);
-
- if (gtk_dialog_run (GTK_DIALOG (dialog_win)) == GTK_RESPONSE_OK) {
- gtk_tree_selection_get_selected (selection, &model, &iter);
- gtk_entry_set_text (GTK_ENTRY (WID ("category_entry")),
- mime_category_info_get_full_name (MIME_CATEGORY_INFO (MODEL_ENTRY_FROM_ITER (&iter))));
- }
-
- gtk_widget_destroy (dialog_win);
- g_object_unref (G_OBJECT (model));
-}
-
-static void
-default_action_changed_cb (MimeEditDialog *dialog)
-{
- int id;
- GtkOptionMenu *option_menu;
- GtkMenuShell *menu;
-
- option_menu = GTK_OPTION_MENU (WID ("default_action_select"));
- menu = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu));
- id = gtk_option_menu_get_history (option_menu);
-
- dialog->p->custom_action = (id == g_list_length (menu->children) - 1);
-
- update_sensitivity (dialog);
-}
-
-static void
-response_cb (MimeEditDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_OK) {
- if (validate_data (dialog)) {
- store_data (dialog);
- g_signal_emit (G_OBJECT (dialog), dialog_signals[DONE], 0, TRUE);
- g_object_unref (G_OBJECT (dialog));
- }
- } else {
- if (dialog->p->is_add)
- mime_type_info_free (dialog->p->info);
-
- g_signal_emit (G_OBJECT (dialog), dialog_signals[DONE], 0, FALSE);
-
- g_object_unref (G_OBJECT (dialog));
- }
-}
-
-static void
-update_sensitivity (MimeEditDialog *dialog)
-{
- gtk_widget_set_sensitive (WID ("component_box"), dialog->p->component_active);
- gtk_widget_set_sensitive (WID ("default_action_box"), dialog->p->default_action_active);
- gtk_widget_set_sensitive (WID ("program_entry_box"), dialog->p->custom_action);
- gtk_widget_set_sensitive (WID ("needs_terminal_toggle"), dialog->p->custom_action);
-}
diff --git a/capplets/file-types/mime-edit-dialog.h b/capplets/file-types/mime-edit-dialog.h
deleted file mode 100644
index 5d3039b7d..000000000
--- a/capplets/file-types/mime-edit-dialog.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-edit-dialog.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __MIME_EDIT_DIALOG_H
-#define __MIME_EDIT_DIALOG_H
-
-#include <gnome.h>
-
-#include "mime-type-info.h"
-
-G_BEGIN_DECLS
-
-#define MIME_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mime_edit_dialog_get_type (), MimeEditDialog)
-#define MIME_EDIT_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mime_edit_dialog_get_type (), MimeEditDialogClass)
-#define IS_MIME_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mime_edit_dialog_get_type ())
-
-typedef struct _MimeEditDialog MimeEditDialog;
-typedef struct _MimeEditDialogClass MimeEditDialogClass;
-typedef struct _MimeEditDialogPrivate MimeEditDialogPrivate;
-
-struct _MimeEditDialog
-{
- GObject parent;
-
- MimeEditDialogPrivate *p;
-};
-
-struct _MimeEditDialogClass
-{
- GObjectClass g_object_class;
-
- void (*done) (MimeEditDialog *dialog, gboolean ok);
-};
-
-GType mime_edit_dialog_get_type (void);
-
-GObject *mime_edit_dialog_new (GtkTreeModel *model,
- MimeTypeInfo *info);
-GObject *mime_add_dialog_new (GtkTreeModel *model, GtkWindow *parent,
- char const *file_name);
-
-void mime_edit_dialog_get_app (GladeXML *glade, char const *mime_type,
- GnomeVFSMimeApplication **current);
-
-G_END_DECLS
-
-#endif /* __MIME_EDIT_DIALOG_H */
diff --git a/capplets/file-types/mime-type-info.c b/capplets/file-types/mime-type-info.c
deleted file mode 100644
index 79adb6218..000000000
--- a/capplets/file-types/mime-type-info.c
+++ /dev/null
@@ -1,849 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-type-info.c
- *
- * Copyright (C) 2000 Eazel, Inc.
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>,
- * Jonathan Blandford <jrb@redhat.com>,
- * Gene Z. Ragan <gzr@eazel.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <bonobo.h>
-#include <libgnomevfs/gnome-vfs-application-registry.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-#include <gconf/gconf-client.h>
-
-#include "libuuid/uuid.h"
-
-#include "mime-type-info.h"
-#include "mime-types-model.h"
-
-static const gchar *get_category_name (const gchar *mime_type);
-static const gchar *get_category_description (const gchar *mime_type);
-static GSList *get_lang_list (void);
-static gchar *form_extensions_string (const MimeTypeInfo *info,
- gchar *sep,
- gchar *prepend);
-
-static MimeCategoryInfo *get_category (const gchar *category_name,
- const gchar *category_desc,
- GtkTreeModel *model);
-
-
-
-static gchar *
-get_real_icon_path (const MimeTypeInfo *info, const gchar *icon_name)
-{
- gchar *tmp, *tmp1, *ret, *real_icon_name;
-
- if (icon_name == NULL || *icon_name == '\0') {
- tmp = g_strdup (info->mime_type);
- tmp1 = strchr (tmp, '/');
- if (tmp1 != NULL) *tmp1 = '-';
- real_icon_name = g_strconcat ("gnome-mime-", tmp, NULL);
- g_free (tmp);
- } else
- real_icon_name = g_strdup (icon_name);
-
- ret = gnome_vfs_icon_path_from_filename (real_icon_name);
-
- if (ret == NULL) {
- GtkIconInfo *info;
-
- info = gtk_icon_theme_lookup_icon (
- gtk_icon_theme_get_default (), real_icon_name, 48, 0);
- if (info != NULL)
- ret = g_strdup (gtk_icon_info_get_filename (info));
- else if (icon_name != NULL) {
- info = gtk_icon_theme_lookup_icon (
- gtk_icon_theme_get_default (), icon_name, 48, 0);
- if (info != NULL)
- ret = g_strdup (gtk_icon_info_get_filename (info));
- }
- }
-
- if (ret == NULL && strstr (real_icon_name, ".png") == NULL) {
- tmp = g_strconcat (real_icon_name, ".png", NULL);
- ret = gnome_vfs_icon_path_from_filename (tmp);
- g_free (tmp);
- }
-
- if (ret == NULL) {
- tmp = g_strconcat ("nautilus/", real_icon_name, NULL);
- ret = gnome_vfs_icon_path_from_filename (tmp);
- g_free (tmp);
- }
-
- if (ret == NULL && strstr (real_icon_name, ".png") == NULL) {
- tmp = g_strconcat ("nautilus/", real_icon_name, ".png", NULL);
- ret = gnome_vfs_icon_path_from_filename (tmp);
- g_free (tmp);
- }
- g_free (real_icon_name);
-
- if (ret == NULL)
- ret = gnome_vfs_icon_path_from_filename ("nautilus/i-regular-24.png");
-
- return ret;
-}
-
-/* Loads a pixbuf for the icon, falling back on the default icon if
- * necessary
- */
-static void
-get_icon_pixbuf (MimeTypeInfo *info, const gchar *icon_path, gboolean want_large)
-{
- static GHashTable *icon_table = NULL;
-
- if (icon_path == NULL)
- icon_path = get_real_icon_path (info, NULL);
-
- if (icon_path == NULL)
- return;
-
- if ((want_large && info->icon_pixbuf != NULL) || info->small_icon_pixbuf != NULL)
- return;
-
- if (icon_table == NULL)
- icon_table = g_hash_table_new (g_str_hash, g_str_equal);
-
- if (!want_large)
- info->small_icon_pixbuf = g_hash_table_lookup (icon_table, icon_path);
-
- if (info->small_icon_pixbuf != NULL) {
- g_object_ref (G_OBJECT (info->small_icon_pixbuf));
- } else {
- info->icon_pixbuf = gdk_pixbuf_new_from_file (icon_path, NULL);
-
- if (info->icon_pixbuf == NULL) {
- return;
- }
- else if (!want_large) {
- info->small_icon_pixbuf =
- gdk_pixbuf_scale_simple (info->icon_pixbuf, 16, 16, GDK_INTERP_HYPER);
-
- g_hash_table_insert (icon_table, g_strdup (icon_path), info->small_icon_pixbuf);
- }
- }
-}
-
-
-void
-load_all_mime_types (GtkTreeModel *model)
-{
- GList *list, *tmp;
-
- list = gnome_vfs_get_registered_mime_types ();
-
- for (tmp = list; tmp != NULL; tmp = tmp->next)
- mime_type_info_new (tmp->data, model);
-
- g_list_free (tmp);
- g_list_free (list);
-}
-
-MimeTypeInfo *
-mime_type_info_new (const gchar *mime_type, GtkTreeModel *model)
-{
- MimeTypeInfo *info;
-
- info = g_new0 (MimeTypeInfo, 1);
- MODEL_ENTRY (info)->type = MODEL_ENTRY_MIME_TYPE;
-
- if (mime_type != NULL) {
- info->mime_type = g_strdup (mime_type);
- mime_type_info_set_category_name (info,
- get_category_name (mime_type),
- get_category_description (mime_type), model);
- } else
- info->entry.parent = get_model_entries (model);
-
- return info;
-}
-
-/* Fill in the remaining fields in a MimeTypeInfo structure; suitable for
- * subsequent use in an edit dialog */
-
-void
-mime_type_info_load_all (MimeTypeInfo *info)
-{
- mime_type_info_get_description (info);
- mime_type_info_get_file_extensions (info);
-
- if (info->icon_name == NULL)
- info->icon_name = g_strdup (gnome_vfs_mime_get_icon (info->mime_type));
-
- if (info->default_action == NULL && info->mime_type != NULL) {
- /* DO NOT USE gnome_vfs_mime_get_default_application
- * it will silently remove non-existant applications
- * which will make them seem to disappear on systems that
- * are configured differently */
- char const *app_id = gnome_vfs_mime_get_value (
- info->mime_type, "default_application_id");
-
- if (app_id != NULL && app_id[0] != '\0')
- info->default_action =
- gnome_vfs_application_registry_get_mime_application (app_id);
- }
-
- if (info->default_action == NULL)
- info->default_action = g_new0 (GnomeVFSMimeApplication, 1);
-
- if (info->default_component == NULL)
- info->default_component = gnome_vfs_mime_get_default_component (info->mime_type);
-
- mime_type_info_get_use_category (info);
-}
-
-const gchar *
-mime_type_info_get_description (MimeTypeInfo *info)
-{
- if (info->description == NULL)
- info->description = g_strdup (gnome_vfs_mime_get_description (info->mime_type));
-
- return info->description;
-}
-
-GdkPixbuf *
-mime_type_info_get_icon (MimeTypeInfo *info)
-{
- if (info->small_icon_pixbuf == NULL)
- get_icon_pixbuf (info, mime_type_info_get_icon_path (info), FALSE);
- if (info->icon_pixbuf == NULL)
- get_icon_pixbuf (info, NULL, FALSE);
-
- if (info->small_icon_pixbuf != NULL)
- g_object_ref (G_OBJECT (info->small_icon_pixbuf));
- return info->small_icon_pixbuf;
-}
-
-const gchar *
-mime_type_info_get_icon_path (MimeTypeInfo *info)
-{
- if (info->icon_name == NULL)
- info->icon_name = g_strdup (gnome_vfs_mime_get_icon (info->mime_type));
-
- info->icon_path = get_real_icon_path (info, info->icon_name);
-
- return info->icon_path;
-}
-
-const GList *
-mime_type_info_get_file_extensions (MimeTypeInfo *info)
-{
- if (info->file_extensions == NULL)
- info->file_extensions = gnome_vfs_mime_get_extensions_list (info->mime_type);
-
- return info->file_extensions;
-}
-
-gboolean
-mime_type_info_get_use_category (MimeTypeInfo *info)
-{
- const gchar *tmp1;
-
- if (!info->use_cat_loaded) {
- tmp1 = gnome_vfs_mime_get_value (info->mime_type, "use_category_default");
-
- if (tmp1 != NULL && !strcmp (tmp1, "yes"))
- info->use_category = TRUE;
- else
- info->use_category = FALSE;
-
- info->use_cat_loaded = TRUE;
- }
-
- return info->use_category;
-}
-
-gchar *
-mime_type_info_get_file_extensions_pretty_string (MimeTypeInfo *info)
-{
- mime_type_info_get_file_extensions (info);
-
- return form_extensions_string (info, ", ", ".");
-}
-
-gchar *
-mime_type_info_get_category_name (const MimeTypeInfo *info)
-{
- return mime_category_info_get_full_description (MIME_CATEGORY_INFO (info->entry.parent));
-}
-
-void
-mime_type_info_set_category_name (const MimeTypeInfo *info, const gchar *category_name, const gchar *category_desc, GtkTreeModel *model)
-{
- if (MODEL_ENTRY (info)->parent != NULL)
- model_entry_remove_child (MODEL_ENTRY (info)->parent, MODEL_ENTRY (info), model);
-
- if (category_name != NULL) {
- MODEL_ENTRY (info)->parent = MODEL_ENTRY (get_category (category_name, category_desc, model));
-
- if (MODEL_ENTRY (info)->parent != NULL)
- model_entry_insert_child (MODEL_ENTRY (info)->parent, MODEL_ENTRY (info), model);
- } else {
- MODEL_ENTRY (info)->parent = NULL;
- }
-}
-
-void
-mime_type_info_set_file_extensions (MimeTypeInfo *info, GList *list)
-{
- gnome_vfs_mime_extensions_list_free (info->file_extensions);
- info->file_extensions = list;
-}
-
-void
-mime_type_info_save (MimeTypeInfo *info)
-{
- gchar *tmp;
-
- gnome_vfs_mime_freeze ();
- gnome_vfs_mime_set_description (info->mime_type, info->description);
- gnome_vfs_mime_set_icon (info->mime_type, info->icon_name);
-
- /* Be really anal about validating this action */
- if (info->default_action != NULL) {
- if ( info->default_action->command == NULL ||
- *info->default_action->command == '\0' ||
- info->default_action->id == NULL ||
- *info->default_action->id == '\0') {
- g_warning ("Invalid application");
- gnome_vfs_mime_application_free (info->default_action);
- info->default_action = NULL;
- }
- }
-
- if (info->default_action != NULL) {
- gnome_vfs_mime_set_default_application (info->mime_type,
- info->default_action->id);
- gnome_vfs_mime_add_application_to_short_list (info->mime_type,
- info->default_action->id);
- } else
- gnome_vfs_mime_set_default_application (info->mime_type, NULL);
-
- tmp = form_extensions_string (info, " ", NULL);
- gnome_vfs_mime_set_extensions_list (info->mime_type, tmp);
- g_free (tmp);
-
- if (info->default_component != NULL)
- gnome_vfs_mime_set_default_component (info->mime_type, info->default_component->iid);
- else
- gnome_vfs_mime_set_default_component (info->mime_type, NULL);
-
- tmp = mime_type_info_get_category_name (info);
- gnome_vfs_mime_set_value (info->mime_type, "category", tmp);
- g_free (tmp);
-
- gnome_vfs_mime_set_value (info->mime_type, "use_category_default", info->use_category ? "yes" : "no");
-
- gnome_vfs_application_registry_sync ();
- gnome_vfs_mime_thaw ();
-}
-
-void
-mime_type_info_free (MimeTypeInfo *info)
-{
- g_free (info->mime_type);
- g_free (info->description);
- g_free (info->icon_name);
- g_free (info->icon_path);
- gnome_vfs_mime_extensions_list_free (info->file_extensions);
- CORBA_free (info->default_component);
- gnome_vfs_mime_application_free (info->default_action);
-
- if (info->icon_pixbuf != NULL)
- g_object_unref (G_OBJECT (info->icon_pixbuf));
- if (info->small_icon_pixbuf != NULL)
- g_object_unref (G_OBJECT (info->small_icon_pixbuf));
-
- g_free (info);
-}
-
-MimeCategoryInfo *
-mime_category_info_new (MimeCategoryInfo *parent, const gchar *name, const gchar *description, GtkTreeModel *model)
-{
- MimeCategoryInfo *info;
-
- info = g_new0 (MimeCategoryInfo, 1);
- MODEL_ENTRY (info)->type = MODEL_ENTRY_CATEGORY;
-
- info->name = g_strdup (name);
- info->description = g_strdup (description);
-
- if (parent != NULL)
- MODEL_ENTRY (info)->parent = MODEL_ENTRY (parent);
- else
- MODEL_ENTRY (info)->parent = get_model_entries (model);
-
- return info;
-}
-
-static gchar *
-get_gconf_base_name (MimeCategoryInfo *category)
-{
- gchar *tmp, *tmp1;
-
- tmp1 = mime_category_info_get_full_name (category);
-
- for (tmp = tmp1; *tmp != '\0'; tmp++)
- if (g_ascii_isspace (*tmp) || *tmp == '(' || *tmp == ')')
- *tmp = '-';
-
- tmp = g_strconcat ("/desktop/gnome/file-types-categories/", tmp1, NULL);
-
- g_free (tmp1);
- return tmp;
-}
-
-void
-mime_category_info_load_all (MimeCategoryInfo *category)
-{
- gchar *tmp, *tmp1;
- gchar *appid;
-
- tmp1 = get_gconf_base_name (category);
-
- if (category->default_action == NULL) {
- tmp = g_strconcat (tmp1, "/default-action-id", NULL);
- appid = gconf_client_get_string (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- if (appid != NULL && *appid != '\0')
- category->default_action = gnome_vfs_application_registry_get_mime_application (appid);
-
- /* This must be non NULL, so be extra careful incase gnome-vfs
- * spits back a NULL
- */
- if (category->default_action == NULL)
- category->default_action = g_new0 (GnomeVFSMimeApplication, 1);
- }
-
- if (!category->use_parent_cat_loaded) {
- if (category->entry.parent->type == MODEL_ENTRY_CATEGORY) {
- tmp = g_strconcat (tmp1, "/use-parent-category", NULL);
- category->use_parent_category = gconf_client_get_bool (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
- } else {
- category->use_parent_category = FALSE;
- }
-
- category->use_parent_cat_loaded = TRUE;
- }
-
- g_free (tmp1);
-}
-
-static void
-set_subcategory_ids (ModelEntry *entry, MimeCategoryInfo *category, gchar *app_id)
-{
- ModelEntry *tmp;
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- if (MIME_TYPE_INFO (entry)->use_category)
- gnome_vfs_mime_set_default_application (MIME_TYPE_INFO (entry)->mime_type, app_id);
-
- break;
-
- case MODEL_ENTRY_CATEGORY:
- if (entry != MODEL_ENTRY (category) && MIME_CATEGORY_INFO (entry)->use_parent_category)
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next)
- set_subcategory_ids (tmp, category, app_id);
- break;
-
- default:
- break;
- }
-}
-
-void
-mime_category_info_save (MimeCategoryInfo *category)
-{
- gchar *key, *basename;
- gboolean set_ids;
-
- g_warning ("Do not call this, nothing actually observes the gconf settings");
- return;
-
- /* Be really anal about validating this action */
- if (category->default_action != NULL) {
- if ( category->default_action->command == NULL ||
- *category->default_action->command == '\0' ||
- category->default_action->id == NULL ||
- *category->default_action->id == '\0') {
- g_warning ("Invalid application");
- gnome_vfs_mime_application_free (category->default_action);
- category->default_action = NULL;
- }
- }
-
- basename = get_gconf_base_name (category);
- key = g_strconcat (basename, "/default-action-id", NULL);
- if ((set_ids = (category->default_action != NULL)))
- gconf_client_set_string (gconf_client_get_default (),
- key, category->default_action->id, NULL);
- else
- gconf_client_unset (gconf_client_get_default (), key, NULL);
- g_free (key);
-
- key = g_strconcat (basename, "/use-parent-category", NULL);
- gconf_client_set_bool (gconf_client_get_default (), key,
- category->use_parent_category, NULL);
- g_free (key);
- g_free (basename);
-
- if (set_ids)
- set_subcategory_ids (MODEL_ENTRY (category), category, category->default_action->id);
-}
-
-static GList *
-find_possible_supported_apps (ModelEntry *entry, gboolean top)
-{
- GList *ret;
- ModelEntry *tmp;
-
- if (entry == NULL) return NULL;
-
- switch (entry->type) {
- case MODEL_ENTRY_CATEGORY:
- if (!top && !MIME_CATEGORY_INFO (entry)->use_parent_category)
- return NULL;
-
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next) {
- ret = find_possible_supported_apps (tmp, FALSE);
-
- if (ret != NULL)
- return ret;
- }
-
- return NULL;
-
- case MODEL_ENTRY_MIME_TYPE:
- if (mime_type_info_get_use_category (MIME_TYPE_INFO (entry)))
- return gnome_vfs_application_registry_get_applications (MIME_TYPE_INFO (entry)->mime_type);
- else
- return NULL;
-
- default:
- return NULL;
- }
-}
-
-static GList *
-intersect_lists (GList *list, GList *list1)
-{
- GList *tmp, *tmp1, *tmpnext;
-
- tmp = list;
-
- while (tmp != NULL) {
- tmpnext = tmp->next;
-
- for (tmp1 = list1; tmp1 != NULL; tmp1 = tmp1->next)
- if (!strcmp (tmp->data, tmp1->data))
- break;
-
- if (tmp1 == NULL)
- list = g_list_remove_link (list, tmp);
-
- tmp = tmpnext;
- }
-
- return list;
-}
-
-static GList *
-reduce_supported_app_list (ModelEntry *entry, GList *list, gboolean top)
-{
- GList *type_list;
- ModelEntry *tmp;
-
- switch (entry->type) {
- case MODEL_ENTRY_CATEGORY:
- if (!top && !MIME_CATEGORY_INFO (entry)->use_parent_category)
- break;
-
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next)
- list = reduce_supported_app_list (tmp, list, FALSE);
- break;
-
- case MODEL_ENTRY_MIME_TYPE:
- if (mime_type_info_get_use_category (MIME_TYPE_INFO (entry))) {
- type_list = gnome_vfs_application_registry_get_applications (MIME_TYPE_INFO (entry)->mime_type);
- list = intersect_lists (list, type_list);
- g_list_free (type_list);
- }
-
- break;
-
- default:
- break;
- }
-
- return list;
-}
-
-GList *
-mime_category_info_find_apps (MimeCategoryInfo *info)
-{
- return reduce_supported_app_list (MODEL_ENTRY (info),
- find_possible_supported_apps (MODEL_ENTRY (info), TRUE), TRUE);
-}
-
-gchar *
-mime_category_info_get_full_name (MimeCategoryInfo *info)
-{
- GString *string;
- ModelEntry *tmp;
- gchar *ret, *s;
-
- string = g_string_new (NULL);
-
- for (tmp = MODEL_ENTRY (info); tmp != NULL && tmp->type != MODEL_ENTRY_NONE; tmp = tmp->parent) {
- g_string_prepend (string, MIME_CATEGORY_INFO (tmp)->name);
- g_string_prepend (string, "/");
- }
-
- /* work around gcc 2.96 bug */
- s = (*string->str == '\0') ? string->str : string->str + 1;
- ret = g_strdup (s);
-
- g_string_free (string, TRUE);
- return ret;
-}
-
-gchar *
-mime_category_info_get_full_description (MimeCategoryInfo *info)
-{
- GString *string;
- ModelEntry *tmp;
- gchar *ret, *s;
-
- string = g_string_new (NULL);
-
- for (tmp = MODEL_ENTRY (info); tmp != NULL && tmp->type != MODEL_ENTRY_NONE; tmp = tmp->parent) {
- g_string_prepend (string, MIME_CATEGORY_INFO (tmp)->description);
- g_string_prepend (string, "/");
- }
-
-
- /* work around gcc 2.96 bug */
- s = (*string->str == '\0') ? string->str : string->str + 1;
- ret = g_strdup (s);
-
- g_string_free (string, TRUE);
- return ret;
-}
-
-char *
-mime_type_get_pretty_name_for_server (Bonobo_ServerInfo *server)
-{
- const char *view_as_name;
- char *display_name;
- GSList *langs;
-
- display_name = NULL;
-
- langs = get_lang_list ();
- view_as_name = bonobo_server_info_prop_lookup (server, "nautilus:view_as_name", langs);
-
- if (view_as_name == NULL)
- view_as_name = bonobo_server_info_prop_lookup (server, "name", langs);
-
- if (view_as_name == NULL)
- view_as_name = server->iid;
-
- g_slist_foreach (langs, (GFunc) g_free, NULL);
- g_slist_free (langs);
-
- /* if the name is an OAFIID, clean it up for display */
- if (!strncmp (view_as_name, "OAFIID:", strlen ("OAFIID:"))) {
- char *display_name, *colon_ptr;
-
- display_name = g_strdup (view_as_name + strlen ("OAFIID:"));
- colon_ptr = strchr (display_name, ':');
- if (colon_ptr)
- *colon_ptr = '\0';
-
- return display_name;
- }
-
- return g_strdup_printf (_("View as %s"), view_as_name);
-}
-
-static MimeTypeInfo *
-get_mime_type_info_int (ModelEntry *entry, const gchar *mime_type)
-{
- ModelEntry *tmp;
- MimeTypeInfo *ret;
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- if (!strcmp (MIME_TYPE_INFO (entry)->mime_type, mime_type))
- return MIME_TYPE_INFO (entry);
-
- return NULL;
-
- case MODEL_ENTRY_CATEGORY:
- case MODEL_ENTRY_NONE:
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next)
- if ((ret = get_mime_type_info_int (tmp, mime_type)) != NULL)
- return ret;
-
- return NULL;
-
- default:
- return NULL;
- }
-}
-
-MimeTypeInfo *
-get_mime_type_info (const gchar *mime_type)
-{
- return get_mime_type_info_int (get_model_entries (NULL), mime_type);
-}
-
-
-
-static const gchar *
-get_category_name (const gchar *mime_type)
-{
- const gchar *path;
-
- path = gnome_vfs_mime_get_value (mime_type, "category");
-
- if (path != NULL)
- return g_strdup (path);
- else if (!strncmp (mime_type, "image/", strlen ("image/")))
- return "Images";
- else if (!strncmp (mime_type, "video/", strlen ("video/")))
- return "Video";
- else if (!strncmp (mime_type, "audio/", strlen ("audio/")))
- return "Audio";
- else
- return "Misc";
-}
-
-static const gchar *
-get_category_description (const gchar *mime_type)
-{
- const gchar *path;
-
- path = gnome_vfs_mime_get_value (mime_type, "category");
-
- if (path != NULL)
- return g_strdup (path);
- else if (!strncmp (mime_type, "image/", strlen ("image/")))
- return _("Images");
- else if (!strncmp (mime_type, "video/", strlen ("video/")))
- return _("Video");
- else if (!strncmp (mime_type, "audio/", strlen ("audio/")))
- return _("Audio");
- else
- return _("Misc");
-}
-
-static GSList *
-get_lang_list (void)
-{
- GSList *retval;
- const GList *l;
-
- retval = NULL;
- for (l = gnome_i18n_get_language_list ("LANG") ; l; l = l->next)
- retval = g_slist_append (retval, g_strdup ((gchar *)l->data));
-
- return retval;
-}
-
-static gchar *
-form_extensions_string (const MimeTypeInfo *info, gchar *sep, gchar *prepend)
-{
- gchar *tmp;
- gchar **array;
- GList *l;
- gint i = 0;
-
- if (prepend == NULL)
- prepend = "";
-
- array = g_new0 (gchar *, g_list_length (info->file_extensions) + 1);
- for (l = info->file_extensions; l != NULL; l = l->next)
- array[i++] = g_strconcat (prepend, l->data, NULL);
- tmp = g_strjoinv (sep, array);
- g_strfreev (array);
-
- return tmp;
-}
-
-static MimeCategoryInfo *
-get_category (const gchar *category_name, const gchar *category_desc, GtkTreeModel *model)
-{
- ModelEntry *current, *child;
- gchar **cf = NULL, **df = NULL;
- gchar **categories = NULL, **desc_categories = NULL;
- int i;
-
- if (category_name == NULL && category_desc == NULL)
- return NULL;
-
- if (category_name != NULL)
- categories = cf = g_strsplit (category_name, "/", -1);
- if (category_desc != NULL)
- desc_categories = df = g_strsplit (category_desc, "/", -1);
- if (category_name == NULL)
- categories = desc_categories;
- else if (category_desc == NULL)
- desc_categories = categories;
-
- current = get_model_entries (model);
-
- for (i = 0; categories[i] != NULL; i++) {
- for (child = current->first_child; child != NULL; child = child->next) {
- if (child->type != MODEL_ENTRY_CATEGORY)
- continue;
-
- if (!g_ascii_strcasecmp ((category_name == NULL) ?
- MIME_CATEGORY_INFO (child)->description :
- MIME_CATEGORY_INFO (child)->name,
- categories[i]))
- break;
- }
-
- if (child == NULL) {
- child = MODEL_ENTRY (mime_category_info_new (MIME_CATEGORY_INFO (current), categories[i],
- desc_categories[i], model));
- model_entry_insert_child (MODEL_ENTRY (child)->parent, MODEL_ENTRY (child), model);
- }
-
- current = child;
- }
-
- g_strfreev (cf);
- g_strfreev (df);
-
- return MIME_CATEGORY_INFO (current);
-}
diff --git a/capplets/file-types/mime-type-info.h b/capplets/file-types/mime-type-info.h
deleted file mode 100644
index f211ff81f..000000000
--- a/capplets/file-types/mime-type-info.h
+++ /dev/null
@@ -1,118 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-type-info.h
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __MIME_TYPE_INFO_H
-#define __MIME_TYPE_INFO_H
-
-#include <gnome.h>
-#include <bonobo.h>
-#include <libgnomevfs/gnome-vfs-mime-info.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include "model-entry.h"
-
-G_BEGIN_DECLS
-
-#define MIME_TYPE_INFO(obj) ((MimeTypeInfo *) obj)
-#define MIME_CATEGORY_INFO(obj) ((MimeCategoryInfo *) obj)
-
-typedef struct _MimeTypeInfo MimeTypeInfo;
-typedef struct _MimeCategoryInfo MimeCategoryInfo;
-
-struct _MimeTypeInfo
-{
- ModelEntry entry;
-
- gchar *mime_type;
- gchar *description;
- gchar *icon_name;
- gchar *icon_path;
- GList *file_extensions;
-
- GdkPixbuf *icon_pixbuf;
- GdkPixbuf *small_icon_pixbuf;
-
- gboolean use_category;
- gboolean use_cat_loaded;
-
- Bonobo_ServerInfo *default_component;
- GnomeVFSMimeApplication *default_action;
-};
-
-struct _MimeCategoryInfo
-{
- ModelEntry entry;
-
- gchar *name;
- gchar *description;
- GnomeVFSMimeApplication *default_action;
-
- gboolean use_parent_category;
- gboolean use_parent_cat_loaded;
-};
-
-void load_all_mime_types (GtkTreeModel *model);
-
-MimeTypeInfo *mime_type_info_new (const gchar *mime_type,
- GtkTreeModel *model);
-
-void mime_type_info_load_all (MimeTypeInfo *info);
-const gchar *mime_type_info_get_description (MimeTypeInfo *info);
-GdkPixbuf *mime_type_info_get_icon (MimeTypeInfo *info);
-const GList *mime_type_info_get_file_extensions (MimeTypeInfo *info);
-const gchar *mime_type_info_get_icon_path (MimeTypeInfo *info);
-gboolean mime_type_info_get_use_category (MimeTypeInfo *info);
-
-void mime_type_info_save (MimeTypeInfo *info);
-void mime_type_info_free (MimeTypeInfo *info);
-
-gchar *mime_type_info_get_file_extensions_pretty_string
- (MimeTypeInfo *info);
-gchar *mime_type_info_get_category_name (const MimeTypeInfo *info);
-
-void mime_type_info_set_category_name (const MimeTypeInfo *info,
- const gchar *category_name,
- const gchar *category_desc,
- GtkTreeModel *model);
-void mime_type_info_set_file_extensions (MimeTypeInfo *info,
- GList *list);
-
-MimeCategoryInfo *mime_category_info_new (MimeCategoryInfo *parent,
- const gchar *name,
- const gchar *description,
- GtkTreeModel *model);
-void mime_category_info_load_all (MimeCategoryInfo *category);
-void mime_category_info_save (MimeCategoryInfo *category);
-
-GList *mime_category_info_find_apps (MimeCategoryInfo *info);
-gchar *mime_category_info_get_full_name (MimeCategoryInfo *info);
-gchar *mime_category_info_get_full_description (MimeCategoryInfo *info);
-
-gchar *mime_type_get_pretty_name_for_server (Bonobo_ServerInfo *server);
-
-MimeTypeInfo *get_mime_type_info (const gchar *mime_type);
-
-G_END_DECLS
-
-#endif /* __MIME_TYPE_INFO_H */
diff --git a/capplets/file-types/mime-types-model.c b/capplets/file-types/mime-types-model.c
deleted file mode 100644
index 5522d0ab1..000000000
--- a/capplets/file-types/mime-types-model.c
+++ /dev/null
@@ -1,624 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-types-model.c
- * Copyright (C) 2000 Red Hat, Inc.,
- * (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- * Based on code by Jonathan Blandford <jrb@redhat.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- *
- * The model-related bootstrapping is lifted from gtk+/gtk/gtktreestore.c
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "mime-types-model.h"
-#include "mime-type-info.h"
-#include "service-info.h"
-
-#define IS_CATEGORY(entry) ((entry) != NULL && (entry)->type == MODEL_ENTRY_CATEGORY)
-
-enum {
- PROP_0,
- PROP_CATEGORY_ONLY
-};
-
-struct _MimeTypesModelPrivate
-{
- gint stamp;
- gboolean category_only;
-};
-
-static GObjectClass *parent_class;
-
-
-
-static void mime_types_model_init (MimeTypesModel *mime_types_model,
- MimeTypesModelClass *class);
-static void mime_types_model_class_init (MimeTypesModelClass *class);
-static void mime_types_model_base_init (MimeTypesModelClass *class);
-
-static void mime_types_model_tree_model_init (GtkTreeModelIface *iface);
-
-static void mime_types_model_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void mime_types_model_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void mime_types_model_finalize (GObject *object);
-
-static guint mime_types_model_get_flags (GtkTreeModel *tree_model);
-static gint mime_types_model_get_n_columns (GtkTreeModel *tree_model);
-static GType mime_types_model_get_column_type (GtkTreeModel *tree_model,
- gint index);
-static gboolean mime_types_model_get_iter (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreePath *path);
-static GtkTreePath *mime_types_model_get_path (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static void mime_types_model_get_value (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- gint column,
- GValue *value);
-static gboolean mime_types_model_iter_next (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean mime_types_model_iter_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent);
-static gboolean mime_types_model_iter_has_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gint mime_types_model_iter_n_children (GtkTreeModel *tree_model,
- GtkTreeIter *iter);
-static gboolean mime_types_model_iter_nth_child (GtkTreeModel *tree_model,
- GtkTreeIter *iter,
- GtkTreeIter *parent,
- gint n);
-static gboolean mime_types_model_iter_parent (GtkTreeModel *tree_model,
- GtkTreeIter *result,
- GtkTreeIter *child);
-
-
-
-GType
-mime_types_model_get_type (void)
-{
- static GType mime_types_model_type = 0;
-
- if (!mime_types_model_type) {
- static const GTypeInfo mime_types_model_info = {
- sizeof (MimeTypesModelClass),
- (GBaseInitFunc) mime_types_model_base_init,
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) mime_types_model_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (MimeTypesModel),
- 0, /* n_preallocs */
- (GInstanceInitFunc) mime_types_model_init,
- NULL
- };
-
- static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) mime_types_model_tree_model_init,
- NULL,
- NULL
- };
-
- mime_types_model_type =
- g_type_register_static (G_TYPE_OBJECT,
- "MimeTypesModel",
- &mime_types_model_info, 0);
-
- g_type_add_interface_static (mime_types_model_type,
- GTK_TYPE_TREE_MODEL,
- &tree_model_info);
- }
-
- return mime_types_model_type;
-}
-
-static void
-mime_types_model_init (MimeTypesModel *mime_types_model, MimeTypesModelClass *class)
-{
- mime_types_model->p = g_new0 (MimeTypesModelPrivate, 1);
- mime_types_model->p->stamp = g_random_int ();
-}
-
-static void
-mime_types_model_base_init (MimeTypesModelClass *class)
-{
-}
-
-static void
-mime_types_model_class_init (MimeTypesModelClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->finalize = mime_types_model_finalize;
- object_class->set_property = mime_types_model_set_prop;
- object_class->get_property = mime_types_model_get_prop;
-
- g_object_class_install_property
- (object_class, PROP_CATEGORY_ONLY,
- g_param_spec_boolean ("category-only",
- _("Model for categories only"),
- _("Model for categories only"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- parent_class = G_OBJECT_CLASS
- (g_type_class_ref (G_TYPE_OBJECT));
-}
-
-static void
-mime_types_model_tree_model_init (GtkTreeModelIface *iface)
-{
- iface->get_flags = mime_types_model_get_flags;
- iface->get_n_columns = mime_types_model_get_n_columns;
- iface->get_column_type = mime_types_model_get_column_type;
- iface->get_iter = mime_types_model_get_iter;
- iface->get_path = mime_types_model_get_path;
- iface->get_value = mime_types_model_get_value;
- iface->iter_next = mime_types_model_iter_next;
- iface->iter_children = mime_types_model_iter_children;
- iface->iter_has_child = mime_types_model_iter_has_child;
- iface->iter_n_children = mime_types_model_iter_n_children;
- iface->iter_nth_child = mime_types_model_iter_nth_child;
- iface->iter_parent = mime_types_model_iter_parent;
-}
-
-static void
-mime_types_model_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- MimeTypesModel *mime_types_model;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (object));
-
- mime_types_model = MIME_TYPES_MODEL (object);
-
- switch (prop_id) {
- case PROP_CATEGORY_ONLY:
- mime_types_model->p->category_only = g_value_get_boolean (value);
- break;
-
- default:
- g_warning ("Bad property set");
- break;
- }
-}
-
-static void
-mime_types_model_get_prop (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- MimeTypesModel *mime_types_model;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (object));
-
- mime_types_model = MIME_TYPES_MODEL (object);
-
- switch (prop_id) {
- case PROP_CATEGORY_ONLY:
- g_value_set_boolean (value, mime_types_model->p->category_only);
- break;
-
- default:
- g_warning ("Bad property get");
- break;
- }
-}
-
-static void
-mime_types_model_finalize (GObject *object)
-{
- MimeTypesModel *mime_types_model;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (object));
-
- mime_types_model = MIME_TYPES_MODEL (object);
-
- g_free (mime_types_model->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-
-
-GObject *
-mime_types_model_new (gboolean category_only)
-{
- return g_object_new (mime_types_model_get_type (),
- "category-only", category_only,
- NULL);
-}
-
-void
-mime_types_model_construct_iter (MimeTypesModel *model, ModelEntry *entry, GtkTreeIter *iter)
-{
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (model));
- g_return_if_fail (iter != NULL);
-
- iter->stamp = model->p->stamp;
- iter->user_data = entry;
-}
-
-
-
-static guint
-mime_types_model_get_flags (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (tree_model != NULL, 0);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), 0);
-
- return GTK_TREE_MODEL_ITERS_PERSIST;
-}
-
-static gint
-mime_types_model_get_n_columns (GtkTreeModel *tree_model)
-{
- g_return_val_if_fail (tree_model != NULL, 0);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), 0);
-
- return MODEL_LAST_COLUMN;
-}
-
-static GType
-mime_types_model_get_column_type (GtkTreeModel *tree_model, gint index)
-{
- g_return_val_if_fail (tree_model != NULL, G_TYPE_INVALID);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), G_TYPE_INVALID);
-
- switch (index) {
- case MODEL_COLUMN_MIME_TYPE:
- case MODEL_COLUMN_DESCRIPTION:
- case MODEL_COLUMN_FILE_EXT:
- return G_TYPE_STRING;
- break;
-
- case MODEL_COLUMN_ICON:
- return GDK_TYPE_PIXBUF;
- break;
-
- default:
- return G_TYPE_INVALID;
- break;
- }
-}
-
-/* Adapted from gtk+/gtk/gtktreestore.c, gtk_tree_store_get_iter */
-
-static gboolean
-mime_types_model_get_iter (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreePath *path)
-{
- MimeTypesModel *model;
- gint *indices, depth, i;
- GtkTreeIter parent;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
-
- indices = gtk_tree_path_get_indices (path);
- depth = gtk_tree_path_get_depth (path);
-
- g_return_val_if_fail (depth > 0, FALSE);
-
- parent.stamp = model->p->stamp;
- parent.user_data = get_model_entries (tree_model);
-
- if (!gtk_tree_model_iter_nth_child (tree_model, iter, &parent, indices[0]))
- return FALSE;
-
- for (i = 1; i < depth; i++) {
- parent = *iter;
- if (!gtk_tree_model_iter_nth_child (tree_model, iter, &parent, indices[i]))
- return FALSE;
- }
-
- return TRUE;
-}
-
-static GtkTreePath *
-mime_types_model_get_path (GtkTreeModel *tree_model, GtkTreeIter *iter)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
- GtkTreePath *path;
-
- g_return_val_if_fail (tree_model != NULL, NULL);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), NULL);
-
- model = MIME_TYPES_MODEL (tree_model);
-
- path = gtk_tree_path_new ();
- entry = iter->user_data;
-
- while (entry->parent != NULL) {
- gtk_tree_path_prepend_index (path, model_entry_get_index (entry->parent, entry));
- entry = entry->parent;
- }
-
- return path;
-}
-
-static void
-mime_types_model_get_value (GtkTreeModel *tree_model, GtkTreeIter *iter, gint column, GValue *value)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
- GdkPixbuf *icon;
- gchar *pretty_string;
-
- g_return_if_fail (tree_model != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (tree_model));
-
- model = MIME_TYPES_MODEL (tree_model);
- entry = iter->user_data;
-
- switch (column) {
- case MODEL_COLUMN_MIME_TYPE:
- g_value_init (value, G_TYPE_STRING);
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- g_value_set_static_string (value, MIME_TYPE_INFO (entry)->mime_type);
- break;
-
- case MODEL_ENTRY_SERVICE:
- g_value_set_static_string (value, SERVICE_INFO (entry)->protocol);
- break;
-
- default:
- g_value_set_string (value, "");
- break;
- }
-
- break;
-
- case MODEL_COLUMN_DESCRIPTION:
- g_value_init (value, G_TYPE_STRING);
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- g_value_set_static_string (value, mime_type_info_get_description (MIME_TYPE_INFO (entry)));
- break;
-
- case MODEL_ENTRY_CATEGORY:
- g_value_set_static_string (value, MIME_CATEGORY_INFO (entry)->description);
- break;
-
- case MODEL_ENTRY_SERVICE:
- g_value_set_static_string (value, service_info_get_description (SERVICE_INFO (entry)));
- break;
-
- case MODEL_ENTRY_SERVICES_CATEGORY:
- g_value_set_static_string (value, _("Internet Services"));
- break;
-
- default:
- g_value_set_string (value, "");
- break;
- }
-
- break;
-
- case MODEL_COLUMN_ICON:
- g_value_init (value, GDK_TYPE_PIXBUF);
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- icon = mime_type_info_get_icon (MIME_TYPE_INFO (entry));
-
- if (icon != NULL)
- g_value_set_object (value, G_OBJECT (icon));
- else
- g_value_set_object (value, NULL);
-
- break;
-
- default:
- g_value_set_object (value, NULL);
- break;
- }
-
- break;
-
- case MODEL_COLUMN_FILE_EXT:
- g_value_init (value, G_TYPE_STRING);
-
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- pretty_string = mime_type_info_get_file_extensions_pretty_string (MIME_TYPE_INFO (entry));
- g_value_set_string (value, pretty_string);
- g_free (pretty_string);
- break;
-
- case MODEL_ENTRY_SERVICE:
- g_value_set_static_string (value, SERVICE_INFO (entry)->protocol);
- break;
-
- default:
- g_value_set_string (value, "");
- break;
- }
-
- break;
- }
-}
-
-static gboolean
-mime_types_model_iter_next (GtkTreeModel *tree_model, GtkTreeIter *iter)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
- entry = iter->user_data;
-
- if (entry != NULL)
- iter->user_data = entry->next;
-
- if (model->p->category_only)
- while (iter->user_data != NULL && !IS_CATEGORY (MODEL_ENTRY (iter->user_data)))
- iter->user_data = MODEL_ENTRY (iter->user_data)->next;
-
- return iter->user_data != NULL;
-}
-
-static gboolean
-mime_types_model_iter_children (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
-
- if (parent != NULL)
- entry = parent->user_data;
- else
- entry = get_model_entries (tree_model);
-
- iter->user_data = entry->first_child;
-
- if (model->p->category_only)
- while (iter->user_data != NULL && !IS_CATEGORY (MODEL_ENTRY (iter->user_data)))
- iter->user_data = MODEL_ENTRY (iter->user_data)->next;
-
- return iter->user_data != NULL;
-}
-
-static gboolean
-mime_types_model_iter_has_child (GtkTreeModel *tree_model, GtkTreeIter *iter)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
- entry = iter->user_data;
-
- if (entry == NULL)
- return get_model_entries (tree_model)->first_child != NULL;
- else if (!model->p->category_only || IS_CATEGORY (entry->first_child))
- return entry->first_child != NULL;
- else {
- for (entry = entry->first_child; entry != NULL; entry = entry->next)
- if (IS_CATEGORY (entry))
- return TRUE;
-
- return FALSE;
- }
-}
-
-static gint
-mime_types_model_iter_n_children (GtkTreeModel *tree_model, GtkTreeIter *iter)
-{
- MimeTypesModel *model;
- ModelEntry *entry, *tmp;
- gint count = 0;
-
- g_return_val_if_fail (tree_model != NULL, 0);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), 0);
-
- model = MIME_TYPES_MODEL (tree_model);
-
- if (iter != NULL)
- entry = iter->user_data;
- else
- entry = NULL;
-
- if (entry == NULL)
- entry = get_model_entries (tree_model);
-
- if (model->p->category_only) {
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next) {
- if (tmp->type == MODEL_ENTRY_CATEGORY)
- count++;
- }
- } else {
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next)
- count++;
- }
-
- return count;
-}
-
-static gboolean
-mime_types_model_iter_nth_child (GtkTreeModel *tree_model, GtkTreeIter *iter, GtkTreeIter *parent, gint n)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
-
- if (parent != NULL)
- entry = parent->user_data;
- else
- entry = NULL;
-
- if (entry == NULL)
- iter->user_data = model_entry_get_nth_child (get_model_entries (tree_model), n, model->p->category_only);
- else
- iter->user_data = model_entry_get_nth_child (entry, n, model->p->category_only);
-
- return iter->user_data != NULL;
-}
-
-static gboolean
-mime_types_model_iter_parent (GtkTreeModel *tree_model, GtkTreeIter *result, GtkTreeIter *child)
-{
- MimeTypesModel *model;
- ModelEntry *entry;
-
- g_return_val_if_fail (tree_model != NULL, FALSE);
- g_return_val_if_fail (IS_MIME_TYPES_MODEL (tree_model), FALSE);
-
- model = MIME_TYPES_MODEL (tree_model);
- entry = child->user_data;
-
- if (entry != NULL && entry->parent->type != MODEL_ENTRY_NONE)
- result->user_data = entry->parent;
- else
- result->user_data = NULL;
-
- return result->user_data != NULL;
-}
-
diff --git a/capplets/file-types/mime-types-model.h b/capplets/file-types/mime-types-model.h
deleted file mode 100644
index 38a655404..000000000
--- a/capplets/file-types/mime-types-model.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mime-types-model.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __MIME_TYPES_MODEL_H
-#define __MIME_TYPES_MODEL_H
-
-#include <gnome.h>
-
-#include "model-entry.h"
-
-G_BEGIN_DECLS
-
-#define MIME_TYPES_MODEL(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, mime_types_model_get_type (), MimeTypesModel)
-#define MIME_TYPES_MODEL_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, mime_types_model_get_type (), MimeTypesModelClass)
-#define IS_MIME_TYPES_MODEL(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, mime_types_model_get_type ())
-
-#define MODEL_ENTRY_FROM_ITER(obj) (MODEL_ENTRY ((obj)->user_data))
-
-typedef struct _MimeTypesModel MimeTypesModel;
-typedef struct _MimeTypesModelClass MimeTypesModelClass;
-typedef struct _MimeTypesModelPrivate MimeTypesModelPrivate;
-
-enum {
- MODEL_COLUMN_MIME_TYPE,
- MODEL_COLUMN_DESCRIPTION,
- MODEL_COLUMN_ICON,
- MODEL_COLUMN_FILE_EXT,
- MODEL_LAST_COLUMN
-};
-
-struct _MimeTypesModel
-{
- GObject parent;
-
- MimeTypesModelPrivate *p;
-};
-
-struct _MimeTypesModelClass
-{
- GObjectClass g_object_class;
-};
-
-GType mime_types_model_get_type (void);
-
-GObject *mime_types_model_new (gboolean category_only);
-
-void mime_types_model_construct_iter (MimeTypesModel *model,
- ModelEntry *entry,
- GtkTreeIter *iter);
-
-G_END_DECLS
-
-#endif /* __MIME_TYPES_MODEL_H */
diff --git a/capplets/file-types/model-entry.c b/capplets/file-types/model-entry.c
deleted file mode 100644
index 551f0d63e..000000000
--- a/capplets/file-types/model-entry.c
+++ /dev/null
@@ -1,215 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* model-entry.c
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "model-entry.h"
-#include "mime-type-info.h"
-#include "service-info.h"
-#include "mime-types-model.h"
-
-ModelEntry *
-get_model_entries (GtkTreeModel *model)
-{
- static ModelEntry *root = NULL;
-
- if (root == NULL) {
- root = g_new0 (ModelEntry, 1);
- root->type = MODEL_ENTRY_NONE;
-
- load_all_mime_types (model);
- load_all_services (model);
- }
-
- return root;
-}
-
-ModelEntry *
-model_entry_get_nth_child (ModelEntry *entry, gint n, gboolean categories_only)
-{
- ModelEntry *tmp;
-
- g_return_val_if_fail (entry != NULL, NULL);
- g_return_val_if_fail (entry->type == MODEL_ENTRY_CATEGORY || entry->type == MODEL_ENTRY_SERVICES_CATEGORY ||
- entry->type == MODEL_ENTRY_NONE, NULL);
-
- for (tmp = entry->first_child; tmp != NULL; tmp = tmp->next) {
- if (categories_only && tmp->type != MODEL_ENTRY_CATEGORY)
- continue;
-
- if (n-- == 0)
- break;
- }
-
- return tmp;
-}
-
-gint
-model_entry_get_index (ModelEntry *parent, ModelEntry *child)
-{
- ModelEntry *tmp;
- gint i = 0;
-
- g_return_val_if_fail (parent != NULL, -1);
- g_return_val_if_fail (parent->type == MODEL_ENTRY_CATEGORY || parent->type == MODEL_ENTRY_SERVICES_CATEGORY ||
- parent->type == MODEL_ENTRY_NONE, -1);
- g_return_val_if_fail (child != NULL, -1);
-
- for (tmp = parent->first_child; tmp != NULL && tmp != child; tmp = tmp->next)
- i++;
-
- if (tmp == child)
- return i;
- else
- return -1;
-}
-
-void
-model_entry_insert_child (ModelEntry *parent, ModelEntry *child, GtkTreeModel *model)
-{
- ModelEntry **tmp;
- GtkTreePath *path;
- GtkTreeIter iter;
-
- g_return_if_fail (parent != NULL);
- g_return_if_fail (parent->type == MODEL_ENTRY_CATEGORY || parent->type == MODEL_ENTRY_SERVICES_CATEGORY ||
- parent->type == MODEL_ENTRY_NONE);
- g_return_if_fail (child != NULL);
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (model));
-
- for (tmp = &parent->first_child; *tmp != NULL; tmp = &((*tmp)->next)) {
- if ((*tmp)->type < child->type)
- continue;
- if ((*tmp)->type > child->type)
- break;
-
- if (child->type == MODEL_ENTRY_CATEGORY) {
- if (MIME_CATEGORY_INFO (child)->name != NULL &&
- MIME_CATEGORY_INFO (*tmp)->name != NULL &&
- strcmp (MIME_CATEGORY_INFO (child)->name,
- MIME_CATEGORY_INFO (*tmp)->name) < 0)
- break;
- } else if (child->type == MODEL_ENTRY_MIME_TYPE) {
- if (MIME_TYPE_INFO (child)->description != NULL &&
- MIME_TYPE_INFO (*tmp)->description != NULL &&
- strcmp (MIME_TYPE_INFO (child)->description,
- MIME_TYPE_INFO (*tmp)->description) < 0)
- break;
- }
- }
-
- child->parent = parent;
- child->next = *tmp;
- *tmp = child;
-
- mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
- path = gtk_tree_model_get_path (model, &iter);
- gtk_tree_model_row_inserted (model, path, &iter);
- gtk_tree_path_free (path);
-}
-
-void
-model_entry_remove_child (ModelEntry *entry, ModelEntry *child, GtkTreeModel *model)
-{
- ModelEntry *tmp;
- GtkTreePath *path;
- GtkTreeIter iter;
- gboolean found = TRUE;
-
- g_return_if_fail (entry != NULL);
- g_return_if_fail (entry->type == MODEL_ENTRY_CATEGORY || entry->type == MODEL_ENTRY_SERVICES_CATEGORY ||
- entry->type == MODEL_ENTRY_NONE);
- g_return_if_fail (child != NULL);
- g_return_if_fail (model != NULL);
- g_return_if_fail (IS_MIME_TYPES_MODEL (model));
-
- mime_types_model_construct_iter (MIME_TYPES_MODEL (model), child, &iter);
- path = gtk_tree_model_get_path (model, &iter);
-
- if (entry->first_child == NULL) {
- return;
- }
- else if (entry->first_child == child) {
- entry->first_child = child->next;
- } else {
- for (tmp = entry->first_child; tmp->next != NULL && tmp->next != child; tmp = tmp->next);
-
- if (tmp->next != NULL)
- tmp->next = child->next;
- else
- found = FALSE;
- }
-
- child->parent = NULL;
-
- if (found)
- gtk_tree_model_row_deleted (model, path);
-
- gtk_tree_path_free (path);
-}
-
-void
-model_entry_save (ModelEntry *entry)
-{
- gnome_vfs_mime_freeze ();
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- mime_type_info_save (MIME_TYPE_INFO (entry));
- break;
-
- case MODEL_ENTRY_SERVICE:
- service_info_save (SERVICE_INFO (entry));
- break;
-
- case MODEL_ENTRY_CATEGORY:
- mime_category_info_save (MIME_CATEGORY_INFO (entry));
- break;
-
- default:
- break;
- }
- gnome_vfs_mime_thaw ();
-}
-
-void
-model_entry_delete (ModelEntry *entry)
-{
- switch (entry->type) {
- case MODEL_ENTRY_MIME_TYPE:
- gnome_vfs_mime_registered_mime_type_delete (MIME_TYPE_INFO (entry)->mime_type);
- mime_type_info_free (MIME_TYPE_INFO (entry));
- break;
-
- case MODEL_ENTRY_SERVICE:
- service_info_delete (SERVICE_INFO (entry));
- service_info_free (SERVICE_INFO (entry));
- break;
-
- default:
- break;
- }
-}
diff --git a/capplets/file-types/model-entry.h b/capplets/file-types/model-entry.h
deleted file mode 100644
index 1d4ba6a42..000000000
--- a/capplets/file-types/model-entry.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* model-entry.h
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __MODEL_ENTRY_H
-#define __MODEL_ENTRY_H
-
-#include <gnome.h>
-
-G_BEGIN_DECLS
-
-typedef struct _ModelEntry ModelEntry;
-
-typedef enum {
- MODEL_ENTRY_NONE, MODEL_ENTRY_CATEGORY, MODEL_ENTRY_SERVICES_CATEGORY,
- MODEL_ENTRY_MIME_TYPE, MODEL_ENTRY_SERVICE
-} ModelEntryType;
-
-#define MODEL_ENTRY(obj) ((ModelEntry *) obj)
-
-struct _ModelEntry
-{
- ModelEntryType type;
-
- struct _ModelEntry *next;
- struct _ModelEntry *parent;
- struct _ModelEntry *first_child;
-};
-
-ModelEntry *get_model_entries (GtkTreeModel *model);
-
-ModelEntry *model_entry_get_nth_child (ModelEntry *entry,
- gint n,
- gboolean categories_only);
-
-gint model_entry_get_index (ModelEntry *parent,
- ModelEntry *child);
-
-void model_entry_insert_child (ModelEntry *entry,
- ModelEntry *child,
- GtkTreeModel *model);
-void model_entry_remove_child (ModelEntry *entry,
- ModelEntry *child,
- GtkTreeModel *model);
-
-void model_entry_save (ModelEntry *entry);
-void model_entry_delete (ModelEntry *entry);
-
-G_END_DECLS
-
-#endif /* __MODEL_ENTRY_H */
diff --git a/capplets/file-types/service-edit-dialog.c b/capplets/file-types/service-edit-dialog.c
deleted file mode 100644
index d01b59282..000000000
--- a/capplets/file-types/service-edit-dialog.c
+++ /dev/null
@@ -1,602 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* service-edit-dialog.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <glade/glade.h>
-#include <gconf/gconf-client.h>
-#include <libgnomevfs/gnome-vfs-method.h>
-#include <ctype.h>
-
-#include "service-edit-dialog.h"
-#include "mime-types-model.h"
-
-#define WID(x) (glade_xml_get_widget (dialog->p->dialog_xml, x))
-
-enum {
- PROP_0,
- PROP_MODEL,
- PROP_INFO,
- PROP_IS_ADD
-};
-
-struct _ServiceEditDialogPrivate
-{
- ServiceInfo *info;
- GladeXML *dialog_xml;
- GtkWidget *dialog_win;
- gboolean is_add;
-
- GtkTreeModel *model;
-};
-
-static GObjectClass *parent_class;
-
-static void service_edit_dialog_init (ServiceEditDialog *dialog,
- ServiceEditDialogClass *class);
-static void service_edit_dialog_class_init (ServiceEditDialogClass *class);
-static void service_edit_dialog_base_init (ServiceEditDialogClass *class);
-
-static void service_edit_dialog_set_prop (GObject *object,
- guint prop_id,
- const GValue *value,
- GParamSpec *pspec);
-static void service_edit_dialog_get_prop (GObject *object,
- guint prop_id,
- GValue *value,
- GParamSpec *pspec);
-
-static void service_edit_dialog_dispose (GObject *object);
-static void service_edit_dialog_finalize (GObject *object);
-
-static void fill_dialog (ServiceEditDialog *dialog);
-static void setup_add_dialog (ServiceEditDialog *dialog);
-
-static void populate_app_list (ServiceEditDialog *dialog);
-
-static void store_data (ServiceEditDialog *dialog);
-static gboolean validate_data (ServiceEditDialog *dialog);
-
-#ifdef SUPPORT_CHECK_CONTENT
-static void program_sensitive_cb (ServiceEditDialog *dialog,
- GtkToggleButton *tb);
-#endif
-static void program_changed_cb (ServiceEditDialog *dialog,
- GtkOptionMenu *option_menu);
-
-static void response_cb (ServiceEditDialog *dialog,
- gint response_id);
-
-GType
-service_edit_dialog_get_type (void)
-{
- static GType service_edit_dialog_type = 0;
-
- if (!service_edit_dialog_type) {
- GTypeInfo service_edit_dialog_info = {
- sizeof (ServiceEditDialogClass),
- (GBaseInitFunc) service_edit_dialog_base_init,
- NULL, /* GBaseFinalizeFunc */
- (GClassInitFunc) service_edit_dialog_class_init,
- NULL, /* GClassFinalizeFunc */
- NULL, /* user-supplied data */
- sizeof (ServiceEditDialog),
- 0, /* n_preallocs */
- (GInstanceInitFunc) service_edit_dialog_init,
- NULL
- };
-
- service_edit_dialog_type =
- g_type_register_static (G_TYPE_OBJECT,
- "ServiceEditDialog",
- &service_edit_dialog_info, 0);
- }
-
- return service_edit_dialog_type;
-}
-
-static void
-service_edit_dialog_init (ServiceEditDialog *dialog, ServiceEditDialogClass *class)
-{
- GtkSizeGroup *size_group;
-
- dialog->p = g_new0 (ServiceEditDialogPrivate, 1);
- dialog->p->dialog_xml = glade_xml_new
- (GNOMECC_DATA_DIR "/interfaces/file-types-properties.glade", "service_edit_widget", NULL);
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("description_label"));
- gtk_size_group_add_widget (size_group, WID ("protocol_label"));
-
- dialog->p->dialog_win = gtk_dialog_new_with_buttons
- (_("Edit service information"), NULL, -1,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK,
- NULL);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog->p->dialog_win)->vbox), WID ("service_edit_widget"), TRUE, TRUE, 0);
-
-#ifdef SUPPORT_CHECK_CONTENT
- g_signal_connect_swapped (G_OBJECT (WID ("run_program_toggle")), "toggled", (GCallback) program_sensitive_cb, dialog);
-#endif /* SUPPORT_CHECK_CONTENT */
- g_signal_connect_swapped (G_OBJECT (WID ("program_select")), "changed", (GCallback) program_changed_cb, dialog);
-
- g_signal_connect_swapped (G_OBJECT (dialog->p->dialog_win), "response", (GCallback) response_cb, dialog);
-}
-
-static void
-service_edit_dialog_base_init (ServiceEditDialogClass *class)
-{
-}
-
-static void
-service_edit_dialog_class_init (ServiceEditDialogClass *class)
-{
- GObjectClass *object_class;
-
- object_class = G_OBJECT_CLASS (class);
-
- object_class->dispose = service_edit_dialog_dispose;
- object_class->finalize = service_edit_dialog_finalize;
- object_class->set_property = service_edit_dialog_set_prop;
- object_class->get_property = service_edit_dialog_get_prop;
-
- g_object_class_install_property
- (object_class, PROP_MODEL,
- g_param_spec_object ("model",
- _("Model"),
- _("Model"),
- gtk_tree_model_get_type (),
- G_PARAM_READWRITE));
-
- g_object_class_install_property
- (object_class, PROP_INFO,
- g_param_spec_pointer ("service-info",
- _("Service info"),
- _("Structure containing service information"),
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- g_object_class_install_property
- (object_class, PROP_IS_ADD,
- g_param_spec_boolean ("is-add",
- _("Is add"),
- _("TRUE if this is an add service dialog"),
- FALSE,
- G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY));
-
- parent_class = G_OBJECT_CLASS
- (g_type_class_ref (G_TYPE_OBJECT));
-}
-
-static void
-service_edit_dialog_set_prop (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec)
-{
- ServiceEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_SERVICE_EDIT_DIALOG (object));
-
- dialog = SERVICE_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- dialog->p->model = GTK_TREE_MODEL (g_value_get_object (value));
- break;
-
- case PROP_INFO:
- if (!dialog->p->is_add && g_value_get_pointer (value) != NULL) {
- dialog->p->info = g_value_get_pointer (value);
- fill_dialog (dialog);
- gtk_widget_show_all (dialog->p->dialog_win);
- }
-
- break;
-
- case PROP_IS_ADD:
- dialog->p->is_add = g_value_get_boolean (value);
-
- if (dialog->p->is_add) {
- dialog->p->info = service_info_new (NULL, NULL);
- setup_add_dialog (dialog);
- gtk_window_set_title (GTK_WINDOW (dialog->p->dialog_win),
- (_("Add Service")));
- gtk_widget_show_all (dialog->p->dialog_win);
- }
-
- break;
-
- default:
- g_warning ("Bad property set");
- break;
- }
-}
-
-static void
-service_edit_dialog_get_prop (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
-{
- ServiceEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_SERVICE_EDIT_DIALOG (object));
-
- dialog = SERVICE_EDIT_DIALOG (object);
-
- switch (prop_id) {
- case PROP_MODEL:
- g_value_set_object (value, G_OBJECT (dialog->p->model));
- break;
-
- case PROP_INFO:
- g_value_set_pointer (value, dialog->p->info);
- break;
-
- case PROP_IS_ADD:
- g_value_set_boolean (value, dialog->p->is_add);
- break;
-
- default:
- g_warning ("Bad property get");
- break;
- }
-}
-
-static void
-service_edit_dialog_dispose (GObject *object)
-{
- ServiceEditDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_SERVICE_EDIT_DIALOG (object));
-
- dialog = SERVICE_EDIT_DIALOG (object);
-
- if (dialog->p->dialog_win != NULL) {
- gtk_widget_destroy (dialog->p->dialog_win);
- dialog->p->dialog_win = NULL;
- }
-
- if (dialog->p->dialog_xml != NULL) {
- g_object_unref (G_OBJECT (dialog->p->dialog_xml));
- dialog->p->dialog_xml = NULL;
- }
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-service_edit_dialog_finalize (GObject *object)
-{
- ServiceEditDialog *service_edit_dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_SERVICE_EDIT_DIALOG (object));
-
- service_edit_dialog = SERVICE_EDIT_DIALOG (object);
-
- g_free (service_edit_dialog->p);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GObject *
-service_edit_dialog_new (GtkTreeModel *model, ServiceInfo *info)
-{
- return g_object_new (service_edit_dialog_get_type (),
- "model", model,
- "service-info", info,
- NULL);
-}
-
-GObject *
-service_add_dialog_new (GtkTreeModel *model)
-{
- return g_object_new (service_edit_dialog_get_type (),
- "model", model,
- "is-add", TRUE,
- NULL);
-}
-
-static void
-fill_dialog (ServiceEditDialog *dialog)
-{
- service_info_load_all (dialog->p->info);
-
- gtk_entry_set_text (GTK_ENTRY (WID ("description_entry")), service_info_get_description (dialog->p->info));
-
- if (dialog->p->info->protocol != NULL) {
-#if 0
- /* this causes the validate check later to fail */
- if (strcmp (dialog->p->info->protocol, "unknown"))
-#endif
- gtk_entry_set_text (GTK_ENTRY (WID ("protocol_entry")), dialog->p->info->protocol);
-
- gtk_widget_set_sensitive (WID ("protocol_entry"), FALSE);
- }
-
-#ifdef SUPPORT_CHECK_CONTENT
- /* Keep the look at content toggle disabled until we support that in libgnome */
- if (gnome_vfs_method_get (dialog->p->info->protocol) == NULL)
- gtk_widget_set_sensitive (WID ("look_at_content_toggle"), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("look_at_content_toggle")), !dialog->p->info->run_program);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("run_program_toggle")), dialog->p->info->run_program);
-#endif
-
- if (!dialog->p->info->run_program && strcmp (dialog->p->info->protocol, "ftp"))
- gtk_widget_set_sensitive (WID ("program_frame"), FALSE);
-
- populate_app_list (dialog);
-}
-
-static void
-setup_add_dialog (ServiceEditDialog *dialog)
-{
- GtkWidget *menu, *item;
-
- item = gtk_menu_item_new_with_label (_("Custom"));
- menu = gtk_menu_new ();
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("program_select")), menu);
-
- gtk_widget_set_sensitive (WID ("program_select"), FALSE);
-
-#ifdef SUPPORT_CHECK_CONTENT
- /* Disabled above so ignore it here */
- gtk_widget_set_sensitive (WID ("look_at_content_toggle"), FALSE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("run_program_toggle")), TRUE);
-#endif
-}
-
-static void
-populate_app_list (ServiceEditDialog *dialog)
-{
- GtkOptionMenu *program_select;
- GtkMenu *menu;
- GtkWidget *item;
- gint found_idx = -1, i = 0;
-
- const GList *service_apps;
- GnomeVFSMimeApplication *app;
-
- program_select = GTK_OPTION_MENU (WID ("program_select"));
- menu = GTK_MENU (gtk_menu_new ());
- service_apps = get_apps_for_service_type (dialog->p->info->protocol);
-
- if (service_apps == NULL)
- gtk_widget_set_sensitive (GTK_WIDGET (program_select), FALSE);
-
- while (service_apps != NULL) {
- app = service_apps->data;
-
- if (dialog->p->info->app != NULL &&
- dialog->p->info->app->id != NULL &&
- !strcmp (dialog->p->info->app->id, app->id))
- found_idx = i;
-
- item = gtk_menu_item_new_with_label (app->name);
- g_object_set_data_full (G_OBJECT (item), "app", gnome_vfs_mime_application_copy (app), (GDestroyNotify) gnome_vfs_mime_application_free);
- gtk_widget_show (item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
-
- service_apps = service_apps->next;
- i++;
- }
-
- item = gtk_menu_item_new_with_label (_("Custom"));
- gtk_widget_show (item);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), item);
- if (found_idx < 0)
- found_idx = i;
-
- gtk_option_menu_set_menu (program_select, GTK_WIDGET (menu));
- gtk_option_menu_set_history (program_select, found_idx);
- /* fire it again just in case we had selected the 1st element */
- program_changed_cb (dialog, program_select);
-}
-
-static void
-store_data (ServiceEditDialog *dialog)
-{
- GtkOptionMenu *option_menu;
- GtkMenuShell *menu_shell;
- GObject *menu_item;
- gint idx;
-
- GnomeVFSMimeApplication *app;
-
- GtkTreePath *path;
- GtkTreeIter iter;
-
- if (dialog->p->is_add)
- dialog->p->info->protocol = g_strdup (gtk_entry_get_text (GTK_ENTRY (WID ("protocol_entry"))));
-
- g_free (dialog->p->info->description);
- dialog->p->info->description = g_strdup (gtk_entry_get_text (GTK_ENTRY (WID ("description_entry"))));
-
-#ifdef SUPPORT_CHECK_CONTENT
- dialog->p->info->run_program =
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("run_program_toggle")));
-#else
- dialog->p->info->run_program = TRUE;
-#endif
-
- option_menu = GTK_OPTION_MENU (WID ("program_select"));
- menu_shell = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu));
- idx = gtk_option_menu_get_history (option_menu);
- menu_item = (g_list_nth (menu_shell->children, idx))->data;
-
- app = g_object_get_data (menu_item, "app");
- if (app != NULL) {
- gnome_vfs_mime_application_free (dialog->p->info->app);
- dialog->p->info->app = gnome_vfs_mime_application_copy (app);
- } else {
- if (!service_info_using_custom_app (dialog->p->info)) {
- gnome_vfs_mime_application_free (dialog->p->info->app);
- dialog->p->info->app = g_new0 (GnomeVFSMimeApplication, 1);
- }
-
- g_free (dialog->p->info->app->command);
- dialog->p->info->app->command
- = g_strdup (gtk_entry_get_text (GTK_ENTRY
- (gnome_file_entry_gtk_entry
- (GNOME_FILE_ENTRY (WID ("custom_program_entry"))))));
- dialog->p->info->app->requires_terminal
- = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (WID ("needs_terminal_toggle")));
- }
-
- model_entry_save (MODEL_ENTRY (dialog->p->info));
-
- if (dialog->p->is_add) {
- model_entry_insert_child (get_services_category_entry (dialog->p->model),
- MODEL_ENTRY (dialog->p->info),
- dialog->p->model);
- } else {
- mime_types_model_construct_iter (MIME_TYPES_MODEL (dialog->p->model),
- MODEL_ENTRY (dialog->p->info), &iter);
- path = gtk_tree_model_get_path (dialog->p->model, &iter);
- gtk_tree_model_row_changed (dialog->p->model, path, &iter);
- gtk_tree_path_free (path);
- }
-}
-
-static gboolean
-validate_data (ServiceEditDialog *dialog)
-{
- const gchar *tmp, *tmp1;
- gchar *dir;
- GtkWidget *err_dialog = NULL;
-
- tmp = gtk_entry_get_text (GTK_ENTRY (WID ("protocol_entry")));
-
- if (tmp == NULL || *tmp == '\0') {
- err_dialog = gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
- 0, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Please enter a protocol name."));
- gtk_dialog_run (GTK_DIALOG (err_dialog));
- gtk_widget_destroy (err_dialog);
- return FALSE;
- } else {
- for (tmp1 = tmp; *tmp1 != '\0' && isalnum (*tmp1); tmp1++);
-
- if (*tmp1 != '\0') {
- err_dialog =
- gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
- 0, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Invalid protocol name. Please enter a protocol name without any spaces or punctuation."));
-
- gtk_dialog_run (GTK_DIALOG (err_dialog));
- gtk_widget_destroy (err_dialog);
- return FALSE;
- }
-
- if (dialog->p->is_add) {
- dir = g_strconcat ("/desktop/gnome/url-handlers/", tmp, NULL);
- if (get_service_info (tmp) || gconf_client_dir_exists (gconf_client_get_default (), dir, NULL)) {
- err_dialog =
- gtk_message_dialog_new (GTK_WINDOW (dialog->p->dialog_win),
- 0, GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("There is already a protocol by that name."));
-
- gtk_dialog_run (GTK_DIALOG (err_dialog));
- gtk_widget_destroy (err_dialog);
-
- return FALSE;
- }
- g_free (dir);
- }
- }
-
- return TRUE;
-}
-
-#ifdef SUPPORT_CHECK_CONTENT
-static void
-program_sensitive_cb (ServiceEditDialog *dialog, GtkToggleButton *tb)
-{
- if (gtk_toggle_button_get_active (tb))
- gtk_widget_set_sensitive (WID ("program_frame"), TRUE);
- else if (dialog->p->info == NULL || dialog->p->info->protocol == NULL ||
- strcmp (dialog->p->info->protocol, "ftp"))
- gtk_widget_set_sensitive (WID ("program_frame"), FALSE);
-}
-#endif
-
-static void
-program_changed_cb (ServiceEditDialog *dialog, GtkOptionMenu *option_menu)
-{
- int id;
- GtkMenuShell *menu;
- GnomeVFSMimeApplication *app;
- GList *child;
- gboolean requires_terminal = FALSE;
-
- menu = GTK_MENU_SHELL (gtk_option_menu_get_menu (option_menu));
- id = gtk_option_menu_get_history (option_menu);
-
- if (id == g_list_length (menu->children) - 1) {
- gtk_widget_set_sensitive (WID ("program_entry_box"), TRUE);
- gtk_widget_set_sensitive (WID ("needs_terminal_toggle"), TRUE);
- } else {
- gtk_widget_set_sensitive (WID ("program_entry_box"), FALSE);
- gtk_widget_set_sensitive (WID ("needs_terminal_toggle"), FALSE);
- }
-
- child = g_list_nth (menu->children, id);
- g_return_if_fail (child != NULL);
-
- app = g_object_get_data (G_OBJECT (child->data), "app");
- if (app == NULL)
- app = dialog->p->info->app;
-
- if (app != NULL) {
- requires_terminal = app->requires_terminal;
- if (app->command != NULL)
- gnome_file_entry_set_filename (
- GNOME_FILE_ENTRY (WID ("custom_program_entry")),
- app->command);
- }
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (WID ("needs_terminal_toggle")),
- requires_terminal);
-}
-
-static void
-response_cb (ServiceEditDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_OK) {
- if (validate_data (dialog)) {
- store_data (dialog);
- g_object_unref (G_OBJECT (dialog));
- }
- } else {
- if (dialog->p->is_add)
- service_info_free (dialog->p->info);
-
- g_object_unref (G_OBJECT (dialog));
- }
-}
diff --git a/capplets/file-types/service-edit-dialog.h b/capplets/file-types/service-edit-dialog.h
deleted file mode 100644
index 8d02b1720..000000000
--- a/capplets/file-types/service-edit-dialog.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* service-edit-dialog.h
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __SERVICE_EDIT_DIALOG_H
-#define __SERVICE_EDIT_DIALOG_H
-
-#include <gnome.h>
-
-#include "service-info.h"
-
-G_BEGIN_DECLS
-
-#define SERVICE_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_CAST (obj, service_edit_dialog_get_type (), ServiceEditDialog)
-#define SERVICE_EDIT_DIALOG_CLASS(klass) G_TYPE_CHECK_CLASS_CAST (klass, service_edit_dialog_get_type (), ServiceEditDialogClass)
-#define IS_SERVICE_EDIT_DIALOG(obj) G_TYPE_CHECK_INSTANCE_TYPE (obj, service_edit_dialog_get_type ())
-
-typedef struct _ServiceEditDialog ServiceEditDialog;
-typedef struct _ServiceEditDialogClass ServiceEditDialogClass;
-typedef struct _ServiceEditDialogPrivate ServiceEditDialogPrivate;
-
-struct _ServiceEditDialog
-{
- GObject parent;
-
- ServiceEditDialogPrivate *p;
-};
-
-struct _ServiceEditDialogClass
-{
- GObjectClass g_object_class;
-};
-
-GType service_edit_dialog_get_type (void);
-
-GObject *service_edit_dialog_new (GtkTreeModel *model,
- ServiceInfo *info);
-GObject *service_add_dialog_new (GtkTreeModel *model);
-
-G_END_DECLS
-
-#endif /* __SERVICE_EDIT_DIALOG_H */
diff --git a/capplets/file-types/service-info.c b/capplets/file-types/service-info.c
deleted file mode 100644
index 9dafd3df1..000000000
--- a/capplets/file-types/service-info.c
+++ /dev/null
@@ -1,390 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* service-info.c
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <string.h>
-#include <gconf/gconf-client.h>
-#include <libgnomevfs/gnome-vfs-application-registry.h>
-
-#include "libuuid/uuid.h"
-
-#include "service-info.h"
-#include "mime-types-model.h"
-
-/* This is a hash table of GLists indexed by protocol name; each entry in each
- * list is a GnomeVFSMimeApplication that can handle that protocol */
-
-static GHashTable *service_apps = NULL;
-
-const gchar *url_descriptions[][2] = {
- { "unknown", N_("Unknown service types") },
- { "http", N_("World wide web") },
- { "ftp", N_("File transfer protocol") },
- { "info", N_("Detailed documentation") },
- { "man", N_("Manual pages") },
- { "mailto", N_("Electronic mail transmission") },
- { "ghelp", N_("GNOME documentation") },
- { NULL, NULL }
-};
-
-static gchar *get_key_name (const ServiceInfo *info,
- const gchar *end);
-static void fill_service_apps (void);
-static void set_string (const ServiceInfo *info,
- gchar *end,
- gchar *value);
-static void set_bool (const ServiceInfo *info,
- gchar *end,
- gboolean value);
-static gchar *get_string (ServiceInfo *info,
- const gchar *end);
-static gboolean get_bool (const ServiceInfo *info,
- gchar *end);
-static const gchar *get_protocol_name (const gchar *key);
-
-void
-load_all_services (GtkTreeModel *model)
-{
- GSList *urls;
- const gchar *protocol_name;
- ServiceInfo *info;
-
- urls = gconf_client_all_dirs (gconf_client_get_default (), "/desktop/gnome/url-handlers", NULL);
-
- while (urls) {
- protocol_name = get_protocol_name (urls->data);
-
- if (protocol_name == NULL)
- continue;
-
- info = service_info_new (protocol_name, model);
- model_entry_insert_child (get_services_category_entry (model), MODEL_ENTRY (info), model);
-
- g_free (urls->data);
- urls = g_slist_remove (urls, urls->data);
- }
-}
-
-ServiceInfo *
-service_info_new (const gchar *protocol, GtkTreeModel *model)
-{
- ServiceInfo *info;
-
- info = g_new0 (ServiceInfo, 1);
-
- if (protocol != NULL)
- info->protocol = g_strdup (protocol);
-
- info->entry.type = MODEL_ENTRY_SERVICE;
- info->entry.parent = MODEL_ENTRY (get_services_category_entry (model));
-
- return info;
-}
-
-void
-service_info_load_all (ServiceInfo *info)
-{
- gchar *id;
-
- service_info_get_description (info);
-
-#if 0
- info->run_program = get_bool (info, "type");
-#else
- info->run_program = TRUE;
-#endif
-
- if (info->app == NULL) {
- id = get_string (info, "command-id");
- if (id != NULL)
- info->app = gnome_vfs_mime_application_new_from_id (id);
- else {
- info->app = g_new0 (GnomeVFSMimeApplication, 1);
- info->app->command = get_string (info, "command");
- info->app->requires_terminal = get_bool (info, "needs-terminal");
- }
- g_free (id);
- }
-}
-
-const gchar *
-service_info_get_description (ServiceInfo *info)
-{
- int i;
-
- if (info->description == NULL) {
- info->description = get_string (info, "description");
-
- if (info->description != NULL)
- return info->description;
-
- for (i = 0; url_descriptions[i][0] != NULL; i++)
- if (!strcmp (url_descriptions[i][0], info->protocol))
- return g_strdup (_(url_descriptions[i][1]));
- }
-
- return info->description;
-}
-
-gboolean
-service_info_using_custom_app (const ServiceInfo *info)
-{
- gchar *tmp;
- gboolean ret;
-
- if (!info->app) return FALSE;
-
- if (info->app->name == NULL)
- return TRUE;
-
- tmp = g_strdup_printf ("Custom %s", info->protocol);
- ret = !strcmp (tmp, info->app->name);
- g_free (tmp);
-
- return ret;
-}
-
-void
-service_info_save (const ServiceInfo *info)
-{
- gchar *tmp;
- uuid_t app_uuid;
- gchar app_uuid_str[100];
-
- set_string (info, "description", info->description);
-
- if (info->app != NULL && info->app->command != NULL && *info->app->command != '\0') {
- tmp = g_strdup_printf ("Custom %s", info->protocol);
-
- if (info->app->name == NULL)
- info->app->name = tmp;
-
- if (info->app->id == NULL) {
- uuid_generate (app_uuid);
- uuid_unparse (app_uuid, app_uuid_str);
-
- info->app->id = g_strdup (app_uuid_str);
-
- gnome_vfs_application_registry_save_mime_application (info->app);
- gnome_vfs_application_registry_sync ();
- }
- else if (!strcmp (tmp, info->app->name)) {
- gnome_vfs_application_registry_set_value (info->app->id, "command",
- info->app->command);
- gnome_vfs_application_registry_set_bool_value (info->app->id, "requires_terminal",
- info->app->requires_terminal);
- gnome_vfs_application_registry_sync ();
- }
-
- set_string (info, "command", info->app->command);
- set_string (info, "command-id", info->app->id);
- } else {
- set_string (info, "command", NULL);
- set_string (info, "command-id", NULL);
- }
-
- set_bool (info, "type", info->run_program);
- set_bool (info, "enabled", TRUE);
-}
-
-void
-service_info_delete (const ServiceInfo *info)
-{
- gchar *tmp;
-
- tmp = get_key_name (info, "enabled");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- tmp = get_key_name (info, "type");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- tmp = get_key_name (info, "description");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- tmp = get_key_name (info, "command");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- tmp = get_key_name (info, "command-id");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-
- tmp = get_key_name (info, "need-terminal");
- gconf_client_unset (gconf_client_get_default (), tmp, NULL);
- g_free (tmp);
-}
-
-void
-service_info_free (ServiceInfo *info)
-{
- g_free (info->protocol);
- g_free (info->description);
- gnome_vfs_mime_application_free (info->app);
- g_free (info);
-}
-
-const GList *
-get_apps_for_service_type (gchar *protocol)
-{
- if (service_apps == NULL)
- fill_service_apps ();
-
- return g_hash_table_lookup (service_apps, protocol);
-}
-
-ModelEntry *
-get_services_category_entry (GtkTreeModel *model)
-{
- static ModelEntry *entry = NULL;
-
- if (entry == NULL) {
- entry = g_new0 (ModelEntry, 1);
- entry->type = MODEL_ENTRY_SERVICES_CATEGORY;
- entry->parent = get_model_entries (model);
-
- model_entry_insert_child (get_model_entries (model), entry, model);
- }
-
- return entry;
-}
-
-ServiceInfo *
-get_service_info (const gchar *protocol)
-{
- ModelEntry *tmp;
-
- for (tmp = get_services_category_entry (NULL)->first_child; tmp != NULL; tmp = tmp->next)
- if (tmp->type == MODEL_ENTRY_SERVICE && !strcmp (SERVICE_INFO (tmp)->protocol, protocol))
- break;
-
- return SERVICE_INFO (tmp);
-}
-
-
-
-static gchar *
-get_key_name (const ServiceInfo *info, const gchar *end)
-{
- return g_strconcat ("/desktop/gnome/url-handlers/", info->protocol, "/", end, NULL);
-}
-
-static void
-fill_service_apps (void)
-{
- GList *app_list, *app, *tmp1;
- const gchar *uri_schemes_str;
- gchar **uri_schemes;
- int i;
-
- if (service_apps == NULL)
- service_apps = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
-
- app_list = gnome_vfs_application_registry_get_applications (NULL);
- for (app = app_list; app != NULL; app = app->next) {
- uri_schemes_str = gnome_vfs_application_registry_peek_value (app->data, "supported_uri_schemes");
- if (uri_schemes_str == NULL)
- continue;
-
- uri_schemes = g_strsplit (uri_schemes_str, ",", -1);
- if (uri_schemes == NULL)
- continue;
-
- for (i = 0; uri_schemes[i] != NULL; i++) {
- tmp1 = g_hash_table_lookup (service_apps, uri_schemes[i]);
- tmp1 = g_list_prepend (tmp1, gnome_vfs_application_registry_get_mime_application (app->data));
- g_hash_table_replace (service_apps, g_strdup (uri_schemes[i]), tmp1);
- }
-
- g_strfreev (uri_schemes);
- }
-
- g_list_free (app_list);
-}
-
-static void
-set_string (const ServiceInfo *info, gchar *end, gchar *value)
-{
- gchar *key;
-
- if (value == NULL)
- return;
-
- key = get_key_name (info, end);
- gconf_client_set_string (gconf_client_get_default (), key, value, NULL);
- g_free (key);
-}
-
-static void
-set_bool (const ServiceInfo *info, gchar *end, gboolean value)
-{
- gchar *key;
-
- key = get_key_name (info, end);
- gconf_client_set_bool (gconf_client_get_default (), key, value, NULL);
- g_free (key);
-}
-
-static gchar *
-get_string (ServiceInfo *info, const gchar *end)
-{
- gchar *key, *ret;
-
- key = get_key_name (info, end);
- ret = gconf_client_get_string (gconf_client_get_default (), key, NULL);
- g_free (key);
-
- return ret;
-}
-
-static gboolean
-get_bool (const ServiceInfo *info, gchar *end)
-{
- gchar *key;
- gboolean ret;
-
- key = get_key_name (info, end);
- ret = gconf_client_get_bool (gconf_client_get_default (), key, NULL);
- g_free (key);
-
- return ret;
-}
-
-static const gchar *
-get_protocol_name (const gchar *key)
-{
- gchar *protocol_name;
-
- protocol_name = strrchr (key, '/');
-
- if (protocol_name != NULL)
- return protocol_name + 1;
- else
- return NULL;
-}
diff --git a/capplets/file-types/service-info.h b/capplets/file-types/service-info.h
deleted file mode 100644
index 24c736bcb..000000000
--- a/capplets/file-types/service-info.h
+++ /dev/null
@@ -1,68 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* service-info.h
- *
- * Copyright (C) 2002 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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
- * License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this program; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __SERVICE_INFO_H
-#define __SERVICE_INFO_H
-
-#include <gnome.h>
-#include <bonobo.h>
-#include <libgnomevfs/gnome-vfs-mime-handlers.h>
-
-#include "model-entry.h"
-
-G_BEGIN_DECLS
-
-#define SERVICE_INFO(obj) ((ServiceInfo *) obj)
-
-typedef struct _ServiceInfo ServiceInfo;
-
-struct _ServiceInfo {
- ModelEntry entry;
-
- gchar *protocol;
- gchar *description;
- gboolean run_program;
-
- GnomeVFSMimeApplication *app;
-};
-
-void load_all_services (GtkTreeModel *model);
-
-ServiceInfo *service_info_new (const gchar *protocol,
- GtkTreeModel *model);
-void service_info_load_all (ServiceInfo *info);
-const gchar *service_info_get_description (ServiceInfo *info);
-gboolean service_info_using_custom_app (const ServiceInfo *info);
-void service_info_save (const ServiceInfo *info);
-void service_info_delete (const ServiceInfo *info);
-void service_info_free (ServiceInfo *info);
-
-const GList *get_apps_for_service_type (gchar *protocol);
-ModelEntry *get_services_category_entry (GtkTreeModel *model);
-
-ServiceInfo *get_service_info (const gchar *protocol);
-
-G_END_DECLS
-
-#endif /* __SERVICE_INFO_H */
diff --git a/capplets/font/.cvsignore b/capplets/font/.cvsignore
deleted file mode 100644
index e6515fe55..000000000
--- a/capplets/font/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-gnome-font-properties
-font-properties.desktop
-font-properties.desktop.in
diff --git a/capplets/font/ChangeLog b/capplets/font/ChangeLog
deleted file mode 100644
index aff40d8b0..000000000
--- a/capplets/font/ChangeLog
+++ /dev/null
@@ -1,312 +0,0 @@
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * font-properties.glade:
- * main.c: (application_font_to_gconf), (application_font_changed),
- (setup_dialog), (cb_show_details), (main):
- port of the font capplet to gtk_font_button and some cleanup,
- patch from paolo borelli <pborelli@katamail.com> (Closes: #160016).
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * font-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * font-properties.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * main.c: (setup_dialog):
- Use themed iconf for WM hint.
-
-2004-05-17 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=142190
- http://bugzilla.gnome.org/show_bug.cgi?id=142191
- * font-properties.glade : fix conflicting mnemonics
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-16 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=134446
- * font-properties.glade : removed space
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * main.c: (cb_dialog_response), (cb_details_response): Update help
- link to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-11-06 Padraig O'Briain <padraig.obriain@sun.com>
-
- * font-properties.glade: Correct mnemonic widget for Window title font.
- Move declaration of GnomeFontPicker for applications to immediately
- after declaration of the label. This fixes bug #125689.
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=116710
- * main.c (cb_show_details) : be smarter about selecting a maximum
-
- http://bugzilla.gnome.org/show_bug.cgi?id=115435
- * font-properties.glade : some of the UI review changes.
-
- http://bugzilla.gnome.org/show_bug.cgi?id=124513
- * main.c (setup_font_sample) : merge in patch to allocate black and
- white correctly on TruColor displays.
-
-2003-10-23 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=106489
- * main.c (dpi_load) : add some protection again invalid dpi in the
- case of gconf failure.
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * font-properties.glade: Patch to fix spacing between action
- area and vbox of preferences dialog.
-
-Sat Aug 2 01:16:16 2003 Jonathan Blandford <jrb@gnome.org>
-
- * main.c (application_font_to_gconf): Warn when a font larger than
- 31 points is selected, #97653.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * font-properties.glade: Some HIGification of the dialog.
- Fixes some of ui-review bug #98922.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Wed Jan 15 12:50:34 2003 Jonathan Blandford <jrb@redhat.com>
-
- * main.c (cb_details_response): run "nautilus --no-desktop
- fonts:///" if button pressed.
-
- (cb_show_details): show a 'Go to font folder' button if fonts:///
- exists.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-13 Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
-
- * main.c: Added the "desktop_font" key directory to the list
- of directories GConfClient will watch for changes.
- Fixes Bug #94766.
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-Fri Nov 1 18:21:22 2002 Jonathan Blandford <jrb@gnome.org>
-
- * main.c: remove the duplicate #defined key.
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-16 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=95807
- From sylvain_pasche@yahoo.fr
- * main.c (open_pattern) : Add a safety check.
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * font-properties.desktop.in: Fix the desktop file so that it
- validates.
-
-2002-08-19 Jody Goldberg <jody@gnome.org>
-
- * font-properties.glade :
- * main.c: (setup_dialog): merge in owen's patch to configure the
- window title font and the font to use for terminals. This patch
- uses a metacity specific key for the window title. Owen ? Seth ?
- Can you folk choose please.
-
-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
-
-2002-07-02 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=85629
- * font-properties.glade : Make wider to avoid clipping.
-
-2002-06-27 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=86593
- * main.c (setup_dialog) : watch for missing icons
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * main.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * main.c (cb_dialog_response) : improve handling of help failures.
-
-Sun May 26 11:38:48 2002 Jonathan Blandford <jrb@gnome.org>
-
- * main.c (main): use APPID instead of argv[0]
-
-Fri May 10 19:00:25 2002 Jonathan Blandford <jrb@redhat.com>
-
- * main.c (DESKTOP_FONT_NAME_KEY): get it to use the right key.
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * main.c (cb_dialog_response) : new.
- (setup_dialog) : support help.
-
-2002-04-27 Seth Nickell <snickell@stanford.edu>
-
- * font-properties.desktop.in:
-
- Tweak categories and comment a little.
-
- * font-properties.glade:
-
- Change labels to be a little more descriptive,
- force dialogue to be a little larger.
-
-2002-04-26 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * font-properties.glade:
- * main.c: (create_dialog), (setup_dialog), (main):
-
- Bring back in sync with the merged theme/font dialog.
-
-Wed Apr 10 18:03:00 2002 Jonathan Blandford <jrb@gnome.org>
-
- * font-properties.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-27 Lauris Kaplinski <lauris@ximian.com>
-
- * main.c (response_cb): No responses here
- (font_capplet_custom_toggled): New signal handler
- (font_capplet_font_set): Ditto
- (font_capplet_value_notify): Ditto
- (setup_dialog): Removed peditor stuff, as I do not know, how to
- mix it with NULL == unset, string == set
- (main): Get GConfClient and activate directory
-
- * font-properties.glade: Reverted to original version,
- added label telling about applying
-
-2002-03-17 Jonathan Blandford <jrb@redhat.com>
-
- * font-properties.glade:
- * main.c: (setup_dialog):
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * main.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-18 Gediminas Paulauskas <menesis@delfi.lt>
-
- * ChangeLog: added
- * main.c: correct i18n
-
diff --git a/capplets/font/Makefile.am b/capplets/font/Makefile.am
deleted file mode 100644
index 3af71c025..000000000
--- a/capplets/font/Makefile.am
+++ /dev/null
@@ -1,31 +0,0 @@
-bin_PROGRAMS = gnome-font-properties
-
-gnome_font_properties_LDADD = \
- $(top_builddir)/capplets/common/libcommon.la \
- $(FONT_CAPPLET_LIBS)
-gnome_font_properties_SOURCES = \
- main.c
-gnome_font_properties_LDFLAGS = -export-dynamic
-
-@INTLTOOL_DESKTOP_RULE@
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- subpixel-rgb.png \
- subpixel-bgr.png \
- subpixel-vrgb.png \
- subpixel-vbgr.png
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = font-properties.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = font-properties.glade
-
-INCLUDES = $(FONT_CAPPLET_CFLAGS) \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DPIXMAPDIR=\""$(pixmapdir)"\"
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA) $(pixmap_DATA)
diff --git a/capplets/font/font-properties.desktop.in.in b/capplets/font/font-properties.desktop.in.in
deleted file mode 100644
index 0b4468f39..000000000
--- a/capplets/font/font-properties.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Font
-_Comment=Select fonts for the desktop
-Exec=gnome-font-properties
-Icon=gnome-settings-font
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Settings;Appearance;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=font properties
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/font/font-properties.glade b/capplets/font/font-properties.glade
deleted file mode 100644
index 1d40c892e..000000000
--- a/capplets/font/font-properties.glade
+++ /dev/null
@@ -1,1581 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="font_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Font Preferences</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">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="focus_on_click">True</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="focus_on_click">True</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="vbox19">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkTable" id="table3">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Application 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">application_font</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Desktop 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">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></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">window_title_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="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Terminal 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">monospace_font</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFontButton" id="application_font">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_style">True</property>
- <property name="show_size">True</property>
- <property name="use_font">True</property>
- <property name="use_size">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFontButton" id="desktop_font">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_style">True</property>
- <property name="show_size">True</property>
- <property name="use_font">True</property>
- <property name="use_size">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFontButton" id="window_title_font">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_style">True</property>
- <property name="show_size">True</property>
- <property name="use_font">True</property>
- <property name="use_size">False</property>
- <property name="focus_on_click">True</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="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkFontButton" id="monospace_font">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_style">True</property>
- <property name="show_size">True</property>
- <property name="use_font">True</property>
- <property name="use_size">False</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></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="GtkVBox" id="vbox20">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Font Rendering&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="font_render_frame">
- <property name="visible">True</property>
- <property name="n_rows">3</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="monochrome_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Monochrome</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="monochrome_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkButton" id="details_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">D_etails...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- </child>
- </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>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="best_shapes_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Best _shapes</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">monochrome_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="best_shapes_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="best_contrast_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Best co_ntrast</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">monochrome_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="best_contrast_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="subpixel_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Sub_pixel smoothing (LCDs)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">monochrome_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="subpixel_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="render_details">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Font Rendering Details</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">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="button1">
- <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="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="go_to_font_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Go _to font folder</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">1</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <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="focus_on_click">True</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="vbox7">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">10</property>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">R_esolution:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">dpi_spinner</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="dpi_spinner">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">96 50 200 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">dots per inch</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Smoothing&lt;/b&gt;:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table5">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="antialias_none_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_None</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment6">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="antialias_none_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="antialias_grayscale_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Gra_yscale</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">antialias_none_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="antialias_grayscale_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="antialias_subpixel_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Sub_pixel (LCDs)</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">antialias_none_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="antialias_subpixel_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Hinting&lt;/b&gt;:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table6">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="hint_none_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">N_one</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="hint_none_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox16">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="hint_slight_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Slight</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">hint_none_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment10">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="hint_slight_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox17">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="hint_medium_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Medium</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">hint_none_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment11">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="hint_medium_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="hint_full_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Full</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">hint_none_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment12">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkDrawingArea" id="hint_full_sample">
- <property name="visible">True</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkVBox" id="vbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Subpixel order&lt;/b&gt;:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table7">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">5</property>
- <property name="column_spacing">5</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="subpixel_rgb_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_RGB</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkImage" id="subpixel_rgb_image">
- <property name="visible">True</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">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="subpixel_bgr_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_BGR</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">subpixel_rgb_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkImage" id="subpixel_bgr_image">
- <property name="visible">True</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">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="subpixel_vrgb_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_VRGB</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">subpixel_rgb_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkImage" id="subpixel_vrgb_image">
- <property name="visible">True</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">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkRadioButton" id="subpixel_vbgr_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">VB_GR</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">subpixel_rgb_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkImage" id="subpixel_vbgr_image">
- <property name="visible">True</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">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/font/main.c b/capplets/font/main.c
deleted file mode 100644
index 636ac932e..000000000
--- a/capplets/font/main.c
+++ /dev/null
@@ -1,939 +0,0 @@
-/* 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 <stdarg.h>
-#include <math.h>
-
-#ifdef HAVE_XFT2
-#include <gdk/gdkx.h>
-#include <X11/Xft/Xft.h>
-#endif /* HAVE_XFT2 */
-
-#include "capplet-util.h"
-#include "activate-settings-daemon.h"
-#include "gconf-property-editor.h"
-
-#ifdef HAVE_XFT2
-static void cb_show_details (GtkWidget *button,
- GtkWindow *parent);
-#endif /* HAVE_XFT2 */
-
-#define GTK_FONT_KEY "/desktop/gnome/interface/font_name"
-#define DESKTOP_FONT_KEY "/apps/nautilus/preferences/desktop_font"
-
-#define METACITY_DIR "/apps/metacity/general"
-#define WINDOW_TITLE_FONT_KEY METACITY_DIR "/titlebar_font"
-#define WINDOW_TITLE_USES_SYSTEM_KEY METACITY_DIR "/titlebar_uses_system_font"
-#define MONOSPACE_FONT_KEY "/desktop/gnome/interface/monospace_font_name"
-
-#ifdef HAVE_XFT2
-#define FONT_RENDER_DIR "/desktop/gnome/font_rendering"
-#define FONT_ANTIALIASING_KEY FONT_RENDER_DIR "/antialiasing"
-#define FONT_HINTING_KEY FONT_RENDER_DIR "/hinting"
-#define FONT_RGBA_ORDER_KEY FONT_RENDER_DIR "/rgba_order"
-#define FONT_DPI_KEY FONT_RENDER_DIR "/dpi"
-
-#endif /* HAVE_XFT2 */
-static gboolean in_change = FALSE;
-static gchar *old_font = NULL;
-
-#define MAX_FONT_POINT_WITHOUT_WARNING 32
-#define MAX_FONT_SIZE_WITHOUT_WARNING MAX_FONT_POINT_WITHOUT_WARNING*1024
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustdesk-38");
- else
- gtk_main_quit ();
-}
-
-#ifdef HAVE_XFT2
-
-/*
- * Code for displaying previews of font rendering with various Xft options
- */
-
-static void
-sample_size_request (GtkWidget *darea,
- GtkRequisition *requisition)
-{
- GdkPixbuf *pixbuf = g_object_get_data (G_OBJECT (darea), "sample-pixbuf");
-
- requisition->width = gdk_pixbuf_get_width (pixbuf) + 2;
- requisition->height = gdk_pixbuf_get_height (pixbuf) + 2;
-}
-
-static void
-sample_expose (GtkWidget *darea,
- GdkEventExpose *expose)
-{
- GdkPixbuf *pixbuf = g_object_get_data (G_OBJECT (darea), "sample-pixbuf");
- int width = gdk_pixbuf_get_width (pixbuf);
- int height = gdk_pixbuf_get_height (pixbuf);
-
- int x = (darea->allocation.width - width) / 2;
- int y = (darea->allocation.height - height) / 2;
-
- gdk_draw_rectangle (darea->window, darea->style->white_gc, TRUE,
- 0, 0,
- darea->allocation.width, darea->allocation.height);
- gdk_draw_rectangle (darea->window, darea->style->black_gc, FALSE,
- 0, 0,
- darea->allocation.width - 1, darea->allocation.height - 1);
-
- gdk_pixbuf_render_to_drawable (pixbuf, darea->window, NULL,
- 0, 0, x, y, width, height,
- GDK_RGB_DITHER_NORMAL, 0, 0);
-}
-
-typedef enum {
- ANTIALIAS_NONE,
- ANTIALIAS_GRAYSCALE,
- ANTIALIAS_RGBA
-} Antialiasing;
-
-static GConfEnumStringPair antialias_enums[] = {
- { ANTIALIAS_NONE, "none" },
- { ANTIALIAS_GRAYSCALE, "grayscale" },
- { ANTIALIAS_RGBA, "rgba" },
- { -1, NULL }
-};
-
-typedef enum {
- HINT_NONE,
- HINT_SLIGHT,
- HINT_MEDIUM,
- HINT_FULL
-} Hinting;
-
-static GConfEnumStringPair hint_enums[] = {
- { HINT_NONE, "none" },
- { HINT_SLIGHT, "slight" },
- { HINT_MEDIUM, "medium" },
- { HINT_FULL, "full" },
- { -1, NULL }
-};
-
-typedef enum {
- RGBA_RGB,
- RGBA_BGR,
- RGBA_VRGB,
- RGBA_VBGR
-} RgbaOrder;
-
-static GConfEnumStringPair rgba_order_enums[] = {
- { RGBA_RGB, "rgb" },
- { RGBA_BGR, "bgr" },
- { RGBA_VRGB, "vrgb" },
- { RGBA_VBGR, "vbgr" },
- { -1, NULL }
-};
-
-static XftFont *
-open_pattern (FcPattern *pattern,
- Antialiasing antialiasing,
- Hinting hinting)
-{
-#ifdef FC_HINT_STYLE
- static const int hintstyles[] = { FC_HINT_NONE, FC_HINT_SLIGHT, FC_HINT_MEDIUM, FC_HINT_FULL };
-#endif /* FC_HINT_STYLE */
-
- FcPattern *res_pattern;
- FcResult result;
- XftFont *font;
-
- Display *xdisplay = gdk_x11_get_default_xdisplay ();
- int screen = gdk_x11_get_default_screen ();
-
- res_pattern = XftFontMatch (xdisplay, screen, pattern, &result);
- if (res_pattern == NULL)
- return NULL;
-
- FcPatternDel (res_pattern, FC_HINTING);
- FcPatternAddBool (res_pattern, FC_HINTING, hinting != HINT_NONE);
-
-#ifdef FC_HINT_STYLE
- FcPatternDel (res_pattern, FC_HINT_STYLE);
- FcPatternAddInteger (res_pattern, FC_HINT_STYLE, hintstyles[hinting]);
-#endif /* FC_HINT_STYLE */
-
- FcPatternDel (res_pattern, FC_ANTIALIAS);
- FcPatternAddBool (res_pattern, FC_ANTIALIAS, antialiasing != ANTIALIAS_NONE);
-
- FcPatternDel (res_pattern, FC_RGBA);
- FcPatternAddInteger (res_pattern, FC_RGBA,
- antialiasing == ANTIALIAS_RGBA ? FC_RGBA_RGB : FC_RGBA_NONE);
-
- FcPatternDel (res_pattern, FC_DPI);
- FcPatternAddInteger (res_pattern, FC_DPI, 96);
-
- font = XftFontOpenPattern (xdisplay, res_pattern);
- if (!font)
- FcPatternDestroy (res_pattern);
-
- return font;
-}
-
-static void
-setup_font_sample (GtkWidget *darea,
- Antialiasing antialiasing,
- Hinting hinting)
-{
- const char *string1 = "abcfgop AO ";
- const char *string2 = "abcfgop";
-
- XftColor black, white;
- XRenderColor rendcolor;
-
- Display *xdisplay = gdk_x11_get_default_xdisplay ();
-
- GdkColormap *colormap = gdk_rgb_get_colormap ();
- Colormap xcolormap = GDK_COLORMAP_XCOLORMAP (colormap);
-
- GdkVisual *visual = gdk_colormap_get_visual (colormap);
- Visual *xvisual = GDK_VISUAL_XVISUAL (visual);
-
- FcPattern *pattern;
- XftFont *font1, *font2;
- XGlyphInfo extents1 = { 0 };
- XGlyphInfo extents2 = { 0 };
- GdkPixmap *pixmap;
- XftDraw *draw;
- GdkPixbuf *tmp_pixbuf, *pixbuf;
-
- int width, height;
- int ascent, descent;
-
- pattern = FcPatternBuild (NULL,
- FC_FAMILY, FcTypeString, "Serif",
- FC_SLANT, FcTypeInteger, FC_SLANT_ROMAN,
- FC_SIZE, FcTypeDouble, 18.,
- NULL);
- font1 = open_pattern (pattern, antialiasing, hinting);
- FcPatternDestroy (pattern);
-
- pattern = FcPatternBuild (NULL,
- FC_FAMILY, FcTypeString, "Serif",
- FC_SLANT, FcTypeInteger, FC_SLANT_ITALIC,
- FC_SIZE, FcTypeDouble, 20.,
- NULL);
- font2 = open_pattern (pattern, antialiasing, hinting);
- FcPatternDestroy (pattern);
-
- if (font1)
- XftTextExtentsUtf8 (xdisplay, font1, (char *)string1, strlen (string1), &extents1);
- if (font2)
- XftTextExtentsUtf8 (xdisplay, font2, (char *)string2, strlen (string2), &extents2);
-
- ascent = 0;
- if (font1)
- ascent = MAX (ascent, font1->ascent);
- if (font2)
- ascent = MAX (ascent, font2->ascent);
-
- descent = 0;
- if (font1)
- descent = MAX (descent, font1->descent);
- if (font2)
- descent = MAX (descent, font2->descent);
-
- width = extents1.xOff + extents2.xOff + 4;
-
- height = ascent + descent + 2;
-
- pixmap = gdk_pixmap_new (NULL, width, height, visual->depth);
-
- draw = XftDrawCreate (xdisplay, GDK_DRAWABLE_XID (pixmap), xvisual, xcolormap);
-
- rendcolor.red = 0;
- rendcolor.green = 0;
- rendcolor.blue = 0;
- rendcolor.alpha = 0xffff;
- XftColorAllocValue (xdisplay, xvisual, xcolormap, &rendcolor, &black);
-
- rendcolor.red = 0xffff;
- rendcolor.green = 0xffff;
- rendcolor.blue = 0xffff;
- rendcolor.alpha = 0xffff;
- XftColorAllocValue (xdisplay, xvisual, xcolormap, &rendcolor, &white);
- XftDrawRect (draw, &white, 0, 0, width, height);
- if (font1)
- XftDrawStringUtf8 (draw, &black, font1,
- 2, 2 + ascent,
- (char *)string1, strlen (string1));
- if (font2)
- XftDrawStringUtf8 (draw, &black, font2,
- 2 + extents1.xOff, 2 + ascent,
- (char *)string2, strlen (string2));
-
- XftDrawDestroy (draw);
-
- if (font1)
- XftFontClose (xdisplay, font1);
- if (font2)
- XftFontClose (xdisplay, font2);
-
- tmp_pixbuf = gdk_pixbuf_get_from_drawable (NULL, pixmap, colormap, 0, 0, 0, 0, width, height);
- pixbuf = gdk_pixbuf_scale_simple (tmp_pixbuf, 1 * width, 1 * height, GDK_INTERP_TILES);
-
- g_object_unref (pixmap);
- g_object_unref (tmp_pixbuf);
-
- g_object_set_data_full (G_OBJECT (darea), "sample-pixbuf",
- pixbuf, (GDestroyNotify)g_object_unref);
-
- g_signal_connect (darea, "size_request", G_CALLBACK (sample_size_request), NULL);
- g_signal_connect (darea, "expose_event", G_CALLBACK (sample_expose), NULL);
-}
-
-/*
- * Code implementing a group of radio buttons with different Xft option combinations.
- * If one of the buttons is matched by the GConf key, we pick it. Otherwise we
- * show the group as inconsistent.
- */
-static void
-font_render_get_gconf (Antialiasing *antialiasing,
- Hinting *hinting)
-{
- GConfClient *client = gconf_client_get_default ();
- char *antialias_str = gconf_client_get_string (client, FONT_ANTIALIASING_KEY, NULL);
- char *hint_str = gconf_client_get_string (client, FONT_HINTING_KEY, NULL);
- int val;
-
- val = ANTIALIAS_GRAYSCALE;
- if (antialias_str) {
- gconf_string_to_enum (antialias_enums, antialias_str, &val);
- g_free (antialias_str);
- }
- *antialiasing = val;
-
- val = HINT_FULL;
- if (hint_str) {
- gconf_string_to_enum (hint_enums, hint_str, &val);
- g_free (hint_str);
- }
- *hinting = val;
-
- g_object_unref (client);
-}
-
-typedef struct {
- Antialiasing antialiasing;
- Hinting hinting;
- GtkWidget *radio;
-} FontPair;
-
-static GSList *font_pairs = NULL;
-
-static void
-font_render_load (void)
-{
- Antialiasing antialiasing;
- Hinting hinting;
- gboolean inconsistent = TRUE;
- GSList *tmp_list;
-
- font_render_get_gconf (&antialiasing, &hinting);
-
- in_change = TRUE;
-
- for (tmp_list = font_pairs; tmp_list; tmp_list = tmp_list->next) {
- FontPair *pair = tmp_list->data;
-
- if (antialiasing == pair->antialiasing && hinting == pair->hinting) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (pair->radio), TRUE);
- inconsistent = FALSE;
- }
- }
-
- for (tmp_list = font_pairs; tmp_list; tmp_list = tmp_list->next) {
- FontPair *pair = tmp_list->data;
-
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (pair->radio), inconsistent);
- }
-
- in_change = FALSE;
-}
-
-static void
-font_render_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- font_render_load ();
-}
-
-static void
-font_radio_toggled (GtkToggleButton *toggle_button,
- FontPair *pair)
-{
- if (!in_change) {
- GConfClient *client = gconf_client_get_default ();
-
- gconf_client_set_string (client, FONT_ANTIALIASING_KEY,
- gconf_enum_to_string (antialias_enums, pair->antialiasing),
- NULL);
- gconf_client_set_string (client, FONT_HINTING_KEY,
- gconf_enum_to_string (hint_enums, pair->hinting),
- NULL);
-
- g_object_unref (client);
- }
-
- /* Restore back to the previous state until we get notification
- */
- font_render_load ();
-}
-
-static void
-setup_font_pair (GtkWidget *radio,
- GtkWidget *darea,
- Antialiasing antialiasing,
- Hinting hinting)
-{
- FontPair *pair = g_new (FontPair, 1);
-
- pair->antialiasing = antialiasing;
- pair->hinting = hinting;
- pair->radio = radio;
-
- setup_font_sample (darea, antialiasing, hinting);
- font_pairs = g_slist_prepend (font_pairs, pair);
-
- g_signal_connect (radio, "toggled",
- G_CALLBACK (font_radio_toggled), pair);
-}
-#endif /* HAVE_XFT2 */
-
-static void
-metacity_titlebar_load_sensitivity (GConfClient *client,
- GladeXML *dialog)
-{
- gtk_widget_set_sensitive (WID ("window_title_font"),
- !gconf_client_get_bool (client,
- WINDOW_TITLE_USES_SYSTEM_KEY,
- NULL));
-}
-
-static void
-metacity_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- if (strcmp (entry->key, WINDOW_TITLE_USES_SYSTEM_KEY) == 0)
- metacity_titlebar_load_sensitivity (client, user_data);
-}
-
-/* returns 0 if the font is safe, otherwise returns the size in points. */
-static gint
-new_font_dangerous (const char *new_font)
-{
- PangoFontDescription *pfd;
- gboolean retval = 0;
-
- pfd = pango_font_description_from_string (new_font);
- if (pfd == NULL)
- /* an invalid font was passed in. This isn't our problem. */
- return 0;
-
- if (pango_font_description_get_set_fields (pfd) & PANGO_FONT_MASK_SIZE) {
- if (pango_font_description_get_size (pfd) >= MAX_FONT_SIZE_WITHOUT_WARNING) {
- retval = pango_font_description_get_size (pfd)/1024;
- }
- }
- pango_font_description_free (pfd);
-
- return retval;
-}
-
-static GConfValue *
-application_font_to_gconf (GConfPropertyEditor *peditor,
- GConfValue *value)
-{
- GConfValue *new_value;
- const char *new_font;
- GtkWidget *font_button;
- gint danger_level;
-
- font_button = GTK_WIDGET (gconf_property_editor_get_ui_control (peditor));
- g_return_val_if_fail (font_button != NULL, NULL);
-
- new_value = gconf_value_new (GCONF_VALUE_STRING);
- new_font = gconf_value_get_string (value);
- if (new_font_dangerous (old_font)) {
- /* If we're already too large, we don't warn again. */
- gconf_value_set_string (new_value, new_font);
- return new_value;
- }
-
- danger_level = new_font_dangerous (new_font);
- if (danger_level) {
- GtkWidget *warning_dialog;
- gchar *warning_label;
- gchar *warning_label2;
-
- warning_label = g_strdup (_("Font may be too large"));
-
- if (danger_level > MAX_FONT_POINT_WITHOUT_WARNING) {
- warning_label2 = g_strdup_printf (ngettext (
- "The font selected is %d point large, "
- "and may make it difficult to effectively "
- "use the computer. It is recommended that "
- "you select a size smaller than %d.",
- "The font selected is %d points large, "
- "and may make it difficult to effectively "
- "use the computer. It is recommended that "
- "you select a size smaller than %d.",
- danger_level),
- danger_level,
- MAX_FONT_POINT_WITHOUT_WARNING);
- } else {
- warning_label2 = g_strdup_printf (ngettext (
- "The font selected is %d point large, "
- "and may make it difficult to effectively "
- "use the computer. It is recommended that "
- "you select a smaller sized font.",
- "The font selected is %d points large, "
- "and may make it difficult to effectively "
- "use the computer. It is recommended that "
- "you select a smaller sized font.",
- danger_level),
- danger_level);
- }
-
- warning_dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK_CANCEL,
- warning_label);
-
- gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (warning_dialog),
- warning_label2);
- g_free (warning_label);
- g_free (warning_label2);
-
- if (gtk_dialog_run (GTK_DIALOG (warning_dialog)) == GTK_RESPONSE_OK) {
- gconf_value_set_string (new_value, new_font);
- } else {
- gconf_value_set_string (new_value, old_font);
- gtk_font_button_set_font_name (GTK_FONT_BUTTON (font_button), old_font);
- }
-
- gtk_widget_destroy (warning_dialog);
- } else {
- gconf_value_set_string (new_value, new_font);
- }
-
- return new_value;
-}
-
-static void
-application_font_changed (GtkWidget *font_button)
-{
- const gchar *font;
-
- font = gtk_font_button_get_font_name (GTK_FONT_BUTTON (font_button));
- g_free (old_font);
- old_font = g_strdup (font);
-}
-
-static void
-setup_dialog (void)
-{
- GladeXML *dialog;
- GConfClient *client;
- GtkWidget *widget;
- GObject *peditor;
-
- dialog = glade_xml_new (GLADEDIR "/font-properties.glade", "font_dialog", NULL);
- if (!dialog) {
- g_warning ("could not load font-properties.glade");
- return;
- }
-
- client = gconf_client_get_default ();
-
- gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/apps/nautilus/preferences", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, METACITY_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-#ifdef HAVE_XFT2
- gconf_client_add_dir (client, FONT_RENDER_DIR, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-#endif /* HAVE_XFT2 */
-
- peditor = gconf_peditor_new_font (NULL, GTK_FONT_KEY,
- WID ("application_font"),
- "conv-from-widget-cb", application_font_to_gconf,
- NULL);
- g_signal_connect_swapped (peditor, "value-changed",
- G_CALLBACK (application_font_changed), WID ("application_font"));
- application_font_changed (WID ("application_font"));
-
- peditor = gconf_peditor_new_font (NULL, DESKTOP_FONT_KEY,
- WID ("desktop_font"),
- NULL);
-
- peditor = gconf_peditor_new_font (NULL, WINDOW_TITLE_FONT_KEY,
- WID ("window_title_font"),
- NULL);
-
- peditor = gconf_peditor_new_font (NULL, MONOSPACE_FONT_KEY,
- WID ("monospace_font"),
- NULL);
-
- gconf_client_notify_add (client, METACITY_DIR,
- metacity_changed,
- dialog, NULL, NULL);
-
- metacity_titlebar_load_sensitivity (client, dialog);
-
- widget = WID ("font_dialog");
- capplet_set_icon (widget, "gnome-settings-font");
-
-#ifdef HAVE_XFT2
- setup_font_pair (WID ("monochrome_radio"), WID ("monochrome_sample"), ANTIALIAS_NONE, HINT_FULL);
- setup_font_pair (WID ("best_shapes_radio"), WID ("best_shapes_sample"), ANTIALIAS_GRAYSCALE, HINT_MEDIUM);
- setup_font_pair (WID ("best_contrast_radio"), WID ("best_contrast_sample"), ANTIALIAS_GRAYSCALE, HINT_FULL);
- setup_font_pair (WID ("subpixel_radio"), WID ("subpixel_sample"), ANTIALIAS_RGBA, HINT_FULL);
-
- font_render_load ();
-
- gconf_client_notify_add (client, FONT_RENDER_DIR,
- font_render_changed,
- NULL, NULL, NULL);
-
- g_signal_connect (WID ("details_button"), "clicked",
- G_CALLBACK (cb_show_details), widget);
-#else /* !HAVE_XFT2 */
- gtk_widget_hide (WID ("font_render_frame"));
-#endif /* HAVE_XFT2 */
-
- g_signal_connect (widget, "response",
- G_CALLBACK (cb_dialog_response), NULL);
-
- gtk_widget_show (widget);
-
- g_object_unref (dialog);
- g_object_unref (client);
-}
-
-#ifdef HAVE_XFT2
-/*
- * EnumGroup - a group of radio buttons tied to a string enumeration
- * value. We add this here because the gconf peditor
- * equivalent of this is both painful to use (you have
- * to supply functions to convert from enums to indices)
- * and conceptually broken (the order of radio buttons
- * in a group when using Glade is not predictable.
- */
-typedef struct
-{
- GConfClient *client;
- GSList *items;
- const gchar *gconf_key;
- GConfEnumStringPair *enums;
- int default_value;
-} EnumGroup;
-
-typedef struct
-{
- EnumGroup *group;
- GtkWidget *widget;
- int value;
-} EnumItem;
-
-static void
-enum_group_load (EnumGroup *group)
-{
- char *str = gconf_client_get_string (group->client, group->gconf_key, NULL);
- int val = group->default_value;
- GSList *tmp_list;
-
- if (str)
- gconf_string_to_enum (group->enums, str, &val);
-
- g_free (str);
-
- in_change = TRUE;
-
- for (tmp_list = group->items; tmp_list; tmp_list = tmp_list->next) {
- EnumItem *item = tmp_list->data;
-
- if (val == item->value)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (item->widget), TRUE);
- }
-
-
-
- in_change = FALSE;
-}
-
-static void
-enum_group_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- enum_group_load (user_data);
-}
-
-static void
-enum_item_toggled (GtkToggleButton *toggle_button,
- EnumItem *item)
-{
- EnumGroup *group = item->group;
-
- if (!in_change) {
- gconf_client_set_string (group->client, group->gconf_key,
- gconf_enum_to_string (group->enums, item->value),
- NULL);
- }
-
- /* Restore back to the previous state until we get notification
- */
- enum_group_load (group);
-}
-
-static EnumGroup *
-enum_group_create (const gchar *gconf_key,
- GConfEnumStringPair *enums,
- int default_value,
- GtkWidget *first_widget,
- ...)
-{
- EnumGroup *group;
- GtkWidget *widget;
- va_list args;
-
- group = g_new (EnumGroup, 1);
-
- group->client = gconf_client_get_default ();
- group->gconf_key = g_strdup (gconf_key);
- group->enums = enums;
- group->default_value = default_value;
- group->items = NULL;
-
- va_start (args, first_widget);
-
- widget = first_widget;
- while (widget)
- {
- EnumItem *item;
-
- item = g_new (EnumItem, 1);
- item->group = group;
- item->widget = widget;
- item->value = va_arg (args, int);
-
- g_signal_connect (item->widget, "toggled",
- G_CALLBACK (enum_item_toggled), item);
-
- group->items = g_slist_prepend (group->items, item);
-
- widget = va_arg (args, GtkWidget *);
- }
-
- va_end (args);
-
- enum_group_load (group);
-
- gconf_client_notify_add (group->client, gconf_key,
- enum_group_changed,
- group, NULL, NULL);
-
- return group;
-}
-
-/*
- * The font rendering details dialog
- */
-static void
-dpi_load (GConfClient *client,
- GtkSpinButton *spinner)
-{
- gdouble dpi = gconf_client_get_float (client, FONT_DPI_KEY, NULL);
-
- if (dpi < 50.)
- dpi = 50.;
-
- in_change = TRUE;
- gtk_spin_button_set_value (spinner, dpi);
- in_change = FALSE;
-}
-
-static void
-dpi_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- dpi_load (client, user_data);
-}
-
-static void
-dpi_value_changed (GtkSpinButton *spinner,
- GConfClient *client)
-{
- /* Like any time when using a spin button with GConf, there is
- * a race condition here. When we change, we send the new
- * value to GCOnf, then restore to the old value until
- * we get a response to emulate the proper model/view behavior.
- *
- * If the user changes the value faster than responses are
- * received from GConf, this may cause mild strange effects.
- */
- gdouble new_dpi = gtk_spin_button_get_value (spinner);
-
- gconf_client_set_float (client, FONT_DPI_KEY, new_dpi, NULL);
-
- dpi_load (client, spinner);
-}
-
-static void
-cb_details_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustdesk-38");
- else if (response_id == 1) {
- /* "Go to font folder" was clicked */
- g_spawn_command_line_async ("nautilus --no-desktop fonts:///", NULL);
- } else
- gtk_widget_hide (GTK_WIDGET (dialog));
-}
-
-static void
-cb_show_details (GtkWidget *button,
- GtkWindow *parent)
-{
- static GtkWidget *details_dialog = NULL;
-
- if (!details_dialog) {
- GConfClient *client = gconf_client_get_default ();
- GladeXML *dialog;
- GtkWidget *dpi_spinner;
- GnomeVFSURI *uri;
- int dpi;
- GtkAdjustment *adjustment;
-
- dialog = glade_xml_new (GLADEDIR "/font-properties.glade", "render_details", NULL);
- if (!dialog) {
- g_warning ("could not load font-properties.glade");
- return;
- }
-
- details_dialog = WID ("render_details");
- uri = gnome_vfs_uri_new ("fonts:///");
- if (uri == NULL) {
- gtk_widget_hide (WID ("go_to_font_button"));
- } else {
- gnome_vfs_uri_unref (uri);
- gtk_widget_show (WID ("go_to_font_button"));
- }
-
- gtk_window_set_transient_for (GTK_WINDOW (details_dialog), parent);
-
- dpi_spinner = WID ("dpi_spinner");
-
- /* pick a sensible maximum dpi */
- dpi = floor ((gdk_screen_width () / gdk_screen_width_mm () +
- gdk_screen_height () / gdk_screen_height_mm ()) * 25.4 / 2. + .5);
- if (dpi < 50)
- dpi = 50; /* be extra careful */
- adjustment = gtk_spin_button_get_adjustment (GTK_SPIN_BUTTON (dpi_spinner));
- adjustment->upper = dpi * 3;
-
- dpi_load (client, GTK_SPIN_BUTTON (dpi_spinner));
- g_signal_connect (dpi_spinner, "value_changed",
- G_CALLBACK (dpi_value_changed), client);
-
- gconf_client_notify_add (client, FONT_DPI_KEY,
- dpi_changed,
- dpi_spinner, NULL, NULL);
-
- setup_font_sample (WID ("antialias_none_sample"), ANTIALIAS_NONE, HINT_FULL);
- setup_font_sample (WID ("antialias_grayscale_sample"), ANTIALIAS_GRAYSCALE, HINT_FULL);
- setup_font_sample (WID ("antialias_subpixel_sample"), ANTIALIAS_RGBA, HINT_FULL);
-
- enum_group_create (FONT_ANTIALIASING_KEY, antialias_enums, ANTIALIAS_GRAYSCALE,
- WID ("antialias_none_radio"), ANTIALIAS_NONE,
- WID ("antialias_grayscale_radio"), ANTIALIAS_GRAYSCALE,
- WID ("antialias_subpixel_radio"), ANTIALIAS_RGBA,
- NULL);
-
- setup_font_sample (WID ("hint_none_sample"), ANTIALIAS_GRAYSCALE, HINT_NONE);
- setup_font_sample (WID ("hint_slight_sample"), ANTIALIAS_GRAYSCALE, HINT_SLIGHT);
- setup_font_sample (WID ("hint_medium_sample"), ANTIALIAS_GRAYSCALE, HINT_MEDIUM);
- setup_font_sample (WID ("hint_full_sample"), ANTIALIAS_GRAYSCALE, HINT_FULL);
-
- enum_group_create (FONT_HINTING_KEY, hint_enums, HINT_FULL,
- WID ("hint_none_radio"), HINT_NONE,
- WID ("hint_slight_radio"), HINT_SLIGHT,
- WID ("hint_medium_radio"), HINT_MEDIUM,
- WID ("hint_full_radio"), HINT_FULL,
- NULL);
-
- gtk_image_set_from_file (GTK_IMAGE (WID ("subpixel_rgb_image")),
- PIXMAPDIR "/subpixel-rgb.png");
- gtk_image_set_from_file (GTK_IMAGE (WID ("subpixel_bgr_image")),
- PIXMAPDIR "/subpixel-bgr.png");
- gtk_image_set_from_file (GTK_IMAGE (WID ("subpixel_vrgb_image")),
- PIXMAPDIR "/subpixel-vrgb.png");
- gtk_image_set_from_file (GTK_IMAGE (WID ("subpixel_vbgr_image")),
- PIXMAPDIR "/subpixel-vbgr.png");
-
- enum_group_create (FONT_RGBA_ORDER_KEY, rgba_order_enums, RGBA_RGB,
- WID ("subpixel_rgb_radio"), RGBA_RGB,
- WID ("subpixel_bgr_radio"), RGBA_BGR,
- WID ("subpixel_vrgb_radio"), RGBA_VRGB,
- WID ("subpixel_vbgr_radio"), RGBA_VBGR,
- NULL);
-
- g_signal_connect (G_OBJECT (details_dialog),
- "response",
- G_CALLBACK (cb_details_response), NULL);
- g_signal_connect (G_OBJECT (details_dialog),
- "delete_event",
- G_CALLBACK (gtk_true), NULL);
-
- g_object_unref (dialog);
- g_object_unref (client);
- }
-
- gtk_window_present (GTK_WINDOW (details_dialog));
-}
-#endif /* HAVE_XFT2 */
-
-int
-main (int argc, char *argv[])
-{
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-font-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- activate_settings_daemon ();
-
- setup_dialog ();
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/font/subpixel-bgr.png b/capplets/font/subpixel-bgr.png
deleted file mode 100644
index 7efd2624f..000000000
--- a/capplets/font/subpixel-bgr.png
+++ /dev/null
Binary files differ
diff --git a/capplets/font/subpixel-rgb.png b/capplets/font/subpixel-rgb.png
deleted file mode 100644
index 58ac1eca6..000000000
--- a/capplets/font/subpixel-rgb.png
+++ /dev/null
Binary files differ
diff --git a/capplets/font/subpixel-vbgr.png b/capplets/font/subpixel-vbgr.png
deleted file mode 100644
index abd8df013..000000000
--- a/capplets/font/subpixel-vbgr.png
+++ /dev/null
Binary files differ
diff --git a/capplets/font/subpixel-vrgb.png b/capplets/font/subpixel-vrgb.png
deleted file mode 100644
index 6e6090601..000000000
--- a/capplets/font/subpixel-vrgb.png
+++ /dev/null
Binary files differ
diff --git a/capplets/keybindings/.cvsignore b/capplets/keybindings/.cvsignore
deleted file mode 100644
index 03e0ed6af..000000000
--- a/capplets/keybindings/.cvsignore
+++ /dev/null
@@ -1,5 +0,0 @@
-Makefile
-Makefile.in
-gnome-keybinding-properties
-keybinding.desktop
-keybinding.desktop.in
diff --git a/capplets/keybindings/ChangeLog b/capplets/keybindings/ChangeLog
deleted file mode 100644
index c2b347f53..000000000
--- a/capplets/keybindings/ChangeLog
+++ /dev/null
@@ -1,484 +0,0 @@
-2005-02-08 Sebastien Bacher <seb128@debian.org>
-
- * eggcellrendererkeys.c: (egg_cell_renderer_keys_start_editing):
- patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
- (Closes: #166267).
-
-2005-01-13 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keybinding-properties.c: (start_editing_kb_cb),
- (setup_dialog): edit the keybinding when "enter" is pressed
- (Closes: #127992).
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keybinding-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-11-30 Bastien Nocera <hadess@hadess.net>
-
- * eggcellrendererkeys.c: (grab_key_callback): Patch from
- Michal Bukovjan <bukovjan@mbox.dkm.cz> to handle backspace in multi-
- layout setups correctly (Closes: #154492)
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * keybinding.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-17 Vincent Untz <vincent@vuntz.net>
-
- * gnome-keybinding-properties.c: add the keybinding to launch a
- terminal
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-keybinding-properties.c: (setup_dialog):
- Use themed icon for WM hint.
-
-2004-07-23 David Sedeño <david@alderia.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=148208
- * gnome-keybinding-properties.glade: Expand to false to the hbox1
-
-2004-05-09 Jody Goldberg <jody@gnome.org>
-
- For : Michael Terry <mike@mterry.name>
- http://bugzilla.gnome.org/show_bug.cgi?id=99529
- * gnome-keybinding-properties.c : remove functions dealing with
- the keyboard theme
- * gnome-keybinding-properties.glade : remove keyboard theme option
- box and keyboard shortcut label
-
-2004-04-16 Jody Goldberg <jody@gnome.org>
-
- From paolo borelli :
- http://bugzilla.gnome.org/show_bug.cgi?id=139723
- * gnome-keybinding-properties.c (accel_edited_callback) : fix leak
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=139605
- * eggcellrendererkeys.c (grab_key_callback) : mouse buttons should not
- be valid modifiers.
-
-2004-04-06 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c (cb_check_for_uniqueness) : Really fix
- this time to capture the vagaries of keys with and without names.
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c (accel_edited_callback) : Use a cancel
- button on the 'already used' dialog so that escape will close it.
- (cb_check_for_uniqueness) : fix brokeness. It is entirely possible
- for keycode on loaded keys to be '0'
-
-2003-12-30 Sven Herzberg <herzi@gnome-de.org>
-
- * capplets/keybindings/eggcellrendererkeys.c : change the "Type a
- new accelerator..." tooltip to a shorter form "<New accelerator...>".
- * capplets/keybindings/gnome-keybindings-properties.gladei : add an
- explanation on how use the capplet.
- This is based upon the work of Emmanuel Pacaud
- <emmanuel.pacaud@univ-poitiers.fr>
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-22 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c (reload_key_entries) : split the
- obvious media keys into a distinct category. Call it 'Sound' to
- avoid string freeze problems.
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-17 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=128164
- * gnome-keybinding-properties.c (accel_edited_callback) : don't use
- get_real_model. The selection is based on the sorted model.
- (accel_cleared_callback) : ditto, and fix a leak while I'm in here.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-keybinding-properties.c: (cb_dialog_response): Update help link
- to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-Tue Nov 18 12:23:26 2003 Jonathan Blandford <jrb@redhat.com>
-
- * eggcellrendererkeys.[ch]: Patch from Bastien Nocera to to handle
- keycodes as well as keysyms.
-
- * eggaccelerators.[ch]: handle keycodes.
-
- * gnome-keybinding-properties.c: handle keycodes.
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-keybinding-properties.glade: Patch to fix spacing between
- action area and vbox of preferences dialog.
-
-Fri Jul 25 16:29:29 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (desktop_key_list): Patch from
- Ghee Teo to move the key bindings to the right place.
-
-2003-07-11 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-keybinding-properties.glade: Minor HIG widget padding
- adjustments.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-07-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * eggcellrendererkeys.c: (egg_cell_renderer_keys_set_accelerator):
- Merge leak fix from stable.
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-30 Kjartan Maraas <set EMAIL_ADDRESS environment variable>
-
- * gnome-keybinding-properties.c: (make_key_theme_menu_item): Mark
- string for translation. Patch from Hidetoshi Tajima.
- Fixes bug #106560.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-2003-01-21 Shivram U <shivaram.upadhyayula@wipro.com>
-
- * gnome-keybindings-properties.c (append_keys_to_tree): Set the size
- request of the shortcuts treeview instead of the the actions scrolled
- window. (#103962)
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-Mon Jan 13 15:14:22 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (main): gnome_theme_init() added.
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2003-01-03 Havoc Pennington <hp@redhat.com>
-
- * gnome-keybinding-properties.c (metacity_key_list): add
- vertical/horizontal maximize (this adds no strings or features,
- just fixes the list being out of sync with metacity)
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-12-04 Havoc Pennington <hp@pobox.com>
-
- * gnome-keybinding-properties.glade: set all the spacings to 12 as
- per HIG
-
-2002-12-04 Havoc Pennington <hp@pobox.com>
-
- * gnome-keybinding-properties.c (clear_old_model): create a sort
- model for the treeview.
-
-2002-12-03 Havoc Pennington <hp@pobox.com>
-
- * gnome-keybinding-properties.c (append_keys_to_tree): store
- description in the KeyEntry
- (cb_check_for_uniqueness): don't complain if a key is a duplicate
- of itself.
- (accel_edited_callback): use human-readable key name in the error
- message, not the gconf key. Reword error message to say "shortcut"
- like the other text in the dialog. Allow duplicate disabled keys
- (keyval == 0)
- (accel_edited_callback): the passed-in mask is an
- EggVirtualModifierType.
- (struct KeyEntry): the mask is an EggVirtualModifierType
- (binding_name): use egg_virtual_accelerator_name() not
- gtk_accelerator_name().
- (binding_from_string): use egg_accelerator_parse_virtual
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-Thu Nov 14 19:01:39 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keybinding-properties.c (setup_dialog): there's no need
- for it to be resizable, as we have GTK_POLICY_NEVER for the
- hadjustment.
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-09-27 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c (cb_check_for_uniqueness) : new.
- (accel_edited_callback) : don't let a user enter duplicate
- accelerators for different actions.
-
-Fri Nov 1 17:46:06 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keybinding-properties.c: move to use gnome-theme-info
- instead of theme-common.
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-09-29 Havoc Pennington <hp@pobox.com>
-
- * eggaccelerators.c: update from libegg to get fix from Ralph
- Loader for <Super> <Hyper> <Meta> parsing, #93005
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Deepa Natarajan <deepa.natarajan@wipro.com>
-
- * gnome-keybinding-properties.c: Added [un]maximize metacity bindings.
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-Mon Aug 19 17:54:07 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (metacity_key_list): fix bindings
- to match metacity.
-
-2002-08-15 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c : Add a pile of missing metacity
- bindings.
-
-2002-08-10 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=83334
- * eggcellrendererkeys.c : do it the easy way and just update the
- libegg code.
-
-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
- into capplet_set_icon.
-
-2002-06-26 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=86575
- * gnome-keybinding-properties.c (setup_dialog) : handle missing
- pixmaps more smoothly.
-
-2002-06-21 Stephen Browne <stephen.bronwe@sun.com>
-
- * gnome-keybinding-properties.c : moved metacity detection
- out of here and into a more generic API in capplets/common/wm-common.c
-
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-29 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.c (cb_dialog_response) : fix return type.
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-keybinding-properties.glade : Added a help button
-
- * gnome-keybinding-properties.c : Put the help callback to get
- the help document from user-guide.
-
-
-Sun May 26 11:01:28 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keybinding-properties.c (main): use APPID instead of
- argv[0]
-
-2002-05-24 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=82850
- * gnome-keybinding-properties.c (setup_dialog) : some protection
- against faulty installs.
-
-Tue May 21 19:36:13 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (accel_edited_callback):
- handle the new eggcellrendererkeys signal.
-
-Sat May 18 18:25:02 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keybinding-properties.c: (append_keys_to_tree),
- (setup_dialog): Add default icon. Don't disalow closing
- expanders. Implement ui-review suggestions.
-
- * gnome-keybinding-properties.glade: Implement ui-review
- suggestions.
-
-Thu May 16 19:49:26 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (start_editing_cb): evil, evil
- hack to insta-edit. Should be removed for GTK 2.2
- (keybinding_key_changed_foreach): notify when we update the tree.
-
-2002-05-10 Jody Goldberg <jody@gnome.org>
-
- * gnome-keybinding-properties.glade : Merge in the atk patch.
-
-2002-05-09 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-keybindings-properties.c (accel_edited_callback): Mark
- a string for translation.
-
-2002-05-06 Anders Carlsson <andersca@gnu.org>
-
- * gnome-keybinding-properties.c (get_wm_name): It's true that
- g_utf8_validate doesn't like '\000' in strings, but that should
- be fixed in the programs that set the hints. (Eg Metacity).
-
-Sun May 5 22:15:18 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keybinding-properties.c (get_wm_name): g_utf8_validate
- doesn't like the '\000' in strings.
-
-2002-05-06 Anders Carlsson <andersca@gnu.org>
-
- * eggcellrendererkeys.c: (grab_key_callback), (ungrab_stuff),
- (pointless_eventbox_start_editing),
- (egg_cell_renderer_keys_start_editing):
- * eggcellrendererkeys.h:
- Update to latest eggcellrendererkeys.
-
- * gnome-keybinding-properties.c: (get_wm_name),
- (is_metacity_running), (update_wm_window),
- (wm_window_event_filter), (initialize_wm_handling),
- (binding_from_string), (accel_set_func), (keybinding_key_changed),
- (clear_old_model), (count_rows_foreach), (should_show_key),
- (append_keys_to_tree), (reload_key_entries),
- (key_entry_controlling_key_changed), (disable_collapsing_cb),
- (setup_dialog), (main):
- * gnome-keybinding-properties.glade:
- Hard-code the list of keybindings. Add Metacity keybindings
- and code for handling WM changes.
-
-2002-04-26 Havoc Pennington <hp@pobox.com>
-
- * gnome-keybinding-properties.c (append_keys_to_tree): fix
- non-use of accessor functions.
-
-Fri Apr 19 20:07:11 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (append_keys_to_tree):
- ensure_style before calling size_request.
-
-Thu Apr 18 17:56:12 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (theme_changed_func): handle new
- theme-changeing code.
-
-2002-04-11 Jacob Berkman <jacob@ximian.com>
-
- * Makefile.am (EXTRA_DIST): add pixmap
-
-2002-04-10 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * keybinding.desktop.in:
- * keyboard-shortcut.png:
-
- Add a piss-poor-at-small-sizes-but-better-than-nothing
- icon.
-
-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
- warning caused by looking in the current directory for the glade file.
- (key_theme_changed) : add some protection for missing schemas.
-
-Tue Mar 26 23:27:24 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keybinding-properties.c (setup_dialog): Only show themes
- if they actually have a keybinding. Also, initialize the keytheme
- correctly.
-
-2002-03-26 Seth Nickell <snickell@stanford.edu>
-
- * keybinding.desktop.in:
-
- Use "keyboard shortcuts" to match the window title
diff --git a/capplets/keybindings/Makefile.am b/capplets/keybindings/Makefile.am
deleted file mode 100644
index cbbc59de7..000000000
--- a/capplets/keybindings/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-bin_PROGRAMS = gnome-keybinding-properties
-
-gnome_keybinding_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-gnome_keybinding_properties_SOURCES = \
- gnome-keybinding-properties.c \
- eggcellrendererkeys.c \
- eggcellrendererkeys.h \
- eggaccelerators.c \
- eggaccelerators.h
-
-@INTLTOOL_DESKTOP_RULE@
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-keybinding-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = keybinding.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA)
-
diff --git a/capplets/keybindings/eggaccelerators.c b/capplets/keybindings/eggaccelerators.c
deleted file mode 100644
index ad72a9d99..000000000
--- a/capplets/keybindings/eggaccelerators.c
+++ /dev/null
@@ -1,701 +0,0 @@
-/* eggaccelerators.c
- * Copyright (C) 2002 Red Hat, Inc.; Copyright 1998, 2001 Tim Janik
- * Developed by Havoc Pennington, Tim Janik
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include "eggaccelerators.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkkeysyms.h>
-
-enum
-{
- EGG_MODMAP_ENTRY_SHIFT = 0,
- EGG_MODMAP_ENTRY_LOCK = 1,
- EGG_MODMAP_ENTRY_CONTROL = 2,
- EGG_MODMAP_ENTRY_MOD1 = 3,
- EGG_MODMAP_ENTRY_MOD2 = 4,
- EGG_MODMAP_ENTRY_MOD3 = 5,
- EGG_MODMAP_ENTRY_MOD4 = 6,
- EGG_MODMAP_ENTRY_MOD5 = 7,
- EGG_MODMAP_ENTRY_LAST = 8
-};
-
-#define MODMAP_ENTRY_TO_MODIFIER(x) (1 << (x))
-
-typedef struct
-{
- EggVirtualModifierType mapping[EGG_MODMAP_ENTRY_LAST];
-
-} EggModmap;
-
-const EggModmap* egg_keymap_get_modmap (GdkKeymap *keymap);
-
-static inline gboolean
-is_alt (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'a' || string[1] == 'A') &&
- (string[2] == 'l' || string[2] == 'L') &&
- (string[3] == 't' || string[3] == 'T') &&
- (string[4] == '>'));
-}
-
-static inline gboolean
-is_ctl (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'c' || string[1] == 'C') &&
- (string[2] == 't' || string[2] == 'T') &&
- (string[3] == 'l' || string[3] == 'L') &&
- (string[4] == '>'));
-}
-
-static inline gboolean
-is_modx (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'm' || string[1] == 'M') &&
- (string[2] == 'o' || string[2] == 'O') &&
- (string[3] == 'd' || string[3] == 'D') &&
- (string[4] >= '1' && string[4] <= '5') &&
- (string[5] == '>'));
-}
-
-static inline gboolean
-is_ctrl (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'c' || string[1] == 'C') &&
- (string[2] == 't' || string[2] == 'T') &&
- (string[3] == 'r' || string[3] == 'R') &&
- (string[4] == 'l' || string[4] == 'L') &&
- (string[5] == '>'));
-}
-
-static inline gboolean
-is_shft (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 's' || string[1] == 'S') &&
- (string[2] == 'h' || string[2] == 'H') &&
- (string[3] == 'f' || string[3] == 'F') &&
- (string[4] == 't' || string[4] == 'T') &&
- (string[5] == '>'));
-}
-
-static inline gboolean
-is_shift (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 's' || string[1] == 'S') &&
- (string[2] == 'h' || string[2] == 'H') &&
- (string[3] == 'i' || string[3] == 'I') &&
- (string[4] == 'f' || string[4] == 'F') &&
- (string[5] == 't' || string[5] == 'T') &&
- (string[6] == '>'));
-}
-
-static inline gboolean
-is_control (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'c' || string[1] == 'C') &&
- (string[2] == 'o' || string[2] == 'O') &&
- (string[3] == 'n' || string[3] == 'N') &&
- (string[4] == 't' || string[4] == 'T') &&
- (string[5] == 'r' || string[5] == 'R') &&
- (string[6] == 'o' || string[6] == 'O') &&
- (string[7] == 'l' || string[7] == 'L') &&
- (string[8] == '>'));
-}
-
-static inline gboolean
-is_release (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'r' || string[1] == 'R') &&
- (string[2] == 'e' || string[2] == 'E') &&
- (string[3] == 'l' || string[3] == 'L') &&
- (string[4] == 'e' || string[4] == 'E') &&
- (string[5] == 'a' || string[5] == 'A') &&
- (string[6] == 's' || string[6] == 'S') &&
- (string[7] == 'e' || string[7] == 'E') &&
- (string[8] == '>'));
-}
-
-static inline gboolean
-is_meta (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'm' || string[1] == 'M') &&
- (string[2] == 'e' || string[2] == 'E') &&
- (string[3] == 't' || string[3] == 'T') &&
- (string[4] == 'a' || string[4] == 'A') &&
- (string[5] == '>'));
-}
-
-static inline gboolean
-is_super (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 's' || string[1] == 'S') &&
- (string[2] == 'u' || string[2] == 'U') &&
- (string[3] == 'p' || string[3] == 'P') &&
- (string[4] == 'e' || string[4] == 'E') &&
- (string[5] == 'r' || string[5] == 'R') &&
- (string[6] == '>'));
-}
-
-static inline gboolean
-is_hyper (const gchar *string)
-{
- return ((string[0] == '<') &&
- (string[1] == 'h' || string[1] == 'H') &&
- (string[2] == 'y' || string[2] == 'Y') &&
- (string[3] == 'p' || string[3] == 'P') &&
- (string[4] == 'e' || string[4] == 'E') &&
- (string[5] == 'r' || string[5] == 'R') &&
- (string[6] == '>'));
-}
-
-static inline gboolean
-is_keycode (const gchar *string)
-{
- return ((string[0] == '0') &&
- (string[1] == 'x'));
-}
-
-/**
- * egg_accelerator_parse_virtual:
- * @accelerator: string representing an accelerator
- * @accelerator_key: return location for accelerator keyval
- * @accelerator_mods: return location for accelerator modifier mask
- *
- * Parses a string representing a virtual accelerator. The format
- * looks like "&lt;Control&gt;a" or "&lt;Shift&gt;&lt;Alt&gt;F1" or
- * "&lt;Release&gt;z" (the last one is for key release). The parser
- * is fairly liberal and allows lower or upper case, and also
- * abbreviations such as "&lt;Ctl&gt;" and "&lt;Ctrl&gt;".
- *
- * If the parse fails, @accelerator_key and @accelerator_mods will
- * be set to 0 (zero) and %FALSE will be returned. If the string contains
- * only modifiers, @accelerator_key will be set to 0 but %TRUE will be
- * returned.
- *
- * The virtual vs. concrete accelerator distinction is a relic of
- * how the X Window System works; there are modifiers Mod2-Mod5 that
- * can represent various keyboard keys (numlock, meta, hyper, etc.),
- * the virtual modifier represents the keyboard key, the concrete
- * modifier the actual Mod2-Mod5 bits in the key press event.
- *
- * Returns: %TRUE on success.
- */
-gboolean
-egg_accelerator_parse_virtual (const gchar *accelerator,
- guint *accelerator_key,
- guint *keycode,
- EggVirtualModifierType *accelerator_mods)
-{
- guint keyval;
- GdkModifierType mods;
- gint len;
- gboolean bad_keyval;
-
- if (accelerator_key)
- *accelerator_key = 0;
- if (accelerator_mods)
- *accelerator_mods = 0;
- if (keycode)
- *keycode = 0;
-
- g_return_val_if_fail (accelerator != NULL, FALSE);
-
- bad_keyval = FALSE;
-
- keyval = 0;
- mods = 0;
- len = strlen (accelerator);
- while (len)
- {
- if (*accelerator == '<')
- {
- if (len >= 9 && is_release (accelerator))
- {
- accelerator += 9;
- len -= 9;
- mods |= EGG_VIRTUAL_RELEASE_MASK;
- }
- else if (len >= 9 && is_control (accelerator))
- {
- accelerator += 9;
- len -= 9;
- mods |= EGG_VIRTUAL_CONTROL_MASK;
- }
- else if (len >= 7 && is_shift (accelerator))
- {
- accelerator += 7;
- len -= 7;
- mods |= EGG_VIRTUAL_SHIFT_MASK;
- }
- else if (len >= 6 && is_shft (accelerator))
- {
- accelerator += 6;
- len -= 6;
- mods |= EGG_VIRTUAL_SHIFT_MASK;
- }
- else if (len >= 6 && is_ctrl (accelerator))
- {
- accelerator += 6;
- len -= 6;
- mods |= EGG_VIRTUAL_CONTROL_MASK;
- }
- else if (len >= 6 && is_modx (accelerator))
- {
- static const guint mod_vals[] = {
- EGG_VIRTUAL_ALT_MASK, EGG_VIRTUAL_MOD2_MASK, EGG_VIRTUAL_MOD3_MASK,
- EGG_VIRTUAL_MOD4_MASK, EGG_VIRTUAL_MOD5_MASK
- };
-
- len -= 6;
- accelerator += 4;
- mods |= mod_vals[*accelerator - '1'];
- accelerator += 2;
- }
- else if (len >= 5 && is_ctl (accelerator))
- {
- accelerator += 5;
- len -= 5;
- mods |= EGG_VIRTUAL_CONTROL_MASK;
- }
- else if (len >= 5 && is_alt (accelerator))
- {
- accelerator += 5;
- len -= 5;
- mods |= EGG_VIRTUAL_ALT_MASK;
- }
- else if (len >= 6 && is_meta (accelerator))
- {
- accelerator += 6;
- len -= 6;
- mods |= EGG_VIRTUAL_META_MASK;
- }
- else if (len >= 7 && is_hyper (accelerator))
- {
- accelerator += 7;
- len -= 7;
- mods |= EGG_VIRTUAL_HYPER_MASK;
- }
- else if (len >= 7 && is_super (accelerator))
- {
- accelerator += 7;
- len -= 7;
- mods |= EGG_VIRTUAL_SUPER_MASK;
- }
- else
- {
- gchar last_ch;
-
- last_ch = *accelerator;
- while (last_ch && last_ch != '>')
- {
- last_ch = *accelerator;
- accelerator += 1;
- len -= 1;
- }
- }
- }
- else
- {
- keyval = gdk_keyval_from_name (accelerator);
-
- if (keyval == 0)
- {
- /* If keyval is 0, than maybe it's a keycode. Check for 0x## */
- if (len >= 4 && is_keycode (accelerator))
- {
- char keystring[5];
- gchar *endptr;
- gint tmp_keycode;
-
- memcpy (keystring, accelerator, 4);
- keystring [4] = '\000';
-
- tmp_keycode = strtol (keystring, &endptr, 16);
-
- if (endptr == NULL || *endptr != '\000')
- {
- bad_keyval = TRUE;
- }
- else
- {
- *keycode = tmp_keycode;
- /* 0x00 is an invalid keycode too. */
- if (*keycode == 0)
- bad_keyval = TRUE;
- }
- }
- }
-
- accelerator += len;
- len -= len;
- }
- }
-
- if (accelerator_key)
- *accelerator_key = gdk_keyval_to_lower (keyval);
- if (accelerator_mods)
- *accelerator_mods = mods;
-
- return !bad_keyval;
-}
-
-
-/**
- * egg_virtual_accelerator_name:
- * @accelerator_key: accelerator keyval
- * @accelerator_mods: accelerator modifier mask
- * @returns: a newly-allocated accelerator name
- *
- * Converts an accelerator keyval and modifier mask
- * into a string parseable by egg_accelerator_parse_virtual().
- * For example, if you pass in #GDK_q and #EGG_VIRTUAL_CONTROL_MASK,
- * this function returns "&lt;Control&gt;q".
- *
- * The caller of this function must free the returned string.
- */
-gchar*
-egg_virtual_accelerator_name (guint accelerator_key,
- guint keycode,
- EggVirtualModifierType accelerator_mods)
-{
- static const gchar text_release[] = "<Release>";
- static const gchar text_shift[] = "<Shift>";
- static const gchar text_control[] = "<Control>";
- static const gchar text_mod1[] = "<Alt>";
- static const gchar text_mod2[] = "<Mod2>";
- static const gchar text_mod3[] = "<Mod3>";
- static const gchar text_mod4[] = "<Mod4>";
- static const gchar text_mod5[] = "<Mod5>";
- static const gchar text_meta[] = "<Meta>";
- static const gchar text_super[] = "<Super>";
- static const gchar text_hyper[] = "<Hyper>";
- guint l;
- gchar *keyval_name;
- gchar *accelerator;
-
- accelerator_mods &= EGG_VIRTUAL_MODIFIER_MASK;
-
- if (!accelerator_key)
- {
- keyval_name = g_strdup_printf ("0x%02x", keycode);
- }
- else
- {
- keyval_name = gdk_keyval_name (gdk_keyval_to_lower (accelerator_key));
- if (!keyval_name)
- keyval_name = "";
- }
-
- l = 0;
- if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
- l += sizeof (text_release) - 1;
- if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
- l += sizeof (text_shift) - 1;
- if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
- l += sizeof (text_control) - 1;
- if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
- l += sizeof (text_mod1) - 1;
- if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
- l += sizeof (text_mod2) - 1;
- if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
- l += sizeof (text_mod3) - 1;
- if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
- l += sizeof (text_mod4) - 1;
- if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
- l += sizeof (text_mod5) - 1;
- if (accelerator_mods & EGG_VIRTUAL_META_MASK)
- l += sizeof (text_meta) - 1;
- if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
- l += sizeof (text_hyper) - 1;
- if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
- l += sizeof (text_super) - 1;
- l += strlen (keyval_name);
-
- accelerator = g_new (gchar, l + 1);
-
- l = 0;
- accelerator[l] = 0;
- if (accelerator_mods & EGG_VIRTUAL_RELEASE_MASK)
- {
- strcpy (accelerator + l, text_release);
- l += sizeof (text_release) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_SHIFT_MASK)
- {
- strcpy (accelerator + l, text_shift);
- l += sizeof (text_shift) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_CONTROL_MASK)
- {
- strcpy (accelerator + l, text_control);
- l += sizeof (text_control) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_ALT_MASK)
- {
- strcpy (accelerator + l, text_mod1);
- l += sizeof (text_mod1) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_MOD2_MASK)
- {
- strcpy (accelerator + l, text_mod2);
- l += sizeof (text_mod2) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_MOD3_MASK)
- {
- strcpy (accelerator + l, text_mod3);
- l += sizeof (text_mod3) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_MOD4_MASK)
- {
- strcpy (accelerator + l, text_mod4);
- l += sizeof (text_mod4) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_MOD5_MASK)
- {
- strcpy (accelerator + l, text_mod5);
- l += sizeof (text_mod5) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_META_MASK)
- {
- strcpy (accelerator + l, text_meta);
- l += sizeof (text_meta) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_HYPER_MASK)
- {
- strcpy (accelerator + l, text_hyper);
- l += sizeof (text_hyper) - 1;
- }
- if (accelerator_mods & EGG_VIRTUAL_SUPER_MASK)
- {
- strcpy (accelerator + l, text_super);
- l += sizeof (text_super) - 1;
- }
-
- strcpy (accelerator + l, keyval_name);
-
- return accelerator;
-}
-
-void
-egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
- EggVirtualModifierType virtual_mods,
- GdkModifierType *concrete_mods)
-{
- GdkModifierType concrete;
- int i;
- const EggModmap *modmap;
-
- g_return_if_fail (GDK_IS_KEYMAP (keymap));
- g_return_if_fail (concrete_mods != NULL);
-
- modmap = egg_keymap_get_modmap (keymap);
-
- /* Not so sure about this algorithm. */
-
- concrete = 0;
- i = 0;
- while (i < EGG_MODMAP_ENTRY_LAST)
- {
- if (modmap->mapping[i] & virtual_mods)
- concrete |= (1 << i);
-
- ++i;
- }
-
- *concrete_mods = concrete;
-}
-
-void
-egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
- GdkModifierType concrete_mods,
- EggVirtualModifierType *virtual_mods)
-{
- GdkModifierType virtual;
- int i;
- const EggModmap *modmap;
-
- g_return_if_fail (GDK_IS_KEYMAP (keymap));
- g_return_if_fail (virtual_mods != NULL);
-
- modmap = egg_keymap_get_modmap (keymap);
-
- /* Not so sure about this algorithm. */
-
- virtual = 0;
- i = 0;
- while (i < EGG_MODMAP_ENTRY_LAST)
- {
- if ((1 << i) & concrete_mods)
- {
- EggVirtualModifierType cleaned;
-
- cleaned = modmap->mapping[i] & ~(EGG_VIRTUAL_MOD2_MASK |
- EGG_VIRTUAL_MOD3_MASK |
- EGG_VIRTUAL_MOD4_MASK |
- EGG_VIRTUAL_MOD5_MASK);
-
- if (cleaned != 0)
- {
- virtual |= cleaned;
- }
- else
- {
- /* Rather than dropping mod2->mod5 if not bound,
- * go ahead and use the concrete names
- */
- virtual |= modmap->mapping[i];
- }
- }
-
- ++i;
- }
-
- *virtual_mods = virtual;
-}
-
-static void
-reload_modmap (GdkKeymap *keymap,
- EggModmap *modmap)
-{
- XModifierKeymap *xmodmap;
- int map_size;
- int i;
-
- /* FIXME multihead */
- xmodmap = XGetModifierMapping (gdk_x11_get_default_xdisplay ());
-
- memset (modmap->mapping, 0, sizeof (modmap->mapping));
-
- /* there are 8 modifiers, and the first 3 are shift, shift lock,
- * and control
- */
- map_size = 8 * xmodmap->max_keypermod;
- i = 3 * xmodmap->max_keypermod;
- while (i < map_size)
- {
- /* get the key code at this point in the map,
- * see if its keysym is one we're interested in
- */
- int keycode = xmodmap->modifiermap[i];
- GdkKeymapKey *keys;
- guint *keyvals;
- int n_entries;
- int j;
- EggVirtualModifierType mask;
-
- keys = NULL;
- keyvals = NULL;
- n_entries = 0;
-
- gdk_keymap_get_entries_for_keycode (keymap,
- keycode,
- &keys, &keyvals, &n_entries);
-
- mask = 0;
- j = 0;
- while (j < n_entries)
- {
- if (keyvals[j] == GDK_Num_Lock)
- mask |= EGG_VIRTUAL_NUM_LOCK_MASK;
- else if (keyvals[j] == GDK_Scroll_Lock)
- mask |= EGG_VIRTUAL_SCROLL_LOCK_MASK;
- else if (keyvals[j] == GDK_Meta_L ||
- keyvals[j] == GDK_Meta_R)
- mask |= EGG_VIRTUAL_META_MASK;
- else if (keyvals[j] == GDK_Hyper_L ||
- keyvals[j] == GDK_Hyper_R)
- mask |= EGG_VIRTUAL_HYPER_MASK;
- else if (keyvals[j] == GDK_Super_L ||
- keyvals[j] == GDK_Super_R)
- mask |= EGG_VIRTUAL_SUPER_MASK;
- else if (keyvals[j] == GDK_Mode_switch)
- mask |= EGG_VIRTUAL_MODE_SWITCH_MASK;
-
- ++j;
- }
-
- /* Mod1Mask is 1 << 3 for example, i.e. the
- * fourth modifier, i / keyspermod is the modifier
- * index
- */
- modmap->mapping[i/xmodmap->max_keypermod] |= mask;
-
- g_free (keyvals);
- g_free (keys);
-
- ++i;
- }
-
- /* Add in the not-really-virtual fixed entries */
- modmap->mapping[EGG_MODMAP_ENTRY_SHIFT] |= EGG_VIRTUAL_SHIFT_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_CONTROL] |= EGG_VIRTUAL_CONTROL_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_LOCK] |= EGG_VIRTUAL_LOCK_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_MOD1] |= EGG_VIRTUAL_ALT_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_MOD2] |= EGG_VIRTUAL_MOD2_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_MOD3] |= EGG_VIRTUAL_MOD3_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_MOD4] |= EGG_VIRTUAL_MOD4_MASK;
- modmap->mapping[EGG_MODMAP_ENTRY_MOD5] |= EGG_VIRTUAL_MOD5_MASK;
-
- XFreeModifiermap (xmodmap);
-}
-
-const EggModmap*
-egg_keymap_get_modmap (GdkKeymap *keymap)
-{
- EggModmap *modmap;
-
- /* This is all a hack, much simpler when we can just
- * modify GDK directly.
- */
-
- modmap = g_object_get_data (G_OBJECT (keymap),
- "egg-modmap");
-
- if (modmap == NULL)
- {
- modmap = g_new0 (EggModmap, 1);
-
- /* FIXME modify keymap change events with an event filter
- * and force a reload if we get one
- */
-
- reload_modmap (keymap, modmap);
-
- g_object_set_data_full (G_OBJECT (keymap),
- "egg-modmap",
- modmap,
- g_free);
- }
-
- g_assert (modmap != NULL);
-
- return modmap;
-}
diff --git a/capplets/keybindings/eggaccelerators.h b/capplets/keybindings/eggaccelerators.h
deleted file mode 100644
index d2276d2b2..000000000
--- a/capplets/keybindings/eggaccelerators.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* eggaccelerators.h
- * Copyright (C) 2002 Red Hat, Inc.
- * Developed by Havoc Pennington
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EGG_ACCELERATORS_H__
-#define __EGG_ACCELERATORS_H__
-
-#include <gtk/gtkaccelgroup.h>
-#include <gdk/gdk.h>
-
-G_BEGIN_DECLS
-
-/* Where a value is also in GdkModifierType we coincide,
- * otherwise we don't overlap.
- */
-typedef enum
-{
- EGG_VIRTUAL_SHIFT_MASK = 1 << 0,
- EGG_VIRTUAL_LOCK_MASK = 1 << 1,
- EGG_VIRTUAL_CONTROL_MASK = 1 << 2,
-
- EGG_VIRTUAL_ALT_MASK = 1 << 3, /* fixed as Mod1 */
-
- EGG_VIRTUAL_MOD2_MASK = 1 << 4,
- EGG_VIRTUAL_MOD3_MASK = 1 << 5,
- EGG_VIRTUAL_MOD4_MASK = 1 << 6,
- EGG_VIRTUAL_MOD5_MASK = 1 << 7,
-
-#if 0
- GDK_BUTTON1_MASK = 1 << 8,
- GDK_BUTTON2_MASK = 1 << 9,
- GDK_BUTTON3_MASK = 1 << 10,
- GDK_BUTTON4_MASK = 1 << 11,
- GDK_BUTTON5_MASK = 1 << 12,
- /* 13, 14 are used by Xkb for the keyboard group */
-#endif
-
- EGG_VIRTUAL_META_MASK = 1 << 24,
- EGG_VIRTUAL_SUPER_MASK = 1 << 25,
- EGG_VIRTUAL_HYPER_MASK = 1 << 26,
- EGG_VIRTUAL_MODE_SWITCH_MASK = 1 << 27,
- EGG_VIRTUAL_NUM_LOCK_MASK = 1 << 28,
- EGG_VIRTUAL_SCROLL_LOCK_MASK = 1 << 29,
-
- /* Also in GdkModifierType */
- EGG_VIRTUAL_RELEASE_MASK = 1 << 30,
-
- /* 28-31 24-27 20-23 16-19 12-15 8-11 4-7 0-3
- * 7 f 0 0 0 0 f f
- */
- EGG_VIRTUAL_MODIFIER_MASK = 0x7f0000ff
-
-} EggVirtualModifierType;
-
-gboolean egg_accelerator_parse_virtual (const gchar *accelerator,
- guint *accelerator_key,
- guint *keycode,
- EggVirtualModifierType *accelerator_mods);
-void egg_keymap_resolve_virtual_modifiers (GdkKeymap *keymap,
- EggVirtualModifierType virtual_mods,
- GdkModifierType *concrete_mods);
-void egg_keymap_virtualize_modifiers (GdkKeymap *keymap,
- GdkModifierType concrete_mods,
- EggVirtualModifierType *virtual_mods);
-
-gchar* egg_virtual_accelerator_name (guint accelerator_key,
- guint keycode,
- EggVirtualModifierType accelerator_mods);
-
-G_END_DECLS
-
-
-#endif /* __EGG_ACCELERATORS_H__ */
diff --git a/capplets/keybindings/eggcellrendererkeys.c b/capplets/keybindings/eggcellrendererkeys.c
deleted file mode 100644
index 7d56e7c27..000000000
--- a/capplets/keybindings/eggcellrendererkeys.c
+++ /dev/null
@@ -1,695 +0,0 @@
-#include <config.h>
-#include <libintl.h>
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <gdk/gdkkeysyms.h>
-#include "eggcellrendererkeys.h"
-#include "eggaccelerators.h"
-
-#ifndef EGG_COMPILATION
-#ifndef _
-#define _(x) dgettext (GETTEXT_PACKAGE, x)
-#define N_(x) x
-#endif
-#else
-#define _(x) x
-#define N_(x) x
-#endif
-
-#define EGG_CELL_RENDERER_TEXT_PATH "egg-cell-renderer-text"
-
-#define TOOLTIP_TEXT _("New accelerator...")
-
-static void egg_cell_renderer_keys_finalize (GObject *object);
-static void egg_cell_renderer_keys_init (EggCellRendererKeys *cell_keys);
-static void egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class);
-static GtkCellEditable *egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags);
-
-
-static void egg_cell_renderer_keys_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec);
-static void egg_cell_renderer_keys_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec);
-static void egg_cell_renderer_keys_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height);
-
-
-enum {
- PROP_0,
-
- PROP_ACCEL_KEY,
- PROP_ACCEL_MASK,
- PROP_KEYCODE,
- PROP_ACCEL_MODE
-};
-
-static GtkCellRendererTextClass *parent_class = NULL;
-
-GType
-egg_cell_renderer_keys_get_type (void)
-{
- static GType cell_keys_type = 0;
-
- if (!cell_keys_type)
- {
- static const GTypeInfo cell_keys_info =
- {
- sizeof (EggCellRendererKeysClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- (GClassInitFunc)egg_cell_renderer_keys_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EggCellRendererKeys),
- 0, /* n_preallocs */
- (GInstanceInitFunc) egg_cell_renderer_keys_init
- };
-
- cell_keys_type = g_type_register_static (GTK_TYPE_CELL_RENDERER_TEXT, "EggCellRendererKeys", &cell_keys_info, 0);
- }
-
- return cell_keys_type;
-}
-
-static void
-egg_cell_renderer_keys_init (EggCellRendererKeys *cell_keys)
-{
- cell_keys->accel_mode = EGG_CELL_RENDERER_KEYS_MODE_GTK;
-}
-
-/* FIXME setup stuff to generate this */
-/* VOID:STRING,UINT,FLAGS,UINT */
-static void
-marshal_VOID__STRING_UINT_FLAGS_UINT (GClosure *closure,
- GValue *return_value,
- guint n_param_values,
- const GValue *param_values,
- gpointer invocation_hint,
- gpointer marshal_data)
-{
- typedef void (*GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT) (gpointer data1,
- const char *arg_1,
- guint arg_2,
- int arg_3,
- guint arg_4,
- gpointer data2);
- register GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT callback;
- register GCClosure *cc = (GCClosure*) closure;
- register gpointer data1, data2;
-
- g_return_if_fail (n_param_values == 5);
-
- if (G_CCLOSURE_SWAP_DATA (closure))
- {
- data1 = closure->data;
- data2 = g_value_peek_pointer (param_values + 0);
- }
- else
- {
- data1 = g_value_peek_pointer (param_values + 0);
- data2 = closure->data;
- }
-
- callback = (GMarshalFunc_VOID__STRING_UINT_FLAGS_UINT) (marshal_data ? marshal_data : cc->callback);
-
- callback (data1,
- g_value_get_string (param_values + 1),
- g_value_get_uint (param_values + 2),
- g_value_get_flags (param_values + 3),
- g_value_get_uint (param_values + 4),
- data2);
-}
-
-static void
-egg_cell_renderer_keys_class_init (EggCellRendererKeysClass *cell_keys_class)
-{
- GObjectClass *object_class;
- GtkCellRendererClass *cell_renderer_class;
-
- object_class = G_OBJECT_CLASS (cell_keys_class);
- cell_renderer_class = GTK_CELL_RENDERER_CLASS (cell_keys_class);
- parent_class = g_type_class_peek_parent (object_class);
-
- GTK_CELL_RENDERER_CLASS (cell_keys_class)->start_editing = egg_cell_renderer_keys_start_editing;
-
- object_class->set_property = egg_cell_renderer_keys_set_property;
- object_class->get_property = egg_cell_renderer_keys_get_property;
- cell_renderer_class->get_size = egg_cell_renderer_keys_get_size;
-
- object_class->finalize = egg_cell_renderer_keys_finalize;
-
- /* FIXME if this gets moved to a real library, rename the properties
- * to match whatever the GTK convention is
- */
-
- g_object_class_install_property (object_class,
- PROP_ACCEL_KEY,
- g_param_spec_uint ("accel_key",
- _("Accelerator key"),
- _("Accelerator key"),
- 0,
- G_MAXINT,
- 0,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class,
- PROP_ACCEL_MASK,
- g_param_spec_flags ("accel_mask",
- _("Accelerator modifiers"),
- _("Accelerator modifiers"),
- GDK_TYPE_MODIFIER_TYPE,
- 0,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
-
- g_object_class_install_property (object_class,
- PROP_KEYCODE,
- g_param_spec_uint ("keycode",
- _("Accelerator keycode"),
- _("Accelerator keycode"),
- 0,
- G_MAXINT,
- 0,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
-
- /* FIXME: Register the enum when moving to GTK+ */
- g_object_class_install_property (object_class,
- PROP_ACCEL_MODE,
- g_param_spec_int ("accel_mode",
- _("Accel Mode"),
- _("The type of accelerator."),
- 0,
- 2,
- 0,
- G_PARAM_READABLE | G_PARAM_WRITABLE));
-
- g_signal_new ("accel_edited",
- EGG_TYPE_CELL_RENDERER_KEYS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EggCellRendererKeysClass, accel_edited),
- NULL, NULL,
- marshal_VOID__STRING_UINT_FLAGS_UINT,
- G_TYPE_NONE, 4,
- G_TYPE_STRING,
- G_TYPE_UINT,
- GDK_TYPE_MODIFIER_TYPE,
- G_TYPE_UINT);
-
- g_signal_new ("accel_cleared",
- EGG_TYPE_CELL_RENDERER_KEYS,
- G_SIGNAL_RUN_LAST,
- G_STRUCT_OFFSET (EggCellRendererKeysClass, accel_cleared),
- NULL, NULL,
- gtk_marshal_VOID__STRING,
- G_TYPE_NONE, 1,
- G_TYPE_STRING);
-}
-
-
-GtkCellRenderer *
-egg_cell_renderer_keys_new (void)
-{
- return GTK_CELL_RENDERER (g_object_new (EGG_TYPE_CELL_RENDERER_KEYS, NULL));
-}
-
-static void
-egg_cell_renderer_keys_finalize (GObject *object)
-{
-
- (* G_OBJECT_CLASS (parent_class)->finalize) (object);
-}
-
-static gchar *
-convert_keysym_state_to_string (guint keysym,
- guint keycode,
- EggVirtualModifierType mask)
-{
- if (keysym == 0 && keycode == 0)
- return g_strdup (_("Disabled"));
- else
- return egg_virtual_accelerator_name (keysym, keycode, mask);
-}
-
-static void
-egg_cell_renderer_keys_get_property (GObject *object,
- guint param_id,
- GValue *value,
- GParamSpec *pspec)
-{
- EggCellRendererKeys *keys;
-
- g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object));
-
- keys = EGG_CELL_RENDERER_KEYS (object);
-
- switch (param_id)
- {
- case PROP_ACCEL_KEY:
- g_value_set_uint (value, keys->accel_key);
- break;
-
- case PROP_ACCEL_MASK:
- g_value_set_flags (value, keys->accel_mask);
- break;
-
- case PROP_ACCEL_MODE:
- g_value_set_int (value, keys->accel_mode);
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- }
-}
-
-static void
-egg_cell_renderer_keys_set_property (GObject *object,
- guint param_id,
- const GValue *value,
- GParamSpec *pspec)
-{
- EggCellRendererKeys *keys;
-
- g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (object));
-
- keys = EGG_CELL_RENDERER_KEYS (object);
-
- switch (param_id)
- {
- case PROP_ACCEL_KEY:
- egg_cell_renderer_keys_set_accelerator (keys,
- g_value_get_uint (value),
- keys->keycode,
- keys->accel_mask);
- break;
-
- case PROP_ACCEL_MASK:
- egg_cell_renderer_keys_set_accelerator (keys,
- keys->accel_key,
- keys->keycode,
- g_value_get_flags (value));
- break;
- case PROP_KEYCODE:
- egg_cell_renderer_keys_set_accelerator (keys,
- keys->accel_key,
- g_value_get_uint (value),
- keys->accel_mask);
- break;
-
- case PROP_ACCEL_MODE:
- egg_cell_renderer_keys_set_accel_mode (keys, g_value_get_int (value));
- break;
-
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec);
- }
-}
-
-static gboolean
-is_modifier (guint keycode)
-{
- gint i;
- gint map_size;
- XModifierKeymap *mod_keymap;
- gboolean retval = FALSE;
-
- mod_keymap = XGetModifierMapping (gdk_display);
-
- map_size = 8 * mod_keymap->max_keypermod;
- i = 0;
- while (i < map_size)
- {
- if (keycode == mod_keymap->modifiermap[i])
- {
- retval = TRUE;
- break;
- }
- ++i;
- }
-
- XFreeModifiermap (mod_keymap);
-
- return retval;
-}
-
-static void
-egg_cell_renderer_keys_get_size (GtkCellRenderer *cell,
- GtkWidget *widget,
- GdkRectangle *cell_area,
- gint *x_offset,
- gint *y_offset,
- gint *width,
- gint *height)
-
-{
- EggCellRendererKeys *keys = (EggCellRendererKeys *) cell;
- GtkRequisition requisition;
-
- if (keys->sizing_label == NULL)
- keys->sizing_label = gtk_label_new (TOOLTIP_TEXT);
-
- gtk_widget_size_request (keys->sizing_label, &requisition);
- (* GTK_CELL_RENDERER_CLASS (parent_class)->get_size) (cell, widget, cell_area, x_offset, y_offset, width, height);
- /* FIXME: need to take the cell_area et al. into account */
- if (width)
- *width = MAX (*width, requisition.width);
- if (height)
- *height = MAX (*height, requisition.height);
-}
-
-/* FIXME: Currently we don't differentiate between a 'bogus' key (like tab in
- * GTK mode) and a removed key.
- */
-
-static gboolean
-grab_key_callback (GtkWidget *widget,
- GdkEventKey *event,
- void *data)
-{
- GdkModifierType accel_mods = 0;
- guint accel_keyval;
- EggCellRendererKeys *keys;
- char *path;
- gboolean edited;
- gboolean cleared;
- GdkModifierType consumed_modifiers;
- guint upper;
- GdkModifierType ignored_modifiers;
-
- keys = EGG_CELL_RENDERER_KEYS (data);
-
- if (is_modifier (event->hardware_keycode))
- return TRUE;
-
- edited = FALSE;
- cleared = FALSE;
-
- consumed_modifiers = 0;
- gdk_keymap_translate_keyboard_state (gdk_keymap_get_default (),
- event->hardware_keycode,
- event->state,
- event->group,
- NULL, NULL, NULL, &consumed_modifiers);
-
- upper = event->keyval;
- accel_keyval = gdk_keyval_to_lower (upper);
- if (accel_keyval == GDK_ISO_Left_Tab)
- accel_keyval = GDK_Tab;
-
-
-
- /* Put shift back if it changed the case of the key, not otherwise.
- */
- if (upper != accel_keyval &&
- (consumed_modifiers & GDK_SHIFT_MASK))
- {
- consumed_modifiers &= ~(GDK_SHIFT_MASK);
- }
-
- egg_keymap_resolve_virtual_modifiers (gdk_keymap_get_default (),
- EGG_VIRTUAL_NUM_LOCK_MASK |
- EGG_VIRTUAL_SCROLL_LOCK_MASK,
- &ignored_modifiers);
-
- /* http://bugzilla.gnome.org/show_bug.cgi?id=139605
- * mouse keys should effect keybindings */
- ignored_modifiers |= GDK_BUTTON1_MASK |
- GDK_BUTTON2_MASK |
- GDK_BUTTON3_MASK |
- GDK_BUTTON4_MASK |
- GDK_BUTTON5_MASK;
-
- /* filter consumed/ignored modifiers */
-
- if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_GTK)
- accel_mods = event->state & GDK_MODIFIER_MASK & ~(consumed_modifiers | ignored_modifiers);
- else if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_X)
- accel_mods = event->state & GDK_MODIFIER_MASK & ~(ignored_modifiers);
- else
- g_assert_not_reached ();
-
- if (accel_mods == 0 && accel_keyval == GDK_Escape)
- goto out; /* cancel */
-
- /* clear the accelerator on Backspace */
- if (accel_mods == 0 && accel_keyval == GDK_BackSpace)
- {
- cleared = TRUE;
- goto out;
- }
-
- if (keys->accel_mode == EGG_CELL_RENDERER_KEYS_MODE_GTK)
- {
- if (!gtk_accelerator_valid (accel_keyval, accel_mods))
- {
- accel_keyval = 0;
- accel_mods = 0;
- }
- }
-
- edited = TRUE;
- out:
- gdk_keyboard_ungrab (event->time);
- gdk_pointer_ungrab (event->time);
-
- path = g_strdup (g_object_get_data (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH));
-
- gtk_cell_editable_editing_done (GTK_CELL_EDITABLE (keys->edit_widget));
- gtk_cell_editable_remove_widget (GTK_CELL_EDITABLE (keys->edit_widget));
- keys->edit_widget = NULL;
- keys->grab_widget = NULL;
-
- if (edited)
- {
- g_signal_emit_by_name (G_OBJECT (keys), "accel_edited", path,
- accel_keyval, accel_mods, event->hardware_keycode);
- }
- else if (cleared)
- {
- g_signal_emit_by_name (G_OBJECT (keys), "accel_cleared", path);
- }
-
- g_free (path);
- return TRUE;
-}
-
-static void
-ungrab_stuff (GtkWidget *widget, gpointer data)
-{
- EggCellRendererKeys *keys = EGG_CELL_RENDERER_KEYS (data);
-
- gdk_keyboard_ungrab (GDK_CURRENT_TIME);
- gdk_pointer_ungrab (GDK_CURRENT_TIME);
-
- g_signal_handlers_disconnect_by_func (G_OBJECT (keys->grab_widget),
- G_CALLBACK (grab_key_callback), data);
-}
-
-static void
-pointless_eventbox_start_editing (GtkCellEditable *cell_editable,
- GdkEvent *event)
-{
- /* do nothing, because we are pointless */
-}
-
-static void
-pointless_eventbox_cell_editable_init (GtkCellEditableIface *iface)
-{
- iface->start_editing = pointless_eventbox_start_editing;
-}
-
-static GType
-pointless_eventbox_subclass_get_type (void)
-{
- static GType eventbox_type = 0;
-
- if (!eventbox_type)
- {
- static const GTypeInfo eventbox_info =
- {
- sizeof (GtkEventBoxClass),
- NULL, /* base_init */
- NULL, /* base_finalize */
- NULL,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (GtkEventBox),
- 0, /* n_preallocs */
- (GInstanceInitFunc) NULL,
- };
-
- static const GInterfaceInfo cell_editable_info = {
- (GInterfaceInitFunc) pointless_eventbox_cell_editable_init,
- NULL, NULL };
-
- eventbox_type = g_type_register_static (GTK_TYPE_EVENT_BOX, "EggCellEditableEventBox", &eventbox_info, 0);
-
- g_type_add_interface_static (eventbox_type,
- GTK_TYPE_CELL_EDITABLE,
- &cell_editable_info);
- }
-
- return eventbox_type;
-}
-
-static GtkCellEditable *
-egg_cell_renderer_keys_start_editing (GtkCellRenderer *cell,
- GdkEvent *event,
- GtkWidget *widget,
- const gchar *path,
- GdkRectangle *background_area,
- GdkRectangle *cell_area,
- GtkCellRendererState flags)
-{
- GtkCellRendererText *celltext;
- EggCellRendererKeys *keys;
- GtkWidget *label;
- GtkWidget *eventbox;
-
- celltext = GTK_CELL_RENDERER_TEXT (cell);
- keys = EGG_CELL_RENDERER_KEYS (cell);
-
- /* If the cell isn't editable we return NULL. */
- if (celltext->editable == FALSE)
- return NULL;
-
- g_return_val_if_fail (widget->window != NULL, NULL);
-
- if (gdk_keyboard_grab (widget->window, FALSE,
- gdk_event_get_time (event)) != GDK_GRAB_SUCCESS)
- return NULL;
-
- if (gdk_pointer_grab (widget->window, FALSE,
- GDK_BUTTON_PRESS_MASK,
- NULL, NULL,
- gdk_event_get_time (event)) != GDK_GRAB_SUCCESS)
- {
- gdk_keyboard_ungrab (gdk_event_get_time (event));
- return NULL;
- }
-
- keys->grab_widget = widget;
-
- g_signal_connect (G_OBJECT (widget), "key_press_event",
- G_CALLBACK (grab_key_callback),
- keys);
-
- eventbox = g_object_new (pointless_eventbox_subclass_get_type (),
- NULL);
- keys->edit_widget = eventbox;
- g_object_add_weak_pointer (G_OBJECT (keys->edit_widget),
- (void**) &keys->edit_widget);
-
- label = gtk_label_new (NULL);
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
-
- gtk_widget_modify_bg (eventbox, GTK_STATE_NORMAL,
- &widget->style->bg[GTK_STATE_SELECTED]);
-
- gtk_widget_modify_fg (label, GTK_STATE_NORMAL,
- &widget->style->fg[GTK_STATE_SELECTED]);
-
- gtk_label_set_text (GTK_LABEL (label),
- TOOLTIP_TEXT);
-
- gtk_container_add (GTK_CONTAINER (eventbox), label);
-
- g_object_set_data_full (G_OBJECT (keys->edit_widget), EGG_CELL_RENDERER_TEXT_PATH,
- g_strdup (path), g_free);
-
- gtk_widget_show_all (keys->edit_widget);
-
- g_signal_connect (G_OBJECT (keys->edit_widget), "unrealize",
- G_CALLBACK (ungrab_stuff), keys);
-
- keys->edit_key = keys->accel_key;
-
- return GTK_CELL_EDITABLE (keys->edit_widget);
-}
-
-void
-egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
- guint keyval,
- guint keycode,
- EggVirtualModifierType mask)
-{
- char *text;
- gboolean changed;
- GtkCellRendererText *celltext;
-
- g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys));
-
- g_object_freeze_notify (G_OBJECT (keys));
-
- changed = FALSE;
-
- if (keyval != keys->accel_key)
- {
- keys->accel_key = keyval;
- g_object_notify (G_OBJECT (keys), "accel_key");
- changed = TRUE;
- }
-
- if (mask != keys->accel_mask)
- {
- keys->accel_mask = mask;
-
- g_object_notify (G_OBJECT (keys), "accel_mask");
- changed = TRUE;
- }
-
- if (keycode != keys->keycode)
- {
- keys->keycode = keycode;
-
- g_object_notify (G_OBJECT (keys), "keycode");
- changed = TRUE;
- }
- g_object_thaw_notify (G_OBJECT (keys));
-
- if (changed)
- {
- /* sync string to the key values */
- celltext = GTK_CELL_RENDERER_TEXT (keys);
- text = convert_keysym_state_to_string (keys->accel_key, keys->keycode, keys->accel_mask);
- g_object_set (keys, "text", text, NULL);
- g_free (text);
- }
-
-}
-
-void
-egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys,
- guint *keyval,
- EggVirtualModifierType *mask)
-{
- g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys));
-
- if (keyval)
- *keyval = keys->accel_key;
-
- if (mask)
- *mask = keys->accel_mask;
-}
-
-void
-egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys,
- EggCellRendererKeysMode accel_mode)
-{
- g_return_if_fail (EGG_IS_CELL_RENDERER_KEYS (keys));
- keys->accel_mode = accel_mode;
- g_object_notify (G_OBJECT (keys), "accel_mode");
-}
diff --git a/capplets/keybindings/eggcellrendererkeys.h b/capplets/keybindings/eggcellrendererkeys.h
deleted file mode 100644
index 5f1eb10be..000000000
--- a/capplets/keybindings/eggcellrendererkeys.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* gtkcellrendererkeybinding.h
- * Copyright (C) 2000 Red Hat, Inc., Jonathan Blandford <jrb@redhat.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifndef __EGG_CELL_RENDERER_KEYS_H__
-#define __EGG_CELL_RENDERER_KEYS_H__
-
-#include <gtk/gtkcellrenderertext.h>
-#include "eggaccelerators.h"
-
-G_BEGIN_DECLS
-
-#define EGG_TYPE_CELL_RENDERER_KEYS (egg_cell_renderer_keys_get_type ())
-#define EGG_CELL_RENDERER_KEYS(obj) (GTK_CHECK_CAST ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeys))
-#define EGG_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass))
-#define EGG_IS_CELL_RENDERER_KEYS(obj) (GTK_CHECK_TYPE ((obj), EGG_TYPE_CELL_RENDERER_KEYS))
-#define EGG_IS_CELL_RENDERER_KEYS_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), EGG_TYPE_CELL_RENDERER_KEYS))
-#define EGG_CELL_RENDERER_KEYS_GET_CLASS(obj) (GTK_CHECK_GET_CLASS ((obj), EGG_TYPE_CELL_RENDERER_KEYS, EggCellRendererKeysClass))
-
-typedef struct _EggCellRendererKeys EggCellRendererKeys;
-typedef struct _EggCellRendererKeysClass EggCellRendererKeysClass;
-
-
-typedef enum
-{
- EGG_CELL_RENDERER_KEYS_MODE_GTK,
- EGG_CELL_RENDERER_KEYS_MODE_X
-} EggCellRendererKeysMode;
-
-struct _EggCellRendererKeys
-{
- GtkCellRendererText parent;
- guint accel_key;
- guint keycode;
- EggVirtualModifierType accel_mask;
- GtkWidget *edit_widget;
- GtkWidget *grab_widget;
- guint edit_key;
- GtkWidget *sizing_label;
- EggCellRendererKeysMode accel_mode;
-};
-
-struct _EggCellRendererKeysClass
-{
- GtkCellRendererTextClass parent_class;
-
- void (* accel_edited) (EggCellRendererKeys *keys,
- const char *path_string,
- guint keyval,
- EggVirtualModifierType mask,
- guint hardware_keycode);
-
- void (* accel_cleared) (EggCellRendererKeys *keys,
- const char *path_string);
-};
-
-GType egg_cell_renderer_keys_get_type (void);
-GtkCellRenderer *egg_cell_renderer_keys_new (void);
-
-void egg_cell_renderer_keys_set_accelerator (EggCellRendererKeys *keys,
- guint keyval,
- guint keycode,
- EggVirtualModifierType mask);
-void egg_cell_renderer_keys_get_accelerator (EggCellRendererKeys *keys,
- guint *keyval,
- EggVirtualModifierType *mask);
-void egg_cell_renderer_keys_set_accel_mode (EggCellRendererKeys *keys,
- EggCellRendererKeysMode accel_mode);
-
-
-G_END_DECLS
-
-
-#endif /* __GTK_CELL_RENDERER_KEYS_H__ */
diff --git a/capplets/keybindings/gnome-keybinding-properties.c b/capplets/keybindings/gnome-keybinding-properties.c
deleted file mode 100644
index 72d81f5e5..000000000
--- a/capplets/keybindings/gnome-keybinding-properties.c
+++ /dev/null
@@ -1,934 +0,0 @@
-/* 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 <gdk/gdkx.h>
-#include <glade/glade.h>
-#include <X11/Xatom.h>
-
-#include "gnome-theme-info.h"
-#include "wm-common.h"
-#include "capplet-util.h"
-#include "eggcellrendererkeys.h"
-#include "activate-settings-daemon.h"
-
-#define LABEL_DATA "gnome-keybinding-properties-label"
-#define MAX_ELEMENTS_BEFORE_SCROLLING 10
-
-#if defined(__powerpc__) && defined (__linux__)
-#define USE_FBLEVEL
-#else
-#undef USE_FBLEVEL
-#endif
-
-typedef enum {
- ALWAYS_VISIBLE,
- N_WORKSPACES_GT
-} KeyListEntryVisibility;
-
-typedef struct
-{
- const char *name;
- KeyListEntryVisibility visibility;
- gint data;
-} KeyListEntry;
-
-const KeyListEntry desktop_key_list[] =
-{
- { "/apps/gnome_settings_daemon/keybindings/help", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/power", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/sleep", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/screensaver", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/home", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/search", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/email", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/www", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/panel_run_dialog", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/panel_main_menu", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/run_command_screenshot", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/run_command_window_screenshot", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/run_command_terminal", ALWAYS_VISIBLE, 0 },
-#ifdef USE_FBLEVEL
- { "/apps/gnome_settings_daemon/keybindings/brightness_down", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/brightness_up", ALWAYS_VISIBLE, 0 },
-#endif
- { NULL }
-};
-const KeyListEntry sounds_key_list[] =
-{
- { "/apps/gnome_settings_daemon/keybindings/volume_mute", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/volume_down", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/volume_up", ALWAYS_VISIBLE, 0 },
- /* Other ones that need keysyms bindings */
- { "/apps/gnome_settings_daemon/keybindings/play", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/pause", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/stop", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/previous", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/next", ALWAYS_VISIBLE, 0 },
- { "/apps/gnome_settings_daemon/keybindings/eject", ALWAYS_VISIBLE, 0 },
- { NULL }
-};
-
-const KeyListEntry metacity_key_list[] =
-{
- { "/apps/metacity/window_keybindings/activate_window_menu", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/toggle_fullscreen", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/toggle_maximized", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/maximize", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/unmaximize", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/toggle_shaded", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/close", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/minimize", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/begin_move", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/begin_resize", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/toggle_on_all_workspaces", N_WORKSPACES_GT, 1 },
- /* These next three are out of order compared to the schemas file. */
- { "/apps/metacity/window_keybindings/raise_or_lower", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/raise", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/lower", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/maximize_vertically", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/maximize_horizontally", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/window_keybindings/move_to_workspace_1", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/window_keybindings/move_to_workspace_2", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/window_keybindings/move_to_workspace_3", N_WORKSPACES_GT, 2 },
- { "/apps/metacity/window_keybindings/move_to_workspace_4", N_WORKSPACES_GT, 3 },
- { "/apps/metacity/window_keybindings/move_to_workspace_5", N_WORKSPACES_GT, 4 },
- { "/apps/metacity/window_keybindings/move_to_workspace_6", N_WORKSPACES_GT, 5 },
- { "/apps/metacity/window_keybindings/move_to_workspace_7", N_WORKSPACES_GT, 6 },
- { "/apps/metacity/window_keybindings/move_to_workspace_8", N_WORKSPACES_GT, 7 },
- { "/apps/metacity/window_keybindings/move_to_workspace_9", N_WORKSPACES_GT, 8 },
- { "/apps/metacity/window_keybindings/move_to_workspace_10", N_WORKSPACES_GT, 9 },
- { "/apps/metacity/window_keybindings/move_to_workspace_11", N_WORKSPACES_GT, 10 },
- { "/apps/metacity/window_keybindings/move_to_workspace_12", N_WORKSPACES_GT, 11 },
- { "/apps/metacity/window_keybindings/move_to_workspace_left", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/window_keybindings/move_to_workspace_right", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/window_keybindings/move_to_workspace_up", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/window_keybindings/move_to_workspace_down", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_windows", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/switch_panels", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/cycle_windows", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/cycle_panels", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/show_desktop", ALWAYS_VISIBLE, 0 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_1", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_2", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_3", N_WORKSPACES_GT, 2 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_4", N_WORKSPACES_GT, 3 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_5", N_WORKSPACES_GT, 4 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_6", N_WORKSPACES_GT, 5 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_7", N_WORKSPACES_GT, 6 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_8", N_WORKSPACES_GT, 7 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_9", N_WORKSPACES_GT, 8 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_10", N_WORKSPACES_GT, 9 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_11", N_WORKSPACES_GT, 10 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_12", N_WORKSPACES_GT, 11 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_left", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_right", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_up", N_WORKSPACES_GT, 1 },
- { "/apps/metacity/global_keybindings/switch_to_workspace_down", N_WORKSPACES_GT, 1 },
- { NULL }
-};
-
-enum
-{
- DESCRIPTION_COLUMN,
- KEYENTRY_COLUMN,
- N_COLUMNS
-};
-
-typedef struct
-{
- char *gconf_key;
- guint keyval;
- guint keycode;
- EggVirtualModifierType mask;
- gboolean editable;
- GtkTreeModel *model;
- guint gconf_cnxn;
- char *description;
-} KeyEntry;
-
-static void reload_key_entries (gpointer wm_name,
- GladeXML *dialog);
-static char* binding_name (guint keyval,
- guint keycode,
- EggVirtualModifierType mask,
- gboolean translate);
-
-static GtkTreeModel*
-get_real_model (GtkTreeView *tree_view)
-{
- GtkTreeModel *model;
- GtkTreeModel *submodel;
-
- model = gtk_tree_view_get_model (tree_view);
-
- if (model)
- submodel = gtk_tree_model_sort_get_model (GTK_TREE_MODEL_SORT (model));
- else
- submodel = NULL;
-
- return submodel;
-}
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keybinding-properties.glade", "gnome-keybinding-dialog", NULL);
-
- return dialog;
-}
-
-static char*
-binding_name (guint keyval,
- guint keycode,
- EggVirtualModifierType mask,
- gboolean translate)
-{
- if (keyval != 0 || keycode != 0)
- return egg_virtual_accelerator_name (keyval, keycode, mask);
- else
- return translate ? g_strdup (_("Disabled")) : g_strdup ("disabled");
-}
-
-static gboolean
-binding_from_string (const char *str,
- guint *accelerator_key,
- guint *keycode,
- EggVirtualModifierType *accelerator_mods)
-{
- g_return_val_if_fail (accelerator_key != NULL, FALSE);
-
- if (str == NULL || (str && strcmp (str, "disabled") == 0))
- {
- *accelerator_key = 0;
- *keycode = 0;
- *accelerator_mods = 0;
- return TRUE;
- }
-
- egg_accelerator_parse_virtual (str, accelerator_key, keycode, accelerator_mods);
-
- if (*accelerator_key == 0)
- return FALSE;
- else
- return TRUE;
-}
-
-static void
-accel_set_func (GtkTreeViewColumn *tree_column,
- GtkCellRenderer *cell,
- GtkTreeModel *model,
- GtkTreeIter *iter,
- gpointer data)
-{
- KeyEntry *key_entry;
-
- gtk_tree_model_get (model, iter,
- KEYENTRY_COLUMN, &key_entry,
- -1);
-
- if (key_entry == NULL)
- g_object_set (G_OBJECT (cell),
- "visible", FALSE,
- NULL);
- else if (! key_entry->editable)
- g_object_set (G_OBJECT (cell),
- "visible", TRUE,
- "editable", FALSE,
- "accel_key", key_entry->keyval,
- "accel_mask", key_entry->mask,
- "keycode", key_entry->keycode,
- "style", PANGO_STYLE_ITALIC,
- NULL);
- else
- g_object_set (G_OBJECT (cell),
- "visible", TRUE,
- "editable", TRUE,
- "accel_key", key_entry->keyval,
- "accel_mask", key_entry->mask,
- "keycode", key_entry->keycode,
- "style", PANGO_STYLE_NORMAL,
- NULL);
-}
-
-static gboolean
-keybinding_key_changed_foreach (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- gpointer user_data)
-{
- KeyEntry *key_entry;
- KeyEntry *tmp_key_entry;
-
- key_entry = (KeyEntry *)user_data;
- gtk_tree_model_get (key_entry->model, iter,
- KEYENTRY_COLUMN, &tmp_key_entry,
- -1);
-
- if (key_entry == tmp_key_entry)
- {
- gtk_tree_model_row_changed (key_entry->model, path, iter);
- return TRUE;
- }
- return FALSE;
-}
-
-static void
-keybinding_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- KeyEntry *key_entry;
- const gchar *key_value;
-
- key_entry = (KeyEntry *)user_data;
- key_value = gconf_value_get_string (entry->value);
-
- binding_from_string (key_value, &key_entry->keyval, &key_entry->keycode, &key_entry->mask);
- key_entry->editable = gconf_entry_get_is_writable (entry);
-
- /* update the model */
- gtk_tree_model_foreach (key_entry->model, keybinding_key_changed_foreach, key_entry);
-}
-
-static int
-keyentry_sort_func (GtkTreeModel *model,
- GtkTreeIter *a,
- GtkTreeIter *b,
- gpointer user_data)
-{
- KeyEntry *key_entry_a;
- KeyEntry *key_entry_b;
- char *name_a;
- char *name_b;
- int retval;
-
- /* mmmmm, super-slow. */
-
- key_entry_a = NULL;
- gtk_tree_model_get (model, a,
- KEYENTRY_COLUMN, &key_entry_a,
- -1);
-
- key_entry_b = NULL;
- gtk_tree_model_get (model, b,
- KEYENTRY_COLUMN, &key_entry_b,
- -1);
-
-
- if (key_entry_a != NULL)
- name_a = binding_name (key_entry_a->keyval,
- key_entry_a->keycode,
- key_entry_a->mask,
- TRUE);
- else
- name_a = NULL;
-
- if (key_entry_b != NULL)
- name_b = binding_name (key_entry_b->keyval,
- key_entry_b->keycode,
- key_entry_b->mask,
- TRUE);
- else
- name_b = NULL;
-
- if (name_a && name_b)
- retval = g_utf8_collate (name_a, name_b);
- else if (name_a)
- retval = 1;
- else if (name_b)
- retval = -1;
- else
- retval = 0;
-
- g_free (name_a);
- g_free (name_b);
-
- return retval;
-}
-
-static void
-clear_old_model (GladeXML *dialog,
- GtkWidget *tree_view)
-{
- GtkTreeModel *model;
- GtkTreeModel *sort_model;
- GtkTreeIter iter;
- KeyEntry *key_entry;
- gboolean valid;
- GConfClient *client;
-
- client = gconf_client_get_default ();
- model = get_real_model (GTK_TREE_VIEW (tree_view));
-
- if (model != NULL)
- {
- 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);
- if (key_entry != NULL)
- {
- gconf_client_notify_remove (client, key_entry->gconf_cnxn);
- g_free (key_entry->gconf_key);
- g_free (key_entry->description);
- g_free (key_entry);
- }
- }
- g_object_unref (model);
- }
-
- g_object_unref (client);
-
- model = (GtkTreeModel *) gtk_tree_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_POINTER);
-
- sort_model = gtk_tree_model_sort_new_with_model (model);
-
- /* N_COLUMNS is just a place to stick the extra sort function */
- gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (sort_model),
- N_COLUMNS,
- keyentry_sort_func,
- NULL, NULL);
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), sort_model);
-
- g_object_unref (G_OBJECT (model));
- g_object_unref (G_OBJECT (sort_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 gboolean
-count_rows_foreach (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data)
-{
- gint *rows = data;
-
- (*rows)++;
-
- return FALSE;
-}
-
-static gboolean
-should_show_key (const KeyListEntry *entry)
-{
- gint workspaces;
- GConfClient *client;
-
- switch (entry->visibility) {
- case ALWAYS_VISIBLE:
- return TRUE;
- case N_WORKSPACES_GT:
- client = gconf_client_get_default();
- workspaces = gconf_client_get_int (client,
- "/apps/metacity/general/num_workspaces", NULL);
- g_object_unref (client);
-
- if (workspaces > entry->data)
- return TRUE;
- else
- return FALSE;
- break;
- }
-
- return FALSE;
-}
-
-static void
-append_keys_to_tree (GladeXML *dialog,
- const gchar *title,
- const KeyListEntry *keys_list)
-{
- GConfClient *client;
- GtkTreeIter parent_iter;
- GtkTreeModel *model;
- gint i, j;
-
- client = gconf_client_get_default ();
- model = get_real_model (GTK_TREE_VIEW (WID ("shortcut_treeview")));
-
- i = 0;
- gtk_tree_model_foreach (model, count_rows_foreach, &i);
-
- gtk_tree_store_append (GTK_TREE_STORE (model), &parent_iter, NULL);
- gtk_tree_store_set (GTK_TREE_STORE (model), &parent_iter,
- DESCRIPTION_COLUMN, title,
- -1);
-
- for (j = 0; keys_list[j].name != NULL; j++)
- {
- GConfEntry *entry;
- GConfSchema *schema = NULL;
- KeyEntry *key_entry;
- GError *error = NULL;
- GtkTreeIter iter;
- const gchar *key_string;
- gchar *key_value;
-
- if (!should_show_key (&keys_list[j]))
- continue;
-
- key_string = keys_list[j].name;
-
- entry = gconf_client_get_entry (client,
- key_string,
- NULL,
- TRUE,
- &error);
- if (error || entry == NULL)
- {
- /* We don't actually want to popup a dialog - just skip this one */
- if (error)
- g_error_free (error);
- continue;
- }
-
- if (gconf_entry_get_schema_name (entry))
- schema = gconf_client_get_schema (client, gconf_entry_get_schema_name (entry), &error);
-
- if (error || schema == NULL)
- {
- /* We don't actually want to popup a dialog - just skip this one */
- if (error)
- g_error_free (error);
- continue;
- }
-
- key_value = gconf_client_get_string (client, key_string, &error);
-
- key_entry = g_new0 (KeyEntry, 1);
- key_entry->gconf_key = g_strdup (key_string);
- 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,
- key_string,
- (GConfClientNotifyFunc) &keybinding_key_changed,
- key_entry, NULL, NULL);
- binding_from_string (key_value, &key_entry->keyval, &key_entry->keycode, &key_entry->mask);
- g_free (key_value);
- key_entry->description = g_strdup (gconf_schema_get_short_desc (schema));
-
- if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
- {
- GtkRequisition rectangle;
- gtk_widget_ensure_style (WID ("shortcut_treeview"));
- gtk_widget_size_request (WID ("shortcut_treeview"), &rectangle);
- gtk_widget_set_size_request (WID ("shortcut_treeview"), -1, rectangle.height);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (WID ("actions_swindow")),
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- }
- i++;
- gtk_tree_store_append (GTK_TREE_STORE (model), &iter, &parent_iter);
- if (gconf_schema_get_short_desc (schema))
- gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
- DESCRIPTION_COLUMN,
- key_entry->description,
- KEYENTRY_COLUMN, key_entry,
- -1);
- else
- gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
- DESCRIPTION_COLUMN, _("<Unknown Action>"),
- KEYENTRY_COLUMN, key_entry,
- -1);
- gtk_tree_view_expand_all (GTK_TREE_VIEW (WID ("shortcut_treeview")));
- gconf_entry_free (entry);
- gconf_schema_free (schema);
- }
-
- g_object_unref (client);
-
- if (i == 0)
- gtk_widget_hide (WID ("shortcuts_vbox"));
- else
- gtk_widget_show (WID ("shortcuts_vbox"));
-}
-
-static void
-reload_key_entries (gpointer wm_name, GladeXML *dialog)
-{
- clear_old_model (dialog, WID ("shortcut_treeview"));
-
- append_keys_to_tree (dialog, _("Desktop"), desktop_key_list);
- append_keys_to_tree (dialog, _("Sound"), sounds_key_list);
-
- if (strcmp((char *) wm_name, WM_COMMON_METACITY) == 0)
- {
- append_keys_to_tree (dialog, _("Window Management"), metacity_key_list);
- }
-}
-
-static void
-key_entry_controlling_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- reload_key_entries (wm_common_get_current_window_manager(), user_data);
-}
-
-static gboolean
-cb_check_for_uniqueness (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- KeyEntry *new_key)
-{
- KeyEntry *element;
-
- gtk_tree_model_get (new_key->model, iter,
- KEYENTRY_COLUMN, &element,
- -1);
-
- /* no conflict for : blanks, different modifiers, or ourselves */
- if (element == NULL || new_key->mask != element->mask ||
- !strcmp (new_key->gconf_key, element->gconf_key))
- return FALSE;
-
- if (new_key->keyval != 0) {
- if (new_key->keyval != element->keyval)
- return FALSE;
- } else if (element->keyval != 0 || new_key->keycode != element->keycode)
- return FALSE;
-
- new_key->editable = FALSE;
- new_key->gconf_key = element->gconf_key;
- new_key->description = element->description;
- return TRUE;
-}
-
-static void
-accel_edited_callback (GtkCellRendererText *cell,
- const char *path_string,
- guint keyval,
- EggVirtualModifierType mask,
- guint keycode,
- gpointer data)
-{
- GConfClient *client;
- GtkTreeView *view = (GtkTreeView *)data;
- GtkTreeModel *model;
- GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
- GtkTreeIter iter;
- KeyEntry *key_entry, tmp_key;
- GError *err = NULL;
- char *str;
-
- model = gtk_tree_view_get_model (view);
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_path_free (path);
- gtk_tree_model_get (model, &iter,
- KEYENTRY_COLUMN, &key_entry,
- -1);
-
- /* sanity check */
- if (key_entry == NULL)
- return;
-
- model = get_real_model (view);
- tmp_key.model = model;
- tmp_key.keyval = keyval;
- tmp_key.keycode = keycode;
- tmp_key.mask = mask;
- tmp_key.gconf_key = key_entry->gconf_key;
- tmp_key.description = NULL;
- tmp_key.editable = TRUE; /* kludge to stuff in a return flag */
-
- if (keyval != 0 || keycode != 0) /* any number of keys can be disabled */
- gtk_tree_model_foreach (model,
- (GtkTreeModelForeachFunc) cb_check_for_uniqueness,
- &tmp_key);
-
- /* flag to see if the new accelerator was in use by something */
- if (!tmp_key.editable)
- {
- GtkWidget *dialog;
- char *name;
-
- name = egg_virtual_accelerator_name (keyval, keycode, mask);
-
- dialog =
- gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_CANCEL,
- _("The shortcut \"%s\" is already used for:\n \"%s\"\n"),
- name,
- tmp_key.description ?
- tmp_key.description : tmp_key.gconf_key);
- g_free (name);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- /* set it back to its previous value. */
- egg_cell_renderer_keys_set_accelerator (EGG_CELL_RENDERER_KEYS (cell),
- key_entry->keyval, key_entry->keycode, key_entry->mask);
- return;
- }
-
- str = binding_name (keyval, keycode, mask, FALSE);
-
- client = gconf_client_get_default();
- gconf_client_set_string (client,
- key_entry->gconf_key,
- str,
- &err);
- g_free (str);
- g_object_unref (G_OBJECT (client));
-
- if (err != NULL)
- {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("Error setting new accelerator in configuration database: %s\n"),
- err->message);
- gtk_dialog_run (GTK_DIALOG (dialog));
-
- gtk_widget_destroy (dialog);
- g_error_free (err);
- key_entry->editable = FALSE;
- }
-}
-
-static void
-accel_cleared_callback (GtkCellRendererText *cell,
- const char *path_string,
- gpointer data)
-{
- GConfClient *client;
- GtkTreeView *view = (GtkTreeView *) data;
- GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
- KeyEntry *key_entry;
- GtkTreeIter iter;
- GError *err = NULL;
- GtkTreeModel *model;
-
- model = gtk_tree_view_get_model (view);
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_path_free (path);
- gtk_tree_model_get (model, &iter,
- KEYENTRY_COLUMN, &key_entry,
- -1);
-
- /* sanity check */
- if (key_entry == NULL)
- return;
-
- /* Unset the key */
- client = gconf_client_get_default();
- gconf_client_set_string (client,
- key_entry->gconf_key,
- "disabled",
- &err);
- g_object_unref (G_OBJECT (client));
-
- if (err != NULL)
- {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
- GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_MODAL,
- GTK_MESSAGE_WARNING,
- GTK_BUTTONS_OK,
- _("Error unsetting accelerator in configuration database: %s\n"),
- err->message);
- gtk_dialog_run (GTK_DIALOG (dialog));
-
- gtk_widget_destroy (dialog);
- g_error_free (err);
- key_entry->editable = FALSE;
- }
-}
-
-
-typedef struct
-{
- GtkTreeView *tree_view;
- GtkTreePath *path;
-} IdleData;
-
-static gboolean
-real_start_editing_cb (IdleData *idle_data)
-{
- gtk_widget_grab_focus (GTK_WIDGET (idle_data->tree_view));
- gtk_tree_view_set_cursor (idle_data->tree_view,
- idle_data->path,
- gtk_tree_view_get_column (idle_data->tree_view, 1),
- TRUE);
-
- gtk_tree_path_free (idle_data->path);
- g_free (idle_data);
- return FALSE;
-}
-
-static gboolean
-start_editing_kb_cb (GtkTreeView *treeview,
- GtkTreePath *path,
- GtkTreeViewColumn *column,
- gpointer user_data)
-{
- gtk_widget_grab_focus (GTK_WIDGET (treeview));
- gtk_tree_view_set_cursor (treeview,
- path,
- gtk_tree_view_get_column (treeview, 1),
- TRUE);
-
- return FALSE;
-}
-
-static gboolean
-start_editing_cb (GtkTreeView *tree_view,
- GdkEventButton *event,
- GladeXML *dialog)
-{
- GtkTreePath *path;
-
- if (event->window != gtk_tree_view_get_bin_window (tree_view))
- return FALSE;
-
- if (gtk_tree_view_get_path_at_pos (tree_view,
- (gint) event->x,
- (gint) event->y,
- &path, NULL,
- NULL, NULL))
- {
- IdleData *idle_data;
-
- if (gtk_tree_path_get_depth (path) == 1)
- {
- gtk_tree_path_free (path);
- return FALSE;
- }
-
- idle_data = g_new (IdleData, 1);
- idle_data->tree_view = tree_view;
- idle_data->path = path;
- g_signal_stop_emission_by_name (G_OBJECT (tree_view), "button_press_event");
- g_idle_add ((GSourceFunc) real_start_editing_cb, idle_data);
- }
- return TRUE;
-}
-
-static void
-cb_dialog_response (GtkWidget *widget, gint response_id, gpointer data)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (widget),
- "user-guide.xml",
- "goscustdesk-39");
- else
- gtk_main_quit ();
-}
-
-static void
-setup_dialog (GladeXML *dialog)
-{
- GConfClient *client;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
- GtkWidget *widget;
-
- client = gconf_client_get_default ();
-
- g_signal_connect (GTK_TREE_VIEW (WID ("shortcut_treeview")),
- "button_press_event",
- G_CALLBACK (start_editing_cb), dialog),
- g_signal_connect (GTK_TREE_VIEW (WID ("shortcut_treeview")),
- "row-activated",
- G_CALLBACK (start_editing_kb_cb), dialog),
-
- column = gtk_tree_view_column_new_with_attributes (_("Action"),
- gtk_cell_renderer_text_new (),
- "text", DESCRIPTION_COLUMN,
- NULL);
- gtk_tree_view_column_set_resizable (column, FALSE);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("shortcut_treeview")), column);
- gtk_tree_view_column_set_sort_column_id (column, DESCRIPTION_COLUMN);
-
- renderer = (GtkCellRenderer *) g_object_new (EGG_TYPE_CELL_RENDERER_KEYS,
- "editable", TRUE,
- "accel_mode", EGG_CELL_RENDERER_KEYS_MODE_X,
- NULL);
-
- g_signal_connect (G_OBJECT (renderer),
- "accel_edited",
- G_CALLBACK (accel_edited_callback),
- WID ("shortcut_treeview"));
-
- g_signal_connect (G_OBJECT (renderer),
- "accel_cleared",
- G_CALLBACK (accel_cleared_callback),
- WID ("shortcut_treeview"));
-
- column = gtk_tree_view_column_new_with_attributes (_("Shortcut"), renderer, NULL);
- gtk_tree_view_column_set_cell_data_func (column, renderer, accel_set_func, NULL, NULL);
- gtk_tree_view_column_set_resizable (column, FALSE);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (WID ("shortcut_treeview")), column);
- /* N_COLUMNS is just a place to stick the extra sort function */
- gtk_tree_view_column_set_sort_column_id (column, N_COLUMNS);
-
- gconf_client_add_dir (client, "/apps/gnome_keybinding_properties", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_notify_add (client,
- "/apps/metacity/general/num_workspaces",
- (GConfClientNotifyFunc) &key_entry_controlling_key_changed,
- dialog, NULL, NULL);
- g_object_unref (client);
-
- /* set up the dialog */
- reload_key_entries (wm_common_get_current_window_manager(), dialog);
-
- widget = WID ("gnome-keybinding-dialog");
- capplet_set_icon (widget, "gnome-settings-keybindings");
- gtk_widget_show (widget);
-
- g_signal_connect (G_OBJECT (widget), "response", G_CALLBACK(cb_dialog_response), 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 ("gnome-keybinding-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- gnome_theme_init (NULL);
-
- activate_settings_daemon ();
-
- dialog = create_dialog ();
- wm_common_register_window_manager_change ((GFunc)(reload_key_entries), dialog);
- setup_dialog (dialog);
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/keybindings/gnome-keybinding-properties.glade b/capplets/keybindings/gnome-keybinding-properties.glade
deleted file mode 100644
index 7842d28e6..000000000
--- a/capplets/keybindings/gnome-keybinding-properties.glade
+++ /dev/null
@@ -1,168 +0,0 @@
-<?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="gnome-keybinding-dialog">
- <property name="border_width">5</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>
- <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="shortcut_dialog">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="vbox3">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="shortcuts_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="actions_swindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="shortcut_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</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>
- <widget class="GtkHBox" id="hbox1">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</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</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>
-
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">To edit a shortcut key, click on the corresponding row and type a new accelerator, or press backspace to clear.</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_FILL</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/keybindings/keybinding.desktop.in.in b/capplets/keybindings/keybinding.desktop.in.in
deleted file mode 100644
index f0f086c0f..000000000
--- a/capplets/keybindings/keybinding.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Keyboard Shortcuts
-_Comment=Assign shortcut keys to commands
-Exec=gnome-keybinding-properties
-Icon=gnome-settings-keybindings
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=Keybinding
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/keyboard/.cvsignore b/capplets/keyboard/.cvsignore
deleted file mode 100644
index 3b1c456c8..000000000
--- a/capplets/keyboard/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-gnome-keyboard-properties
-keyboard.desktop
-keyboard.desktop.in
-gnome-keyboard-properties.gladep
diff --git a/capplets/keyboard/ChangeLog b/capplets/keyboard/ChangeLog
deleted file mode 100644
index 1044e79aa..000000000
--- a/capplets/keyboard/ChangeLog
+++ /dev/null
@@ -1,659 +0,0 @@
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keyboard-properties-xkbot.c: (xkb_options_add_group):
- fix the build with gcc-2.95, patch from Jens Granseuer <jensgr@gmx.net>
- (Closes: #170159).
-
-2005-04-10 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkbpv.c: improving the preview layout
-
-2005-02-08 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keyboard-properties-xkb.c: (setup_xkb_tabs):
- * gnome-keyboard-properties-xkblt.c: (def_group_in_gconf_changed):
- patch by Kjartan Maraas <kmaraas@gnome.org>, some code cleanups
- (Closes: #166267).
-
-2005-01-19 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.c,
- gnome-keyboard-properties-xkbot.c
- gnome-keyboard-properties.glade: big change in the layout options UI.
- Fixing #164090
-
-2005-01-16 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties.glade: fixed #159685
-
-2005-01-15 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkbmc.c: fixing long-outstanding bug
- with the current model selection.
-
-2005-01-08 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keyboard-properties.glade: fixed the mnemonics for some widgets
- (Closes: #163227).
-
-2005-01-05 Dennis Cranston <dennis_cranston@yahoo.com>
-
- * gnome-keyboard-properties.glade: HIG corrections.
- Use HIG capitalization for buttons: "Reset to defaults" ->
- "Reset To Defaults". Use HIG capitalization for window titles:
- "Choose a keyboard model" -> "Choose A Keyboard Model" &
- "Choose a layout" -> "Choose A Layout". Add a missing ":"
- from "Model" -> "Model:". Remove the dialog separators.
- Use HIG widget padding to match the other capplet dialogs.
-
-2005-01-02 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.c
- gnome-keyboard-properties-xkb.h
- gnome-keyboard-properties-xkblt.c
- gnome-keyboard-properties-xkbmc.c
- gnome-keyboard-properties-xkbpv.c: a bit of the code cleanup
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keyboard-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-12-31 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.h,
- gnome-keyboard-properties-xkblt.c
- gnome-keyboard-properties-xkbpv.c: preview reimplemented! Hurray!
-
-2004-12-23 Sergey V. Udaltsov <svu@gnome.org>
-
- * use_cases.txt: just some memo (mostly for myself) regarding the
- use cases for the tests.
-
-2004-12-20 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.c,
- gnome-keyboard-properties-xkb.h,
- gnome-keyboard-properties-xkblt.c,
- gnome-keyboard-properties-xkbmc.c,
- gnome-keyboard-properties-xkbot.c,
- gnome-keyboard-properties.c,
- gnome-keyboard-properties.glade: massive layout change. Layout chooser
- popup introduced
-
-2004-12-13 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.c,
- gnome-keyboard-properties-xkb.h,
- gnome-keyboard-properties-xkblt.c,
- gnome-keyboard-properties-xkbmc.c,
- gnome-keyboard-properties-xkbot.c: reflect massive changes in
- libgswitchit
-
-2004-12-09 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkblt.c: using of the XklGetMaxNumGroups
-
-2004-11-29 Sergey V. Udaltsov <svu@gnome.org>
-
- * gnome-keyboard-properties-xkb.c: preview only makes sense for XKB backend
-
-2004-11-25 Sergey V. Udaltsov <svu@gnome.org>
-
- * libxklavier 1.12 compatibility
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * keyboard.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-21 Sebastien Bacher <seb128@debian.org>
-
- * gnome-keyboard-properties.glade:
- patch by Ross Burton <ross@burtonini.com> to fix the widget expansion
- (Closes: #151588).
-
-2004-10-15 Sergey V. Udaltsov <svu@gnome.org>
-
- * The preview is now dialog instead of window. More consistent
- behaviour. Fixing #154358
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-09-01 Sergey V. Udaltsov <svu@gnome.org>
-
- * The default switchcut (Alt*2) is introduced
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-keyboard-properties.c: (main):
- Use themed icon for WM hint.
-
-2004-07-28 Richard Hult <richard@imendio.com>
-
- * gnome-keyboard-properties.c (main): Switch to the right page for
- typing monitor preferences.
-
-2004-07-27 Sergey V. Udaltsov <svu@gnome.org>
-
- * The preview is separated to another window.
- Looks nicer IMHO - but it depends on POV.
-
-2004-07-26 Sergey V. Udaltsov <svu@gnome.org>
-
- * Now models are handled using the popup window.
- Looks a bit more polished.
-
-2004-07-22 Christian Neumair <chris@gnome-de.org>
-
- * gnome-keyboard-properties.glade: Use GTK_SHADOW_IN shadow for
- all treeviews (consistency). Fixes #144050.
-
-2004-07-14 Sergey V. Udaltsov <svu@gnome.org>
-
- * Merged the preview tab branch.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-keyboard-properties.c: (dialog_response): Update help link
- to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2004-01-11 Richard Hult <richard@imendio.com>
-
- * gnome-keyboard-properties.glade:
- * gnome-keyboard-properties.c (setup_dialog): Enable markup for
- the break enabled toggle with code instead of with a custom child
- for the toggle since that doesn't work with new libglade. Fixes
- bug #131122.
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-Mon Aug 11 11:50:36 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.glade: Patch from Elijah Newren
- <newren@math.utah.edu> to bring the possible repeat range in sync
- with the a11y capplet.
-
- * gnome-keyboard-properties.c: Patch from Elijah Newren to deal
- with the change in the peditor code.
-
-Fri Aug 1 15:04:39 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.glade: Patch from Dennis Cranston
- <dennis_cranston@yahoo.com> to add two more pixels of spacing
- between action area and vbox of prefrences dialog.
-
-Thu Jul 31 17:42:13 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.c (main): Add typing-break properties,
- #118323
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-keyboard-properties.glade,
- gnome-keyboard-properties.c: Fixes for ui-review
- bug report #99531 and fixes for duplicate mnemonics.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-27 Richard Hult <richard@imendio.com>
-
- * gnome-keyboard-properties.c (setup_dialog): Use the right gconf
- key for allow_postpone preference.
-
- * gnome-keyboard-properties.glade: Remove warn time preference,
- it's not used in the code.
-
-Thu Jun 26 16:31:41 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.c (setup_dialog): use the correct
- schemas.
-
-Thu Jun 26 07:39:34 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keyboard-properties.c: added the typing break (drwright)
- preferences
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-30 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.glade : make the repeat bounds more
- reasonable.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-14 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (accessibility_button_clicked) : fix
- minor typo that disables the error dialog in the event of failure.
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-12-10 Rajkumar Sivasamy <rajkumar.siva@wipro.com>
-
- * gnome-keyboard-properties.glade: Set the visibility and focus
- of Custom radio button in Sound note book page to false.
- Fixes bug 99793
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * keyboard.desktop.in: Fix the desktop file so that it validates.
-
-2002-08-15 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.glade : fix label and make consistent with
- mouse capplet.
- * gnome-keyboard-properties.c (create_dialog) : use size groups.
-
-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.
-
-2002-07-16 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (setup_dialog) : use the gconf_value_int_to_float
- convenience routines directly and convert the repeat speed and delay
- to use sliders.
-
- * gnome-keyboard-properties.c (accessibility_button_clicked) : produce
- a better warning for failure to launch the keyboard accessibility
- capplet.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-06-10 jacob berkman <jacob@ximian.com>
-
- * gnome-keyboard-properties.glade: hide the keyclick slider.
-
- fixes #78015
-
- reviewed/approved by jrb, luis, jody
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-keyboard-properties.c : Changed the help file link
- to get the help document from user-guide.
-
-
-Sun May 26 11:30:25 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keyboard-properties.c (main): use APPID instead of argv[0]
-
-2002-05-16 jacob berkman <jacob@ximian.com>
-
- * gnome-keyboard-properties.c (get_legacy_settings): don't copy
- the volume, this setting is gone
- (main): dont' show_all() the dialog
-
- * gnome-keyboard-properties.glade: hide the "other" option button
-
- fixes for #78016
-
-2002-05-16 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.glade : some minor tweakage.
-
-Mon May 13 17:32:25 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.c (delay_to_widget): hook up widget
- correctly.
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (dialog_response) : support help.
- * gnome-keyboard-properties.glade : add help.
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.glade : long forgotten atk patch from Dave.
- Sorry.
-
-2002-04-22 Rachel Hestilow <hestilow@ximian.com>
-
- * gnome-keyboard-properties.glade: Restore missing OptionMenu
- labels.
-
-Thu Apr 18 13:59:12 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-keyboard-properties.glade: cleanups.
-
- * gnome-keyboard-properties.c: remove accessibility pane and add a
- button.
-
-Wed Apr 10 18:06:25 2002 Jonathan Blandford <jrb@gnome.org>
-
- * keyboard.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-29 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.glade : click_volume range is 0..100
-
-2002-03-26 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-keyboard-properties.c (bell_to_widget): Be nice on
- invalid and NULL Gconf values
-
-2002-03-25 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (volume_to_widget) : new.
- (volume_from_widget) : new.
- (setup_dialog) : use them here.
-
-2002-03-25 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (setup_accessibility) : Use
- gtk_label_new_with_mnemonic and add an accel to the label.
-
-2002-03-19 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (_to_widget) : fix signature.
- (*_from_widget) : fix signature.
-
-2002-03-13 Jody Goldberg <jody@gnome.org>
-
- * gnome-keyboard-properties.c (setup_accessibility) : new.
- (main) : install the accessibility page.
-
-2002-03-19 Richard Hestilow <hestilow@ximian.com>
-
- * gnome-keyboard-properties.c (bell_enums): Swap around. This
- was initially reversed because of a bug in gconf-peditor.
- Ideally this code should use the new enum functions, but
- the existing stuff works so I so no immediate need to rewrite
- it.
- (*_to/from_widget): Convert to new signature.
-
-2002-03-19 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-keyboard-properties.c (bell_to_widget): Check that
- value actually is string - that fixes crash with broken schemas
-
-2002-03-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-keyboard-properties.c: (main):
-
- Activate the settings daemon if its not already running.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-keyboard-properties.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-10 Richard Hestilow <hestilow@ximian.com>
-
- * Make dialog Apply/Close.
-
-Fri Feb 8 23:53:10 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-keyboard-properties.c (dialog_response): hook up buttons.
-
-2002-01-19 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
-
- Install icon into the standard pixmaps directory
- so that Panel & Nautilus will pick up on it.
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (bin_PROGRAMS): Rename binary
- gnome2-keyboard-properties
-
-Tue Jan 8 15:49:15 2002 Jonathan Blandford <jrb@redhat.com>
-
- * .cvsignore: update
- * Makefile.am: Add gnome-keyboard-properties.c
- * gnome-keyboard-properties.c: New, much nicer capplet.
- * gnome-keyboard-properties.glade: glade file for above.
- * keyboard-bell.png:
- * keyboard-cursor.png:
- * keyboard-repeat.png:
- * keyboard-volume.png: Images for above. Note,
- keyboard-cursor.png is my pathetic attempt at artwork, and will
- prolly change in the future.
-
-2001-12-20 Seth Nickell <snickell@stanford.edu>
-
- * keyboard.desktop.in:
-
- Add Categories field so it shows up correctly in the
- panel menus.
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * keyboard-properties.c (dialog_button_clicked_cb): Update
- (main): Use a GtkDialog rather than a GnomeDialog; don't place a
- weak ref on gtk_main_quit
-
- * Makefile.am: Update
-
- * keyboard.desktop.in.in (Exec): Update
-
-2001-12-19 Bradford Hovinen <hovinen@ximian.com>
-
- * keyboard-properties.c (apply_settings): Comment out; pending
- removal to gnome-settings-daemon
- (setup_dialog): Set conversion functions
- (rate_to_widget, rate_from_widget, delay_to_widget)
- (delay_from_widget): Implement
-
-2001-12-18 Bradford Hovinen <hovinen@ximian.com>
-
- * keyboard-properties.c: Port to GConf/GNOME 2.0. Many changes.
- (setup_dialog): Use correct widget name
- (create_dialog): Use gtk_image_ functions for the volume icon
- (get_int_from_changeset): Use return value of
- gconf_change_set_check_value to determine if the key is in the set
- (get_legacy_settings): Enable
-
-2001-10-12 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Make OAF file creation generic
-
-2001-09-28 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove support for disabling bonobo-conf build
-
- * Makefile.am: Change the binary name to
- keyboard-properties-control and create a wrapper script from
- ../common/wrapper-script.in to be named keyboard-properties
-
-2001-08-09 Bradford Hovinen <hovinen@ximian.com>
-
- * keyboard-properties.xml: Fixed default delay setting
-
-2001-07-31 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): add DISTDIR to install-data-local
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-26 Joakim Ziegler <joakim@ximian.com>
-
- * keyboard-properties.glade: Changed the label of the delay slider to be
- more intuitive.
-
-2001-07-26 Bradford Hovinen <hovinen@ximian.com>
-
- * keyboard-properties.c (apply_settings): Initialize the other
- fields of this data structure
- (apply_settings): Use lookup table to get the values to put in
- kbdsettings
- (apply_settings): Tweak the numbers a bit
-
- * Makefile.am (bonobo_sources): Remove bonobo-property-editor-range.[ch]
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am: remove the OAF_FILE_IN_RULE and copy it here
- (bonobo_sources): add bonobo-properties-editor-range.[ch]
-
- * Makefile.am: remove the DESKTOP_IN_RULE and copy the sed here
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * main.c (main): Pass in legacy files to capplet_init.
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove SUBDIRS
- Remove extraneous EXTRA_DIST
- (EXTRA_DIST): Make sure to include defaults and OAF files
-
- * keyboard.desktop.in.in (Exec): Update for bonoboization
-
- * Bonobo_Control_Capplet_keyboard_properties.oaf: Update to
- correct binary name
-
- * main.c (create_dialog): Use GNOMECC_GLADE_DIR rather than
- GLADE_DATADIR
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * main.c (create_dialog): Revert to old prototype.
- (setup_dialog): Moved signal_connect on demo button to here.
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * Rewritten to use bonobo-conf.
-
-2001-07-18 Jakub Steiner <jimmac@ximian.com>
-
- * keyboard-capplet.png: use the 3d version.
-
-2001-07-17 Chema Celorio <chema@celorio.com>
-
- * Makefile.am: nice and clean just as we like it
-
-2001-07-17 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (EXTRA_DIST): Added missing icons_DATA
-
-2001-07-17 Chema Celorio <chema@celorio.com>
-
- * Makefile.am ($(desktop).in): desktop.in.in -> desktop.in ->desktop
- so that we can merge the incondir path.
- * add keyboard-capplet.png (by jimmac) an use it
-
-2001-07-10 Kai Lahmann <kl@linuxfaqs.de>
-
- * keyboard-properties.desktop: Fixed wrong binary name
-
-2001-07-05 Bradford Hovinen <hovinen@ximian.com>
-
- * prefs-widget.c (set_scale): Add appropriate casts
-
-2000-12-26 Jacob "Ulysses" Berkman <jacob@helixcode.com>
-
- * keyboard-properties.glade: re-did the UI a bit
-
-2000-10-08 Bradford Hovinen <hovinen@helixcode.com>
-
- * Makefile.am (EXTRA_DIST): Add translation file
-
-2000-09-12 Bradford Hovinen <hovinen@helixcode.com>
-
- * preferences.c (preferences_clone): Added in missing code to copy
- preferences over
-
diff --git a/capplets/keyboard/Makefile.am b/capplets/keyboard/Makefile.am
deleted file mode 100644
index 56ad9f2d2..000000000
--- a/capplets/keyboard/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-bin_PROGRAMS = gnome-keyboard-properties
-
-gnome_keyboard_properties_SOURCES = gnome-keyboard-properties.c \
- gnome-keyboard-properties-xkb.c \
- gnome-keyboard-properties-xkbmc.c \
- gnome-keyboard-properties-xkblt.c \
- gnome-keyboard-properties-xkbot.c \
- gnome-keyboard-properties-xkbpv.c \
- gnome-keyboard-properties-xkb.h
-gnome_keyboard_properties_LDADD = \
- ../accessibility/keyboard/libaccessibility-keyboard.a \
- $(GNOMECC_CAPPLETS_LIBS) $(LIBXKLAVIER_LIBS) \
- ../../libgswitchit/libgswitchit.a \
- ../../libkbdraw/libkbdraw.a
-
-@INTLTOOL_DESKTOP_RULE@
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-keyboard-properties.glade
-
-pixmapsdir = $(GNOMECC_PIXMAPS_DIR)
-pixmaps_DATA = \
- keyboard-repeat.png \
- keyboard-cursor.png \
- keyboard-volume.png \
- keyboard-bell.png
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = keyboard.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(LIBXKLAVIER_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA) $(pixmaps_DATA)
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.c b/capplets/keyboard/gnome-keyboard-properties-xkb.c
deleted file mode 100644
index 5fd6caf80..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkb.c
+++ /dev/null
@@ -1,208 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkb.c
- * Copyright (C) 2003 Sergey V. Oudaltsov
- *
- * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gdk/gdkx.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "libgswitchit/gswitchit_config.h"
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-#include <../accessibility/keyboard/accessibility-keyboard.h>
-
-#include "gnome-keyboard-properties-xkb.h"
-
-static GSwitchItKbdConfig initialConfig;
-
-GConfClient *xkbGConfClient;
-
-char *
-xci_desc_to_utf8 (XklConfigItem * ci)
-{
- char *sd = g_strstrip (ci->description);
- return sd[0] == 0 ? g_strdup (ci->name) :
- g_locale_to_utf8 (sd, -1, NULL, NULL, NULL);
-}
-
-static GConfValue *
-model_from_widget (GConfPropertyEditor * peditor, GConfValue * value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_STRING);
-
- if (value->type == GCONF_VALUE_STRING)
- {
- GObject* widget = gconf_property_editor_get_ui_control(peditor);
- gchar* n = g_object_get_data (widget, "xkbModelName");
- gconf_value_set_string (new_value, n);
- }
- else
- gconf_value_set_string (new_value, _("Unknown"));
-
- return new_value;
-}
-
-static GConfValue *
-model_to_widget (GConfPropertyEditor * peditor, GConfValue * value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_STRING);
-
- if (value->type == GCONF_VALUE_STRING)
- {
- XklConfigItem ci;
- g_snprintf( ci.name, sizeof (ci.name), "%s", gconf_value_get_string( value ) );
- if ( XklConfigFindModel( &ci ) )
- {
- GObject* widget = gconf_property_editor_get_ui_control(peditor);
- gchar* d = xci_desc_to_utf8 (&ci);
-
- g_object_set_data_full (widget, "xkbModelName", g_strdup (ci.name), g_free);
- gconf_value_set_string (new_value, d);
- g_free (d);
- }
- else
- gconf_value_set_string (new_value, _("Unknown"));
- }
-
- return new_value;
-}
-
-static void
-cleanup_xkb_tabs (GladeXML * dialog)
-{
- GSwitchItKbdConfigTerm (&initialConfig);
- XklConfigFreeRegistry ();
- XklConfigTerm ();
- XklTerm ();
- g_object_unref (xkbGConfClient);
- xkbGConfClient = NULL;
-}
-
-static void
-reset_to_defaults (GtkWidget * button, GladeXML * dialog)
-{
- gconf_client_set_bool (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_OVERRIDE_SETTINGS,
- TRUE, NULL);
- /* all the rest is g-s-d's business */
-}
-
-static void
-update_model (GConfClient * client,
- guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
-{
- enable_disable_restoring (dialog);
-}
-
-static void
-chk_separate_group_per_window_toggled (GConfPropertyEditor *peditor,
- const gchar *key,
- const GConfValue *value,
- GladeXML* dialog)
-{
- xkb_layouts_enable_disable_default (dialog, value && gconf_value_get_bool (value));
-}
-
-void
-setup_xkb_tabs (GladeXML * dialog, GConfChangeSet * changeset)
-{
- GObject * peditor;
- xkbGConfClient = gconf_client_get_default ();
-
- XklInit (GDK_DISPLAY ());
- XklConfigInit ();
- XklConfigLoadRegistry ();
-
- gconf_peditor_new_string
- (changeset, (gchar *) GSWITCHIT_KBD_CONFIG_KEY_MODEL,
- WID ("xkb_model"),
- "conv-to-widget-cb", model_to_widget,
- "conv-from-widget-cb", model_from_widget, NULL);
-
- peditor = gconf_peditor_new_boolean
- (changeset, (gchar *) GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW,
- WID ("chk_separate_group_per_window"), NULL);
-
- g_signal_connect (peditor, "value-changed", (GCallback)chk_separate_group_per_window_toggled , dialog);
-
-/* tab 2 */
- /*fill_available_layouts_tree (dialog);*/
- xkb_layouts_prepare_selected_tree (dialog, changeset);
- xkb_layouts_fill_selected_tree (dialog);
-
-/* tab 3 */
- xkb_options_load_options (dialog);
-
- xkb_layouts_register_buttons_handlers (dialog);
- g_signal_connect (G_OBJECT (WID ("xkb_reset_to_defaults")), "clicked",
- G_CALLBACK (reset_to_defaults), dialog);
-
- g_signal_connect_swapped (G_OBJECT (WID ("xkb_model_pick")), "clicked",
- G_CALLBACK (choose_model), dialog);
-
- xkb_layouts_register_gconf_listener (dialog);
- xkb_options_register_gconf_listener (dialog);
-
- g_signal_connect (G_OBJECT (WID ("keyboard_dialog")),
- "destroy", G_CALLBACK (cleanup_xkb_tabs), dialog);
-
- gconf_client_notify_add (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_MODEL,
- (GConfClientNotifyFunc)
- update_model, dialog, NULL, NULL);
-
- GSwitchItKbdConfigInit (&initialConfig, xkbGConfClient);
- GSwitchItKbdConfigLoadFromXInitial (&initialConfig);
-
- enable_disable_restoring (dialog);
- xkb_layouts_enable_disable_default (dialog,
- gconf_client_get_bool (xkbGConfClient,
- GSWITCHIT_CONFIG_KEY_GROUP_PER_WINDOW,
- NULL));
-}
-
-void
-enable_disable_restoring (GladeXML * dialog)
-{
- GSwitchItKbdConfig gswic;
- gboolean enable;
-
- GSwitchItKbdConfigInit (&gswic, xkbGConfClient);
- GSwitchItKbdConfigLoadFromGConf (&gswic);
-
- enable = !GSwitchItKbdConfigEquals (&gswic, &initialConfig);
-
- GSwitchItKbdConfigTerm (&gswic);
- gtk_widget_set_sensitive (WID ("xkb_reset_to_defaults"), enable);
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkb.h b/capplets/keyboard/gnome-keyboard-properties-xkb.h
deleted file mode 100644
index 3891b95c1..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkb.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkb.h
- * Copyright (C) 2003 Udaltsoft
- *
- * Written by Sergey V. Oudaltsov <svu@users.sf.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __GNOME_KEYBOARD_PROPERTY_XKB_H
-#define __GNOME_KEYBOARD_PROPERTY_XKB_H
-
-#include <libxklavier/xklavier_config.h>
-#include <gconf/gconf-client.h>
-
-G_BEGIN_DECLS
-
-#define SEL_LAYOUT_TREE_COL_DESCRIPTION 0
-#define SEL_LAYOUT_TREE_COL_DEFAULT 1
-#define SEL_LAYOUT_TREE_COL_ID 2
-
-#define AVAIL_LAYOUT_TREE_COL_DESCRIPTION 0
-#define AVAIL_LAYOUT_TREE_COL_ID 1
-
-#define CWID(s) glade_xml_get_widget (chooserDialog, s)
-
-extern GConfClient *xkbGConfClient;
-
-extern void setup_xkb_tabs (GladeXML * dialog,
- GConfChangeSet * changeset);
-
-extern void xkb_layouts_fill_available_tree (GladeXML * dialog);
-
-extern void xkb_options_fill_available_tree (GladeXML * dialog);
-
-extern void xkb_layouts_fill_selected_tree (GladeXML * dialog);
-
-extern void xkb_options_fill_selected_tree (GladeXML * dialog);
-
-extern void xkb_layouts_register_buttons_handlers (GladeXML * dialog);
-
-extern void xkb_options_register_buttons_handlers (GladeXML * dialog);
-
-extern void xkb_layouts_register_gconf_listener (GladeXML * dialog);
-
-extern void xkb_options_register_gconf_listener (GladeXML * dialog);
-
-extern void xkb_layouts_prepare_selected_tree (GladeXML * dialog,
- GConfChangeSet * changeset);
-
-extern void xkb_options_prepare_selected_tree (GladeXML * dialog);
-
-extern void clear_xkb_elements_list (GSList * list);
-
-extern char *xci_desc_to_utf8 (XklConfigItem * ci);
-
-extern void sort_tree_content (GtkWidget * treeView);
-
-extern void enable_disable_restoring (GladeXML * dialog);
-
-extern void preview_toggled (GladeXML * dialog, GtkWidget * button);
-
-extern void choose_model (GladeXML * dialog);
-
-extern void xkb_layout_choose (GladeXML * dialog);
-
-extern void xkb_layouts_enable_disable_default (GladeXML * dialog,
- gboolean enable);
-
-#define xkb_layouts_get_selected_list() \
- gconf_client_get_list (gconf_client_get_default (), \
- GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS, \
- GCONF_VALUE_STRING, NULL)
-
-#define xkb_layouts_set_selected_list(list) \
- gconf_client_set_list (gconf_client_get_default (), \
- GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS, \
- GCONF_VALUE_STRING, (list), NULL)
-
-#define xkb_options_get_selected_list() \
- gconf_client_get_list (gconf_client_get_default (), \
- GSWITCHIT_KBD_CONFIG_KEY_OPTIONS, \
- GCONF_VALUE_STRING, NULL)
-
-#define xkb_options_set_selected_list(list) \
- gconf_client_set_list (gconf_client_get_default (), \
- GSWITCHIT_KBD_CONFIG_KEY_OPTIONS, \
- GCONF_VALUE_STRING, (list), NULL)
-
-extern GtkWidget * xkb_layout_preview_create_widget (GladeXML * chooserDialog);
-
-extern void xkb_layout_preview_update (GladeXML * chooserDialog);
-
-G_END_DECLS
-#endif /* __GNOME_KEYBOARD_PROPERTY_XKB_H */
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkblt.c b/capplets/keyboard/gnome-keyboard-properties-xkblt.c
deleted file mode 100644
index 81562030c..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkblt.c
+++ /dev/null
@@ -1,581 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkblt.c
- * Copyright (C) 2003 Sergey V. Oudaltsov
- *
- * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "libgswitchit/gswitchit_config.h"
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-#include <../accessibility/keyboard/accessibility-keyboard.h>
-
-#include "gnome-keyboard-properties-xkb.h"
-#include "libkbdraw/keyboard-drawing.h"
-
-#define GROUP_SWITCHERS_GROUP "grp"
-#define DEFAULT_GROUP_SWITCH "grp:alts_toggle"
-
-static GtkTreeIter current1stLevelIter;
-static const char *current1stLevelId;
-
-static int idx2Select = -1;
-static int maxSelectedLayouts = -1;
-static int defaultGroup = -1;
-
-static GtkCellRenderer *textRenderer;
-static GtkCellRenderer *toggleRenderer;
-
-void
-clear_xkb_elements_list (GSList * list)
-{
- while (list != NULL)
- {
- GSList *p = list;
- list = list->next;
- g_free (p->data);
- g_slist_free_1 (p);
- }
-}
-
-static void
-save_default_group (int aDefaultGroup)
-{
- if (aDefaultGroup != gconf_client_get_int (xkbGConfClient,
- GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP,
- NULL))
- gconf_client_set_int (xkbGConfClient,
- GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP,
- aDefaultGroup,
- NULL);
-}
-
-static void
-def_group_in_ui_changed (GtkCellRendererToggle *cell_renderer,
- gchar *path,
- GladeXML * dialog)
-{
- GtkTreePath *chpath = gtk_tree_path_new_from_string (path);
- int newDefaultGroup = -1;
- gboolean previouslySelected = gtk_cell_renderer_toggle_get_active (cell_renderer);
-
- if (!previouslySelected) /* prev state - non-selected! */
- {
- int *indices = gtk_tree_path_get_indices (chpath);
- newDefaultGroup = indices[0];
- }
-
- save_default_group (newDefaultGroup);
- gtk_tree_path_free (chpath);
-}
-
-static void
-def_group_in_gconf_changed (GConfClient * client,
- guint cnxn_id,
- GConfEntry * entry, GladeXML* dialog)
-{
- GConfValue *value = gconf_entry_get_value (entry);
-
- if (value->type == GCONF_VALUE_INT)
- {
- GtkWidget* treeView = WID ("xkb_layouts_selected");
- GtkTreeModel *model = GTK_TREE_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (treeView)));
- GtkTreeIter iter;
- int counter = 0;
- defaultGroup = gconf_value_get_int (value);
- if (gtk_tree_model_get_iter_first (model, &iter))
- {
- do
- {
- gboolean curVal;
- gtk_tree_model_get (model, &iter,
- SEL_LAYOUT_TREE_COL_DEFAULT, &curVal,
- -1);
- if (curVal != ( counter == defaultGroup))
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- SEL_LAYOUT_TREE_COL_DEFAULT, counter == defaultGroup,
- -1);
- counter++;
- }
- while (gtk_tree_model_iter_next (model, &iter));
- }
- }
-}
-
-static void
-add_variant_to_available_layouts_tree (const XklConfigItemPtr configItem,
- GladeXML * chooserDialog)
-{
- GtkWidget *layoutsTree = CWID ("xkb_layouts_available");
- GtkTreeIter iter;
- GtkTreeStore *treeStore =
- GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (layoutsTree)));
- const gchar *fullLayoutName = GSwitchItKbdConfigMergeItems (current1stLevelId,
- configItem->name);
- char *utfVariantName = xci_desc_to_utf8 (configItem);
-
- gtk_tree_store_append (treeStore, &iter, &current1stLevelIter);
- gtk_tree_store_set (treeStore, &iter,
- AVAIL_LAYOUT_TREE_COL_DESCRIPTION, utfVariantName,
- AVAIL_LAYOUT_TREE_COL_ID, fullLayoutName, -1);
- g_free (utfVariantName);
-}
-
-static void
-add_layout_to_available_layouts_tree (const XklConfigItemPtr configItem,
- GladeXML * chooserDialog)
-{
- GtkWidget *layoutsTree = CWID ("xkb_layouts_available");
- GtkTreeStore *treeStore =
- GTK_TREE_STORE (gtk_tree_view_get_model (GTK_TREE_VIEW (layoutsTree)));
- char *utfLayoutName = xci_desc_to_utf8 (configItem);
-
- gtk_tree_store_append (treeStore, &current1stLevelIter, NULL);
- gtk_tree_store_set (treeStore, &current1stLevelIter,
- AVAIL_LAYOUT_TREE_COL_DESCRIPTION, utfLayoutName,
- AVAIL_LAYOUT_TREE_COL_ID, configItem->name, -1);
- g_free (utfLayoutName);
-
- current1stLevelId = configItem->name;
-
- XklConfigEnumLayoutVariants (configItem->name,
- (ConfigItemProcessFunc)add_variant_to_available_layouts_tree,
- chooserDialog);
-}
-
-static void
-xkb_layouts_enable_disable_buttons (GladeXML * dialog)
-{
- GtkWidget *addLayoutBtn = WID ("xkb_layouts_add");
- GtkWidget *delLayoutBtn = WID ("xkb_layouts_remove");
- GtkWidget *upLayoutBtn = WID ("xkb_layouts_up");
- GtkWidget *dnLayoutBtn = WID ("xkb_layouts_down");
- GtkWidget *selectedLayoutsTree = WID ("xkb_layouts_selected");
-
- GtkTreeSelection *sSelection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (selectedLayoutsTree));
- const int nSelectedSelectedLayouts =
- gtk_tree_selection_count_selected_rows (sSelection);
- gboolean canMoveUp = FALSE;
- gboolean canMoveDn = FALSE;
- GtkTreeIter iter;
- GtkTreeModel *selectedLayoutsModel = gtk_tree_view_get_model
- (GTK_TREE_VIEW (selectedLayoutsTree));
- const int nSelectedLayouts =
- gtk_tree_model_iter_n_children (selectedLayoutsModel,
- NULL);
-
- gtk_widget_set_sensitive (addLayoutBtn,
- (nSelectedLayouts < maxSelectedLayouts ||
- maxSelectedLayouts == 0));
- gtk_widget_set_sensitive (delLayoutBtn, nSelectedSelectedLayouts > 0);
-
- if (gtk_tree_selection_get_selected (sSelection, NULL, &iter))
- {
- GtkTreePath *path = gtk_tree_model_get_path (selectedLayoutsModel,
- &iter);
- if (path != NULL)
- {
- int *indices = gtk_tree_path_get_indices (path);
- int idx = indices[0];
- canMoveUp = idx > 0;
- canMoveDn = idx < (nSelectedLayouts - 1);
- gtk_tree_path_free (path);
- }
- }
- gtk_widget_set_sensitive (upLayoutBtn, canMoveUp);
- gtk_widget_set_sensitive (dnLayoutBtn, canMoveDn);
-}
-
-static void
-xkb_layout_chooser_enable_disable_buttons (GladeXML * chooserDialog)
-{
- GtkWidget *availableLayoutsTree = CWID ("xkb_layouts_available");
- GtkTreeSelection *aSelection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (availableLayoutsTree));
- const int nSelectedAvailableLayouts =
- gtk_tree_selection_count_selected_rows (aSelection);
-
- gtk_dialog_set_response_sensitive (GTK_DIALOG (CWID ("xkb_layout_chooser")),
- GTK_RESPONSE_OK, nSelectedAvailableLayouts > 0);
-}
-
-void xkb_layouts_enable_disable_default (GladeXML * dialog,
- gboolean enable)
-{
- GValue val = {0};
- g_value_init (&val, G_TYPE_BOOLEAN);
- g_value_set_boolean (&val, enable);
- g_object_set_property (G_OBJECT (toggleRenderer), "activatable", &val);
-}
-
-void
-xkb_layouts_prepare_selected_tree (GladeXML * dialog, GConfChangeSet * changeset)
-{
- GtkListStore *listStore =
- gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_STRING);
- GtkWidget *treeView = WID ("xkb_layouts_selected");
- GtkTreeViewColumn * descColumn, * defColumn;
- GtkTreeSelection *selection;
-
- textRenderer = GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- toggleRenderer = GTK_CELL_RENDERER (gtk_cell_renderer_toggle_new ());
-
- descColumn = gtk_tree_view_column_new_with_attributes (_("Layout"),
- textRenderer,
- "text", SEL_LAYOUT_TREE_COL_DESCRIPTION,
- NULL);
- defColumn = gtk_tree_view_column_new_with_attributes (_("Default"),
- toggleRenderer,
- "active", SEL_LAYOUT_TREE_COL_DEFAULT,
- NULL);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (treeView));
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (treeView),
- GTK_TREE_MODEL (listStore));
-
- gtk_tree_view_column_set_sizing (descColumn, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
- gtk_tree_view_column_set_sizing (defColumn, GTK_TREE_VIEW_COLUMN_AUTOSIZE);
- gtk_tree_view_column_set_resizable (descColumn, TRUE);
- gtk_tree_view_column_set_resizable (defColumn, TRUE);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), descColumn);
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), defColumn);
-
- g_signal_connect_swapped (G_OBJECT (selection), "changed",
- G_CALLBACK
- (xkb_layouts_enable_disable_buttons), dialog);
- maxSelectedLayouts = XklGetMaxNumGroups();
-
- gconf_client_notify_add (xkbGConfClient,
- GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP,
- (GConfClientNotifyFunc)def_group_in_gconf_changed,
- dialog,
- NULL,
- NULL);
- g_signal_connect (G_OBJECT (toggleRenderer), "toggled",
- G_CALLBACK (def_group_in_ui_changed), dialog);
-}
-
-static void
-xkb_layout_chooser_selection_changed (GladeXML * chooserDialog)
-{
- xkb_layout_preview_update (chooserDialog);
- xkb_layout_chooser_enable_disable_buttons (chooserDialog);
-}
-
-void
-xkb_layouts_fill_selected_tree (GladeXML * dialog)
-{
- GConfEntry *gce;
- GSList *layouts = xkb_layouts_get_selected_list ();
- GSList *curLayout;
- GtkListStore *listStore =
- GTK_LIST_STORE (gtk_tree_view_get_model
- (GTK_TREE_VIEW (WID ("xkb_layouts_selected"))));
- gtk_list_store_clear (listStore);
-
- for (curLayout = layouts; curLayout != NULL; curLayout = curLayout->next)
- {
- GtkTreeIter iter;
- char *l, *sl, *v, *sv;
- char *v1, *utfVisible;
- const char *visible = (char *) curLayout->data;
- gtk_list_store_append (listStore, &iter);
- if (GSwitchItKbdConfigGetDescriptions (visible, &sl, &l, &sv, &v))
- visible = GSwitchItKbdConfigFormatFullLayout (l, v);
- v1 = g_strdup (visible);
- utfVisible = g_locale_to_utf8 (g_strstrip (v1), -1, NULL, NULL, NULL);
- gtk_list_store_set (listStore, &iter,
- SEL_LAYOUT_TREE_COL_DESCRIPTION, utfVisible,
- SEL_LAYOUT_TREE_COL_DEFAULT, FALSE,
- SEL_LAYOUT_TREE_COL_ID, curLayout->data, -1);
- g_free (utfVisible);
- g_free (v1);
- }
-
- clear_xkb_elements_list (layouts);
- xkb_layouts_enable_disable_buttons (dialog);
- if (idx2Select != -1)
- {
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection ((GTK_TREE_VIEW
- (WID ("xkb_layouts_selected"))));
- GtkTreePath *path = gtk_tree_path_new_from_indices (idx2Select, -1);
- gtk_tree_selection_select_path (selection, path);
- gtk_tree_path_free (path);
- idx2Select = -1;
- }
-
- gce = gconf_client_get_entry (xkbGConfClient,
- GSWITCHIT_CONFIG_KEY_DEFAULT_GROUP,
- NULL,
- TRUE,
- NULL);
- def_group_in_gconf_changed (xkbGConfClient, -1, gce, dialog);
-}
-
-void
-sort_tree_content (GtkWidget * treeView)
-{
- GtkTreeModel *treeModel =
- gtk_tree_view_get_model (GTK_TREE_VIEW (treeView));
- GtkTreeModel *sortedTreeModel;
- /* replace the store with the sorted version */
- sortedTreeModel = gtk_tree_model_sort_new_with_model (treeModel);
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE
- (sortedTreeModel), 0,
- GTK_SORT_ASCENDING);
- gtk_tree_view_set_model (GTK_TREE_VIEW (treeView), sortedTreeModel);
-}
-
-void
-xkb_layouts_fill_available_tree (GladeXML * chooserDialog)
-{
- GtkTreeStore *treeStore =
- gtk_tree_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
- GtkWidget *treeView = CWID ("xkb_layouts_available");
- GtkCellRenderer *renderer =
- GTK_CELL_RENDERER (gtk_cell_renderer_text_new ());
- GtkTreeViewColumn *column = gtk_tree_view_column_new_with_attributes (NULL,
- renderer,
- "text",
- AVAIL_LAYOUT_TREE_COL_DESCRIPTION,
- NULL);
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (treeView));
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (treeView),
- GTK_TREE_MODEL (treeStore));
- gtk_tree_view_append_column (GTK_TREE_VIEW (treeView), column);
-
- XklConfigEnumLayouts ((ConfigItemProcessFunc)
- add_layout_to_available_layouts_tree, chooserDialog);
-
- sort_tree_content (treeView);
- g_signal_connect_swapped (G_OBJECT (selection), "changed",
- G_CALLBACK
- (xkb_layout_chooser_selection_changed), chooserDialog);
-}
-
-static void
-add_selected_layout (GtkWidget * button, GladeXML * dialog)
-{
- xkb_layout_choose (dialog);
-}
-
-static void
-move_selected_layout (GladeXML * dialog, int offset)
-{
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW
- (WID ("xkb_layouts_selected")));
- GtkTreeIter selectedIter;
- GtkTreeModel *model;
- if (gtk_tree_selection_get_selected (selection, &model, &selectedIter))
- {
- GSList *layoutsList = xkb_layouts_get_selected_list ();
- GtkTreePath *path = gtk_tree_model_get_path (model,
- &selectedIter);
- if (path != NULL)
- {
- int *indices = gtk_tree_path_get_indices (path);
- int idx = indices[0];
- char *id = NULL;
- GSList *node2Remove = g_slist_nth (layoutsList, idx);
-
- layoutsList = g_slist_remove_link (layoutsList, node2Remove);
-
- id = (char *) node2Remove->data;
- g_slist_free_1 (node2Remove);
-
- if (offset == 0)
- {
- g_free (id);
- if (defaultGroup > idx)
- save_default_group (defaultGroup - 1);
- else if (defaultGroup == idx)
- save_default_group (-1);
- }
- else
- {
- layoutsList =
- g_slist_insert (layoutsList, id, idx + offset);
- idx2Select = idx + offset;
- if (idx == defaultGroup)
- save_default_group (idx2Select);
- else if (idx2Select == defaultGroup)
- save_default_group (idx);
- }
-
- xkb_layouts_set_selected_list (layoutsList);
- gtk_tree_path_free (path);
- }
- clear_xkb_elements_list (layoutsList);
- }
-}
-
-static void
-remove_selected_layout (GtkWidget * button, GladeXML * dialog)
-{
- move_selected_layout (dialog, 0);
-}
-
-static void
-up_selected_layout (GtkWidget * button, GladeXML * dialog)
-{
- move_selected_layout (dialog, -1);
-}
-
-static void
-down_selected_layout (GtkWidget * button, GladeXML * dialog)
-{
- move_selected_layout (dialog, +1);
-}
-
-void
-xkb_layouts_register_buttons_handlers (GladeXML * dialog)
-{
- g_signal_connect (G_OBJECT (WID ("xkb_layouts_add")), "clicked",
- G_CALLBACK (add_selected_layout), dialog);
- g_signal_connect (G_OBJECT (WID ("xkb_layouts_remove")), "clicked",
- G_CALLBACK (remove_selected_layout), dialog);
- g_signal_connect (G_OBJECT (WID ("xkb_layouts_up")), "clicked",
- G_CALLBACK (up_selected_layout), dialog);
- g_signal_connect (G_OBJECT (WID ("xkb_layouts_down")), "clicked",
- G_CALLBACK (down_selected_layout), dialog);
-}
-
-static void
-xkb_layout_chooser_response(GtkDialog *dialog,
- gint response,
- GladeXML *chooserDialog)
-{
- if (response == GTK_RESPONSE_OK)
- {
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW
- (CWID ("xkb_layouts_available")));
- GtkTreeIter selectedIter;
- GtkTreeModel *model;
- if (gtk_tree_selection_get_selected (selection, &model, &selectedIter))
- {
- gchar *id;
- GSList *layoutsList = xkb_layouts_get_selected_list ();
- gtk_tree_model_get (model, &selectedIter,
- AVAIL_LAYOUT_TREE_COL_ID, &id, -1);
- layoutsList = g_slist_append (layoutsList, id);
- xkb_layouts_set_selected_list (layoutsList);
- /* process default switcher */
- if (g_slist_length(layoutsList) >= 2)
- {
- GSList *optionsList = xkb_options_get_selected_list ();
- gboolean anySwitcher = False;
- GSList *option = optionsList;
- while (option != NULL)
- {
- char *g, *o;
- if (GSwitchItKbdConfigSplitItems (option->data, &g, &o))
- {
- if (!g_ascii_strcasecmp (g, GROUP_SWITCHERS_GROUP))
- {
- anySwitcher = True;
- break;
- }
- }
- option = option->next;
- }
- if (!anySwitcher)
- {
- XklConfigItem ci;
- g_snprintf( ci.name, XKL_MAX_CI_NAME_LENGTH, DEFAULT_GROUP_SWITCH );
- if (XklConfigFindOption( GROUP_SWITCHERS_GROUP,
- &ci ))
- {
- const gchar* id = GSwitchItKbdConfigMergeItems (GROUP_SWITCHERS_GROUP, DEFAULT_GROUP_SWITCH);
- optionsList = g_slist_append (optionsList, g_strdup (id));
- xkb_options_set_selected_list (optionsList);
- }
- }
- clear_xkb_elements_list (optionsList);
- }
- clear_xkb_elements_list (layoutsList);
- }
- }
-}
-
-static void
-xkb_layouts_update_list (GConfClient * client,
- guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
-{
- xkb_layouts_fill_selected_tree (dialog);
- enable_disable_restoring (dialog);
-}
-
-void
-xkb_layouts_register_gconf_listener (GladeXML * dialog)
-{
- gconf_client_notify_add (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_LAYOUTS,
- (GConfClientNotifyFunc)
- xkb_layouts_update_list, dialog, NULL, NULL);
-}
-
-void
-xkb_layout_choose (GladeXML * dialog)
-{
- GladeXML* chooserDialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keyboard-properties.glade", "xkb_layout_chooser", NULL);
- GtkWidget* chooser = CWID ( "xkb_layout_chooser");
- GtkWidget* kbdraw = NULL;
-
- gtk_window_set_transient_for (GTK_WINDOW (chooser), GTK_WINDOW (WID ("keyboard_dialog")));
-
- xkb_layouts_fill_available_tree (chooserDialog);
- xkb_layout_chooser_selection_changed (chooserDialog);
-
-#ifdef HAVE_X11_EXTENSIONS_XKB_H
- if (!strcmp (XklGetBackendName(), "XKB"))
- {
- kbdraw = xkb_layout_preview_create_widget (chooserDialog);
- g_object_set_data (G_OBJECT (chooser), "kbdraw", kbdraw);
- gtk_container_add (GTK_CONTAINER (CWID ("vboxPreview")), kbdraw);
- gtk_widget_show_all (kbdraw);
- } else
-#endif
- {
- gtk_widget_hide_all (CWID ("vboxPreview"));
- }
-
- g_signal_connect (G_OBJECT (chooser),
- "response", G_CALLBACK (xkb_layout_chooser_response), chooserDialog);
-
- gtk_dialog_run (GTK_DIALOG (chooser));
- gtk_widget_destroy (chooser);
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbmc.c b/capplets/keyboard/gnome-keyboard-properties-xkbmc.c
deleted file mode 100644
index 698184ff5..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkbmc.c
+++ /dev/null
@@ -1,159 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkb.c
- * Copyright (C) 2003 Sergey V. Oudaltsov
- *
- * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gdk/gdkx.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "libgswitchit/gswitchit_config.h"
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-#include <../accessibility/keyboard/accessibility-keyboard.h>
-
-#include "gnome-keyboard-properties-xkb.h"
-
-static gchar* currentModelName = NULL;
-
-static void
-add_model_to_list (const XklConfigItemPtr configItem, GtkTreeView * modelsList)
-{
- GtkTreeIter iter;
- GtkListStore * listStore = GTK_LIST_STORE (gtk_tree_view_get_model (modelsList));
- char *utfModelName = xci_desc_to_utf8 (configItem);
- gtk_list_store_append( listStore, &iter );
- gtk_list_store_set( listStore, &iter,
- 0, utfModelName,
- 1, configItem->name, -1 );
-
- g_free (utfModelName);
-}
-
-static void
-xkb_model_chooser_change_sel (GtkTreeSelection* selection,
- GladeXML* chooserDialog)
-{
- gboolean anysel = gtk_tree_selection_get_selected (selection, NULL, NULL);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (CWID ("xkb_model_chooser")),
- GTK_RESPONSE_OK, anysel);
-}
-
-static void
-fill_models_list (GladeXML * chooserDialog)
-{
- GtkWidget* modelsList = CWID( "models_list" );
- GtkTreeIter iter;
- GtkTreePath *path;
- GtkCellRenderer* renderer = gtk_cell_renderer_text_new ();
- GtkTreeViewColumn* descriptionCol = gtk_tree_view_column_new_with_attributes ( _("Models"),
- renderer,
- "text", 0,
- NULL);
- GtkListStore *listStore = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
- char *modelName;
-
- gtk_tree_view_column_set_visible (descriptionCol, TRUE);
- gtk_tree_view_append_column (GTK_TREE_VIEW (modelsList), descriptionCol);
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (modelsList), GTK_TREE_MODEL (listStore) );
-
- gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (listStore),
- 0, GTK_SORT_ASCENDING);
-
- XklConfigEnumModels ((ConfigItemProcessFunc)
- add_model_to_list, modelsList);
-
- if (currentModelName != NULL)
- {
- if (gtk_tree_model_get_iter_first (GTK_TREE_MODEL (listStore), &iter))
- {
- do
- {
- gtk_tree_model_get (GTK_TREE_MODEL (listStore), &iter,
- 1, &modelName, -1);
- if (!g_ascii_strcasecmp(modelName, currentModelName))
- {
- gtk_tree_selection_select_iter (gtk_tree_view_get_selection (GTK_TREE_VIEW (modelsList)), &iter);
- path = gtk_tree_model_get_path (GTK_TREE_MODEL (listStore), &iter);
- gtk_tree_view_scroll_to_cell (GTK_TREE_VIEW (modelsList),
- path, NULL, TRUE, 0.5, 0);
- gtk_tree_path_free (path);
- }
- g_free (modelName);
- } while (gtk_tree_model_iter_next (GTK_TREE_MODEL (listStore), &iter));
- }
- }
-
- g_signal_connect (G_OBJECT (gtk_tree_view_get_selection (GTK_TREE_VIEW (modelsList))),
- "changed",
- G_CALLBACK (xkb_model_chooser_change_sel),
- chooserDialog);
-}
-
-static void
-xkb_model_chooser_response (GtkDialog *dialog,
- gint response,
- GladeXML *chooserDialog)
-{
- if (response == GTK_RESPONSE_OK)
- {
- GtkWidget* modelsList = CWID( "models_list" );
- GtkTreeSelection* selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (modelsList));
- GtkTreeIter iter;
- GtkTreeModel* listStore = NULL;
- if (gtk_tree_selection_get_selected (selection, &listStore, &iter))
- {
- gchar* modelName = NULL;
- gtk_tree_model_get (listStore, &iter,
- 1, &modelName, -1);
-
- gconf_client_set_string (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_MODEL,
- modelName, NULL);
- g_free(modelName);
- }
- }
-}
-
-void
-choose_model(GladeXML * dialog)
-{
- GladeXML* chooserDialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keyboard-properties.glade", "xkb_model_chooser", NULL);
- GtkWidget* chooser = CWID ( "xkb_model_chooser");
- gtk_window_set_transient_for (GTK_WINDOW (chooser), GTK_WINDOW (WID ("keyboard_dialog")));
- currentModelName = gconf_client_get_string (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_MODEL, NULL);
- fill_models_list (chooserDialog);
- g_signal_connect (G_OBJECT (chooser),
- "response", G_CALLBACK (xkb_model_chooser_response), chooserDialog);
- gtk_dialog_run (GTK_DIALOG (chooser));
- gtk_widget_destroy (chooser);
- g_free (currentModelName);
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbot.c b/capplets/keyboard/gnome-keyboard-properties-xkbot.c
deleted file mode 100644
index f06ef6dce..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkbot.c
+++ /dev/null
@@ -1,332 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkbot.c
- * Copyright (C) 2003 Sergey V. Oudaltsov
- *
- * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net>
- * John Spray <spray_john@users.sourceforge.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "libgswitchit/gswitchit_config.h"
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-#include <../accessibility/keyboard/accessibility-keyboard.h>
-
-#include "gnome-keyboard-properties-xkb.h"
-
-static const char *current1stLevelId = NULL;
-static GtkWidget *currentVbox = NULL;
-static GtkWidget *currentNoneRadio = NULL;
-static gboolean currentMultiSelect = FALSE;
-static GSList *currentRadioGroup = NULL;
-
-#define OPTION_ID_PROP "optionID"
-#define SELCOUNTER_PROP "selectionCounter"
-#define GCONFSTATE_PROP "gconfState"
-#define EXPANDERS_PROP "expandersList"
-
-static GtkWidget *
-xkb_options_get_expander (GtkWidget * option_button)
-{
- return gtk_widget_get_parent (
- gtk_widget_get_parent (
- gtk_widget_get_parent (option_button)));
-}
-
-static int
-xkb_options_expander_selcounter_get (GtkWidget * expander)
-{
- return GPOINTER_TO_INT(g_object_get_data (G_OBJECT (expander), SELCOUNTER_PROP));
-}
-
-static void
-xkb_options_expander_selcounter_add (GtkWidget * expander, int value)
-{
- g_object_set_data (G_OBJECT (expander), SELCOUNTER_PROP,
- GINT_TO_POINTER (xkb_options_expander_selcounter_get (expander) + value));
-}
-
-static void
-xkb_options_expander_highlight (GtkWidget * expander)
-{
- char * utfGroupName = g_object_get_data (G_OBJECT (expander), "utfGroupName");
- int counter = xkb_options_expander_selcounter_get (expander);
- gchar *titlemarkup = g_strconcat (counter > 0 ? "<span weight=\"bold\">" : "<span>",
- utfGroupName, "</span>", NULL);
- gtk_expander_set_label (GTK_EXPANDER (expander), titlemarkup);
- g_free (titlemarkup);
-}
-
-/* Add optionname from the backend's selection list if it's not
- already in there. */
-static void
-xkb_options_select (gchar *optionname)
-{
- gboolean already_selected = FALSE;
- GSList *optionsList = xkb_options_get_selected_list ();
- GSList *option;
- for (option = optionsList ; option != NULL ; option = option->next)
- if (!strcmp ((gchar*)option->data, optionname))
- already_selected = TRUE;
-
- if (!already_selected)
- optionsList = g_slist_append (optionsList, g_strdup (optionname));
- xkb_options_set_selected_list (optionsList);
-
- clear_xkb_elements_list (optionsList);
-}
-
-/* Remove all occurences of optionname from the backend's selection list */
-static void
-xkb_options_deselect (gchar *optionname)
-{
- GSList *optionsList = xkb_options_get_selected_list ();
- GSList *nodetmp;
- GSList *option = optionsList;
- while (option != NULL)
- {
- gchar *id = (char *) option->data;
- if (!strcmp(id, optionname))
- {
- nodetmp = option->next;
- g_free (id);
- optionsList = g_slist_remove_link (optionsList, option);
- g_slist_free_1 (option);
- option=nodetmp;
- }
- else
- option = option->next;
- }
- xkb_options_set_selected_list (optionsList);
- clear_xkb_elements_list (optionsList);
-}
-
-/* Return true if optionname describes a string already in the backend's
- list of selected options */
-static gboolean
-xkb_options_is_selected (gchar *optionname)
-{
- gboolean retval = FALSE;
- GSList *optionsList = xkb_options_get_selected_list ();
- GSList *option;
- for (option = optionsList ; option != NULL ; option = option->next)
- {
- if (!strcmp ((gchar*)option->data, optionname))
- retval = TRUE;
- }
- clear_xkb_elements_list (optionsList);
- return retval;
-}
-
-/* Update xkb backend to reflect the new UI state */
-static void
-option_toggled_cb (GtkWidget *checkbutton, gpointer data)
-{
- gpointer optionID = g_object_get_data (G_OBJECT (checkbutton), OPTION_ID_PROP);
- if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (checkbutton)))
- xkb_options_select (optionID);
- else
- xkb_options_deselect (optionID);
-}
-
-/* Update UI state from xkb backend */
-static void
-option_update_cb (GConfClient * client,
- guint cnxn_id, GConfEntry * entry, gpointer data)
-{
- GtkToggleButton *toggle = GTK_TOGGLE_BUTTON (data);
- GtkWidget *expander = xkb_options_get_expander (GTK_WIDGET (toggle));
- gboolean old_state = gtk_toggle_button_get_active (toggle);
- gboolean new_state = xkb_options_is_selected (
- g_object_get_data (G_OBJECT (toggle), OPTION_ID_PROP));
- int old_gstate = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (toggle), GCONFSTATE_PROP));
- int state_diff = new_state - old_gstate;
-
- if (GTK_WIDGET_TYPE (toggle) == GTK_TYPE_RADIO_BUTTON &&
- old_state == TRUE && new_state == FALSE)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (g_object_get_data (G_OBJECT (toggle), "NoneRadio")), TRUE);
- else
- gtk_toggle_button_set_active (toggle, new_state);
-
- g_object_set_data (G_OBJECT (toggle), GCONFSTATE_PROP, GINT_TO_POINTER (new_state));
- xkb_options_expander_selcounter_add (expander, state_diff);
- xkb_options_expander_highlight (expander);
-}
-
-/* Add a check_button or radio_button to control a particular option
- This function makes particular use of the current... variables at
- the top of this file. */
-static void
-xkb_options_add_option (const XklConfigItemPtr
- configItem, GladeXML * dialog)
-{
- GtkWidget *option_check;
- gchar *utfOptionName = xci_desc_to_utf8 (configItem);
- /* Copy this out because we'll load it into the widget with set_data */
- gchar *fullOptionName = g_strdup(
- GSwitchItKbdConfigMergeItems (current1stLevelId, configItem->name));
- gboolean initial_state;
-
- if (currentMultiSelect)
- option_check = gtk_check_button_new_with_label (utfOptionName);
- else
- {
- if (currentRadioGroup == NULL)
- {
- /* The first radio in a group is to be "Default", meaning none of
- the below options are to be included in the selected list.
- This is a HIG-compliant alternative to allowing no
- selection in the group. */
- option_check = gtk_radio_button_new_with_label (currentRadioGroup, _("Default"));
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check), TRUE);
- gtk_box_pack_start_defaults (GTK_BOX (currentVbox), option_check);
- currentRadioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON (option_check));
- currentNoneRadio = option_check;
- }
- option_check = gtk_radio_button_new_with_label (currentRadioGroup, utfOptionName);
- currentRadioGroup = gtk_radio_button_get_group (GTK_RADIO_BUTTON (option_check));
- g_object_set_data (G_OBJECT (option_check), "NoneRadio", currentNoneRadio);
- }
- g_free (utfOptionName);
-
- initial_state = xkb_options_is_selected (fullOptionName);
-
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (option_check), initial_state);
-
- g_object_set_data_full (G_OBJECT (option_check), OPTION_ID_PROP, fullOptionName, g_free);
-
- g_signal_connect (G_OBJECT (option_check), "toggled", G_CALLBACK (option_toggled_cb), NULL);
-
- gconf_client_notify_add (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_OPTIONS,
- (GConfClientNotifyFunc)
- option_update_cb, option_check, NULL, NULL);
-
- gtk_box_pack_start_defaults (GTK_BOX (currentVbox), option_check);
-
- xkb_options_expander_selcounter_add (xkb_options_get_expander (option_check), initial_state);
- g_object_set_data (G_OBJECT (option_check), GCONFSTATE_PROP, GINT_TO_POINTER (initial_state));
-}
-
-/* Add a group of options: create title and layout widgets and then
- add widgets for all the options in the group. */
-static void
-xkb_options_add_group (const XklConfigItemPtr
- configItem,
- Bool allowMultipleSelection,
- GladeXML * dialog)
-{
- GtkWidget *expander, *align, *vbox;
-
- GSList * expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
-
- gchar *utfGroupName = xci_desc_to_utf8 (configItem);
- gchar *titlemarkup = g_strconcat ("<span>", utfGroupName, "</span>", NULL);
-
- expander = gtk_expander_new (titlemarkup);
- g_object_set_data_full (G_OBJECT (expander), "utfGroupName", utfGroupName, g_free);
-
- g_free (titlemarkup);
- gtk_expander_set_use_markup (GTK_EXPANDER (expander), TRUE);
- align = gtk_alignment_new (0, 0, 1, 1);
- gtk_alignment_set_padding (GTK_ALIGNMENT (align), 6, 12, 12, 0);
- vbox = gtk_vbox_new (TRUE, 6);
- gtk_container_add (GTK_CONTAINER (align), vbox);
- gtk_container_add (GTK_CONTAINER (expander), align);
- currentVbox = vbox;
-
- currentMultiSelect = (gboolean) allowMultipleSelection;
- currentRadioGroup = NULL;
-
- current1stLevelId = configItem->name;
- XklConfigEnumOptions (configItem->name, (ConfigItemProcessFunc)
- xkb_options_add_option, dialog);
-
- xkb_options_expander_highlight (expander);
-
- expanders_list = g_slist_append (expanders_list, expander);
- g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP, expanders_list);
-}
-
-static gint
-xkb_options_expanders_compare (GtkWidget * expander1, GtkWidget * expander2)
-{
- const gchar *t1 = gtk_expander_get_label (GTK_EXPANDER (expander1));
- const gchar *t2 = gtk_expander_get_label (GTK_EXPANDER (expander2));
- return g_utf8_collate (t1, t2);
-}
-
-/* Create widgets to represent the options made available by the backend */
-void
-xkb_options_load_options (GladeXML * dialog)
-{
- GtkWidget *opts_vbox = WID ("options_vbox");
- GSList * expanders_list;
- GtkWidget * expander;
-
- /* fill the list */
- XklConfigEnumOptionGroups ((GroupProcessFunc)
- xkb_options_add_group, dialog);
- /* sort it */
- expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
- expanders_list = g_slist_sort (expanders_list, (GCompareFunc)xkb_options_expanders_compare);
- while (expanders_list)
- {
- expander = GTK_WIDGET (expanders_list->data);
- gtk_box_pack_start (GTK_BOX (opts_vbox), expander, FALSE, FALSE, 0);
- expanders_list = expanders_list->next;
- }
-
- /* just cleanup */
- expanders_list = g_object_get_data (G_OBJECT (dialog), EXPANDERS_PROP);
- g_object_set_data (G_OBJECT (dialog), EXPANDERS_PROP, NULL);
- g_slist_free (expanders_list);
-
- gtk_widget_show_all (opts_vbox);
-}
-
-/* Respond to a change in the xkb gconf settings */
-static void
-xkb_options_update (GConfClient * client,
- guint cnxn_id, GConfEntry * entry, GladeXML * dialog)
-{
- /* Updating options is handled by gconf notifies for each widget
- This is here to avoid calling it N_OPTIONS times for each gconf
- change.*/
- enable_disable_restoring (dialog);
-}
-
-void
-xkb_options_register_gconf_listener (GladeXML * dialog)
-{
- gconf_client_notify_add (xkbGConfClient,
- GSWITCHIT_KBD_CONFIG_KEY_OPTIONS,
- (GConfClientNotifyFunc)
- xkb_options_update, dialog, NULL, NULL);
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c b/capplets/keyboard/gnome-keyboard-properties-xkbpv.c
deleted file mode 100644
index bd6640ec3..000000000
--- a/capplets/keyboard/gnome-keyboard-properties-xkbpv.c
+++ /dev/null
@@ -1,121 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-keyboard-properties-xkb.c
- * Copyright (C) 2003 Sergey V. Oudaltsov
- *
- * Written by: Sergey V. Oudaltsov <svu@users.sourceforge.net>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <glade/glade.h>
-
-#include "libgswitchit/gswitchit_config.h"
-
-#include "capplet-util.h"
-
-#include "gnome-keyboard-properties-xkb.h"
-#include "libkbdraw/keyboard-drawing.h"
-
-#ifdef HAVE_X11_EXTENSIONS_XKB_H
-#include "X11/XKBlib.h"
-/**
- * BAD STYLE: Taken from xklavier_private_xkb.h
- * Any ideas on architectural improvements are WELCOME
- */
-extern Bool _XklXkbConfigPrepareNative( const XklConfigRecPtr data, XkbComponentNamesPtr componentNamesPtr );
-extern void _XklXkbConfigCleanupNative( XkbComponentNamesPtr componentNamesPtr );
-/* */
-#endif
-
-static KeyboardDrawingGroupLevel groupsLevels[] = {{0,1},{0,3},{0,0},{0,2}};
-static KeyboardDrawingGroupLevel * pGroupsLevels[] = {
-groupsLevels, groupsLevels+1, groupsLevels+2, groupsLevels+3 };
-
-GtkWidget*
-xkb_layout_preview_create_widget (GladeXML * chooserDialog)
-{
- GtkWidget *kbdraw = keyboard_drawing_new ();
-
- keyboard_drawing_set_groups_levels (KEYBOARD_DRAWING (kbdraw), pGroupsLevels);
- return kbdraw;
-}
-
-void
-xkb_layout_preview_update (GladeXML * chooserDialog)
-{
-#ifdef HAVE_X11_EXTENSIONS_XKB_H
- GtkWidget *chooser = CWID ( "xkb_layout_chooser");
- GtkWidget *availableLayoutsTree = CWID ("xkb_layouts_available");
- GtkTreeSelection *selection =
- gtk_tree_view_get_selection (GTK_TREE_VIEW (availableLayoutsTree));
- GtkTreeIter selectedIter;
- GtkTreeModel *model;
- GtkWidget *kbdraw = GTK_WIDGET (g_object_get_data (G_OBJECT (chooser), "kbdraw"));
- if (kbdraw != NULL &&
- gtk_tree_selection_get_selected (selection, &model, &selectedIter))
- {
- gchar *id;
- XklConfigRec data;
- char **p, *layout, *variant;
- int i;
- XkbComponentNamesRec componentNames;
-
- gtk_tree_model_get (model, &selectedIter, AVAIL_LAYOUT_TREE_COL_ID, &id, -1);
- XklConfigRecInit (&data);
- if (XklConfigGetFromServer (&data))
- {
- if( ( p = data.layouts ) != NULL )
- {
- for( i = data.numLayouts; --i >= 0; )
- free( *p++ );
- }
-
- if( ( p = data.variants ) != NULL )
- {
- for( i = data.numVariants; --i >= 0; )
- free( *p++ );
- }
- data.numLayouts =
- data.numVariants = 1;
- data.layouts = realloc (data.layouts, sizeof (char*));
- data.variants = realloc (data.variants, sizeof (char*));
- if (GSwitchItKbdConfigSplitItems (id, &layout, &variant)
- && variant != NULL)
- {
- data.layouts[0] = (layout == NULL) ? NULL : strdup (layout);
- data.variants[0] = (variant == NULL) ? NULL : strdup (variant);
- } else
- {
- data.layouts[0] = (id == NULL) ? NULL : strdup (id);
- data.variants[0] = NULL;
- }
- if (_XklXkbConfigPrepareNative (&data, &componentNames))
- {
- keyboard_drawing_set_keyboard (KEYBOARD_DRAWING (kbdraw), &componentNames);
-
- _XklXkbConfigCleanupNative( &componentNames );
- }
- }
- XklConfigRecDestroy (&data);
- }
-#endif
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties.c b/capplets/keyboard/gnome-keyboard-properties.c
deleted file mode 100644
index ef9a108bd..000000000
--- a/capplets/keyboard/gnome-keyboard-properties.c
+++ /dev/null
@@ -1,263 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* keyboard-properties.c
- * Copyright (C) 2000-2001 Ximian, Inc.
- * Copyright (C) 2001 Jonathan Blandford
- *
- * Written by: Bradford Hovinen <hovinen@ximian.com>
- * Rachel Hestilow <hestilow@ximian.com>
- * Jonathan Blandford <jrb@redhat.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-#include <../accessibility/keyboard/accessibility-keyboard.h>
-
-#include "gnome-keyboard-properties-xkb.h"
-
-enum
-{
- RESPONSE_APPLY = 1,
- RESPONSE_CLOSE
-};
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
- GtkSizeGroup *size_group;
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-keyboard-properties.glade", "keyboard_dialog", NULL);
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("repeat_slow_label"));
- gtk_size_group_add_widget (size_group, WID ("delay_short_label"));
- gtk_size_group_add_widget (size_group, WID ("blink_slow_label"));
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("repeat_fast_label"));
- gtk_size_group_add_widget (size_group, WID ("delay_long_label"));
- gtk_size_group_add_widget (size_group, WID ("blink_fast_label"));
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("repeat_delay_scale"));
- gtk_size_group_add_widget (size_group, WID ("repeat_speed_scale"));
- gtk_size_group_add_widget (size_group, WID ("cursor_blink_time_scale"));
-
- return dialog;
-}
-
-static GConfValue *
-blink_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- gconf_value_set_int (new_value, 2600 - gconf_value_get_int (value));
-
- return new_value;
-}
-
-static GConfValue *
-blink_to_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
- gint current_rate;
-
- current_rate = gconf_value_get_int (value);
- new_value = gconf_value_new (GCONF_VALUE_INT);
- gconf_value_set_int (new_value, CLAMP (2600 - current_rate, 100, 2500));
-
- return new_value;
-}
-
-static void
-accessibility_button_clicked (GtkWidget *widget,
- gpointer data)
-{
- GError *err = NULL;
- if (!g_spawn_command_line_async ("gnome-accessibility-keyboard-properties", &err))
- capplet_error_dialog (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
- _("There was an error launching the keyboard capplet : %s"),
- err);
-}
-
-static void
-dialog_response (GtkWidget *widget,
- gint response_id,
- GConfChangeSet *changeset)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (widget),
- "user-guide.xml",
- "goscustperiph-2");
- else if (response_id == 0)
- accessibility_button_clicked (NULL, NULL);
- else
- gtk_main_quit ();
-}
-
-static void
-setup_dialog (GladeXML *dialog,
- GConfChangeSet *changeset)
-{
- GObject *peditor;
- GnomeProgram *program;
-
- /* load all the images */
- program = gnome_program_get ();
-
- capplet_init_stock_icons ();
-
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/peripherals/keyboard/repeat", WID ("repeat_toggle"), NULL);
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("repeat_table"));
-
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/peripherals/keyboard/delay", WID ("repeat_delay_scale"),
- NULL);
-
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/peripherals/keyboard/rate", WID ("repeat_speed_scale"),
- NULL);
-
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/interface/cursor_blink", WID ("cursor_toggle"), NULL);
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("cursor_hbox"));
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/interface/cursor_blink_time", WID ("cursor_blink_time_scale"),
- "conv-to-widget-cb", blink_to_widget,
- "conv-from-widget-cb", blink_from_widget,
- NULL);
-
- /* Ergonomics */
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/typing_break/enabled", WID ("break_enabled_toggle"), NULL);
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("break_details_table"));
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/typing_break/type_time", WID ("break_enabled_spin"), NULL);
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/typing_break/break_time", WID ("break_interval_spin"), NULL);
- gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/typing_break/allow_postpone", WID ("break_postponement_toggle"), NULL);
- g_signal_connect (G_OBJECT (WID ("keyboard_dialog")), "response", (GCallback) dialog_response, changeset);
-
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("break_enabled_toggle"))->child), TRUE);
-
- setup_xkb_tabs(dialog,changeset);
-}
-
-static void
-get_legacy_settings (void)
-{
- GConfClient *client;
- gboolean val_bool, def;
- gulong val_int;
-
- client = gconf_client_get_default ();
-
- COPY_FROM_LEGACY (bool, "/gnome/desktop/peripherals/keyboard/repeat", "/Desktop/Keyboard/repeat=true");
- COPY_FROM_LEGACY (bool, "/gnome/desktop/peripherals/keyboard/click", "/Desktop/Keyboard/click=true");
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/rate", "/Desktop/Keyboard/rate=30");
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/delay", "/Desktop/Keyboard/delay=500");
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/volume", "/Desktop/Keyboard/clickvolume=0");
-#if 0
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_volume", "/Desktop/Bell/percent=50");
-#endif
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_pitch", "/Desktop/Bell/pitch=50");
- COPY_FROM_LEGACY (int, "/gnome/desktop/peripherals/keyboard/bell_duration", "/Desktop/Bell/duration=100");
- g_object_unref (G_OBJECT (client));
-}
-
-#if 0
-static void
-setup_accessibility (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GtkWidget *notebook = WID ("notebook1");
- GtkWidget *label = gtk_label_new_with_mnemonic (_("_Accessibility"));
- GtkWidget *page = setup_accessX_dialog (changeset, FALSE);
- gtk_notebook_append_page (GTK_NOTEBOOK (notebook), page, label);
-}
-#endif
-
-int
-main (int argc, char **argv)
-{
- GConfClient *client;
- GConfChangeSet *changeset;
- GladeXML *dialog;
-
- static gboolean apply_only = FALSE;
- static gboolean get_legacy = FALSE;
- static gboolean switch_to_typing_break_page = FALSE;
-
- static struct poptOption cap_options[] = {
- { "apply", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
- { "init-session-settings", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
- { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0,
- N_("Retrieve and store legacy settings"), NULL },
- { "typing-break", '\0', POPT_ARG_NONE, &switch_to_typing_break_page, 0,
- N_("Start the page with the typing break settings showing"), NULL },
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-keyboard-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_POPT_TABLE, cap_options,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- activate_settings_daemon ();
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, "/desktop/gnome/peripherals/keyboard", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- g_object_unref (client);
-
- if (get_legacy) {
- get_legacy_settings ();
- } else {
- changeset = NULL;
- dialog = create_dialog ();
- setup_dialog (dialog, changeset);
- if (switch_to_typing_break_page) {
- gtk_notebook_set_current_page (GTK_NOTEBOOK (WID ("keyboard_notebook")), 3);
- }
- capplet_set_icon (WID ("keyboard_dialog"),
- "gnome-dev-keyboard");
- gtk_widget_show (WID ("keyboard_dialog"));
- gtk_main ();
- }
-
- return 0;
-}
diff --git a/capplets/keyboard/gnome-keyboard-properties.glade b/capplets/keyboard/gnome-keyboard-properties.glade
deleted file mode 100644
index 3c420b5df..000000000
--- a/capplets/keyboard/gnome-keyboard-properties.glade
+++ /dev/null
@@ -1,1942 +0,0 @@
-<?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="keyboard_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Keyboard Preferences</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="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">0</property>
- <signal name="clicked" handler="accessibility_button_clicked" last_modification_time="Tue, 02 Jul 2002 06:58:29 GMT"/>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Accessibility...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="label">gtk-close</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</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="GtkNotebook" id="keyboard_notebook">
- <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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox22">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Repeat Keys&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox19">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label43">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="repeat_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Key presses _repeat when key is held down</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="repeat_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox24">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="repeat_delay_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Delay:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">repeat_delay_scale</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="repeat_speed_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Speed:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">repeat_speed_scale</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox25">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="delay_short_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Short&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="repeat_slow_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Slow&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox26">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHScale" id="repeat_delay_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">500 100 1500 10 10 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="repeat_speed_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">30 10 110 10 10 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkVBox" id="vbox27">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="delay_long_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Long&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="repeat_fast_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Fast&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox23">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Cursor Blinking&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label44">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="cursor_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="cursor_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Cursor _blinks in text boxes and fields</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="cursor_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="cursor_speed_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_peed:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">cursor_blink_time_scale</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox25">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="blink_slow_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Slow&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">10</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>
-
- <child>
- <widget class="GtkHScale" id="cursor_blink_time_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">1000 100 2500 200 200 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="blink_fast_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;small&gt;&lt;i&gt;Fast&lt;/i&gt;&lt;/small&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox21">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label42">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Type to test settings:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">test_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="test_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">256</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</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="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Keyboard</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkVBox" id="vbox33">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox34">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="xkb_models_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label48">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Keyboard _model:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">xkb_model</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="xkb_model">
- <property name="visible">True</property>
- <property name="editable">False</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes">Microsoft Natural Keyboard</property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_model_pick">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="xkb_layouts_panels">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox39">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label52">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Selected layouts:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">xkb_layouts_selected</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="xkb_layouts_selected">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox35">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label54">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_layouts_add">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox31">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label60">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Add...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_layouts_remove">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_layouts_up">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_layouts_down">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <placeholder/>
- </child>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="chk_separate_group_per_window">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Separate _group for each window</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox30">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <placeholder/>
- </child>
-
- <child>
- <widget class="GtkButton" id="xkb_reset_to_defaults">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox29">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-refresh</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label51">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reset To De_faults</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label46">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Layouts</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>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow7">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkViewport" id="viewport1">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <widget class="GtkVBox" id="options_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label64">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Layout Options</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>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox18">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox28">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="break_enabled_toggle">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Lock screen after a certain duration to help prevent repetitive keyboard use injuries</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Lock screen to enforce typing break&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox26">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label45">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="break_details_table">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox27">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox30">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label37">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Work interval lasts:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">break_enabled_spin</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label30">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Break interval lasts:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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">break_interval_spin</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox28">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="vbox31">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkSpinButton" id="break_enabled_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Duration of work before forcing a break</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 1 100000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="break_interval_spin">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Duration of the break when typing is disallowed</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">1 1 100000 1 10 10</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkVBox" id="vbox32">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label39">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</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</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label31">
- <property name="visible">True</property>
- <property name="label" translatable="yes">minutes</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</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">True</property>
- <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>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="break_postponement_toggle">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Check if breaks are allowed to be postponed</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">All_ow postponing of breaks</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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">True</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Typing Break</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="xkb_model_chooser">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Choose A Keyboard Model</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="default_width">450</property>
- <property name="default_height">300</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnOk">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</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="xkb_model_chooser_pane">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label58">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Models:</property>
- <property name="use_underline">True</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</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>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="models_list">
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="xkb_layout_chooser">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Choose A Layout</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">500</property>
- <property name="default_height">350</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton2">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="btnOk">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</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="GtkHPaned" id="hpaned1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
-
- <child>
- <widget class="GtkVBox" id="vbox43">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label59">
- <property name="visible">True</property>
- <property name="label" translatable="yes">A_vailable layouts:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">hpaned1</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow6">
- <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="xkb_layouts_available">
- <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>
- </widget>
- <packing>
- <property name="shrink">True</property>
- <property name="resize">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vboxPreview">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label61">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Preview:</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</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>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="shrink">True</property>
- <property name="resize">True</property>
- </packing>
- </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>
diff --git a/capplets/keyboard/keyboard-bell.png b/capplets/keyboard/keyboard-bell.png
deleted file mode 100644
index 01211339a..000000000
--- a/capplets/keyboard/keyboard-bell.png
+++ /dev/null
Binary files differ
diff --git a/capplets/keyboard/keyboard-cursor.png b/capplets/keyboard/keyboard-cursor.png
deleted file mode 100644
index a0f7b9798..000000000
--- a/capplets/keyboard/keyboard-cursor.png
+++ /dev/null
Binary files differ
diff --git a/capplets/keyboard/keyboard-repeat.png b/capplets/keyboard/keyboard-repeat.png
deleted file mode 100644
index 58a33770e..000000000
--- a/capplets/keyboard/keyboard-repeat.png
+++ /dev/null
Binary files differ
diff --git a/capplets/keyboard/keyboard-volume.png b/capplets/keyboard/keyboard-volume.png
deleted file mode 100644
index 12a18763b..000000000
--- a/capplets/keyboard/keyboard-volume.png
+++ /dev/null
Binary files differ
diff --git a/capplets/keyboard/keyboard.desktop.in.in b/capplets/keyboard/keyboard.desktop.in.in
deleted file mode 100644
index 43fdf225c..000000000
--- a/capplets/keyboard/keyboard.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Keyboard
-_Comment=Set your keyboard preferences
-Exec=gnome-keyboard-properties
-Icon=gnome-dev-keyboard
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=Keyboard
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/keyboard/use_cases.txt b/capplets/keyboard/use_cases.txt
deleted file mode 100644
index 33637eb35..000000000
--- a/capplets/keyboard/use_cases.txt
+++ /dev/null
@@ -1,42 +0,0 @@
-Preface
-
-This document describes the scenarios which have to be checked every time someone makes changes in the gnome keyboard handling modules, namely:
-
-- libxklavier (project in freedesktop.org CVS)
-- libgswitchit (virtual module in gnome.org CVS)
-- gnome-settings-daemon (module in gnome-control-center, gnome.org CVS)
-- gnome-keyboard-properties (module in gnome-control-center, gnome.org CVS)
-- gnome-keyboard-indicator (module in gnome-applets, gnome.org CVS)
-
-Changes in configuration
-
-The tests should be performed under different configurations, controlled by several variables:
-
-- "group per window" mode (GPW: on/off): visible in UI
-- "default group" (DG: switchited off - or some group selected): only in GConf
-- "keep indicators with the group" (IPW: on/off): only in GConf
-- "hidden groups" (HG: some list of groups, can be empty): only in GConf
-
-Taking that parameters DG and IPW only make sense when GPW is on, there are 5 combinations possible for the first 3 parameters. Taking that DG and IPW do not interfere, it is reasonable to test 3 combinations:
-
-- GPW: off
-- GPW: on, DG: off, IPW: off
-- GPW: on, DG: {some value}, IPW: on
-
-It is necessary to perform each test with the empty and non-empty HG. If HG is not empty, every test should be performed with both "enabled" and "hidden" groups.
-
-Test cases
-
-1. Open a terminal window. Type in some characters. Change the group using some chosen keyboard combination (default LAlt-RAlt or any other from the list of available ones). Type in some characters - ensure the group was changed.
-
-2. Same as #1 - but change the group by clicking on the indicator applet
-
-3. Same as #1 - but choose the group from the applet's menu
-
-4. Set the US group in one terminal window. Create new terminal window. Ensure the group matches the DG setting.
-
-5. Switch between two terminal windows using Alt-Tab. Ensure the behaviour matches the GPW setting and IPW setting.
-
-6. Same as #5, but switch using the panel WindowList applet.
-
-7. Change the settings in g-k-p, ensure the applet picks the changes.
diff --git a/capplets/localization/.cvsignore b/capplets/localization/.cvsignore
deleted file mode 100644
index ddb8b9ac4..000000000
--- a/capplets/localization/.cvsignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-localization.desktop
diff --git a/capplets/localization/Makefile.am b/capplets/localization/Makefile.am
deleted file mode 100644
index c295d6fb9..000000000
--- a/capplets/localization/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-bin_PROGRAMS = gnome-localization-properties
-
-gnome_localization_properties_SOURCES = \
- gnome-localization-properties.c
-
-gnome_localization_properties_LDADD = \
- $(GNOMECC_CAPPLETS_LIBS) \
- $(LOCALIZATION_CAPPLET_LIBS)
-
-@INTLTOOL_DESKTOP_RULE@
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = gnome-localization-properties.glade
-
-pixmapsdir = $(GNOMECC_PIXMAPS_DIR)
-pixmaps_DATA = \
- localization-capplet.png
-
-desktopdir = $(datadir)/applications
-desktop_in_files = localization.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(glade_DATA) $(pixmaps_DATA) $(desktop_in_files)
diff --git a/capplets/localization/gnome-localization-properties.c b/capplets/localization/gnome-localization-properties.c
deleted file mode 100644
index db2097ad0..000000000
--- a/capplets/localization/gnome-localization-properties.c
+++ /dev/null
@@ -1,1105 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* gnome-localization-properties.c
- * Copyright (C) 2003 Carlos Perelló Marín
- *
- * Written by: Carlos Perelló Marín <carlos@gnome.org>
- *
- * 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 License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <locale.h>
-#include <string.h>
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <unicode/uloc.h>
-#include <unicode/udat.h>
-#include <unicode/ucal.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-
-gboolean our_update;
-gint idx2Select = -1;
-
-#define GCONF_LOCALIZATION_ROOT_KEY "/desktop/gnome/interface"
-
-#define get_selected_languages_list() \
- gconf_client_get_list (gconf_client_get_default (), \
- GCONF_LOCALIZATION_ROOT_KEY "/languages", \
- GCONF_VALUE_STRING, NULL)
-
-#define set_selected_languages_list(list) \
- gconf_client_set_list (gconf_client_get_default (), \
- GCONF_LOCALIZATION_ROOT_KEY "/languages", \
- GCONF_VALUE_STRING, (list), NULL)
-
-#define ICU_STRING_LONG 128
-
-static void fill_region_option_menu (GladeXML *dialog);
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
-
- dialog = glade_xml_new
- (GNOMECC_DATA_DIR "/interfaces/gnome-localization-properties.glade",
- NULL, NULL);
-
- return dialog;
-}
-
-static void
-enable_disable_move_buttons_cb (GladeXML *dialog)
-{
- GtkWidget *up_button;
- GtkWidget *down_button;
- GtkWidget *tree_view;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GtkTreeModel *model;
- gboolean can_move_up;
- gboolean can_move_down;
- int nlangs;
-
- up_button = WID ("language_up_button");
- down_button = WID ("language_down_button");
- tree_view = WID ("languages_treeview");
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
- nlangs = gtk_tree_model_iter_n_children (model, NULL);
-
- can_move_up = FALSE;
- can_move_down = FALSE;
-
- if (gtk_tree_selection_get_selected (selection, NULL, &iter)) {
- GtkTreePath *path =
- gtk_tree_model_get_path (model, &iter);
- if (path != NULL) {
- int *indices = gtk_tree_path_get_indices (path);
- int idx = indices[0];
- can_move_up = idx > 0;
- can_move_down = idx < (nlangs - 1);
- gtk_tree_path_free (path);
- }
- }
- gtk_widget_set_sensitive (up_button, can_move_up);
- gtk_widget_set_sensitive (down_button, can_move_down);
-}
-
-static void
-prepare_selected_languages_tree (GladeXML * dialog)
-{
- GtkListStore *list_store;
- GtkWidget *tree_view;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
- GtkTreeSelection *selection;
-
- list_store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
- tree_view = WID ("languages_treeview");
- renderer = gtk_cell_renderer_text_new ();
- column = gtk_tree_view_column_new_with_attributes (NULL,
- renderer, "text", 0, NULL);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
- g_signal_connect_swapped (G_OBJECT (selection), "changed",
- G_CALLBACK
- (enable_disable_move_buttons_cb),
- dialog);
-
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view),
- GTK_TREE_MODEL (list_store));
- gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
-}
-
-static void
-item_toggled_cb (GtkCellRendererToggle *cell,
- gchar *path_str,
- GtkTreeModel *model)
-{
- GtkTreePath *path;
- GtkTreeIter iter;
- gboolean toggle_item;
-
- path = gtk_tree_path_new_from_string (path_str);
-
- /* get toggled iter */
- gtk_tree_model_get_iter (model, &iter, path);
- gtk_tree_model_get (model, &iter, 0, &toggle_item, -1);
-
- /* do something with the value */
- toggle_item ^= 1;
-
- /* set new value */
- gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 0,
- toggle_item, -1);
-
- /* clean up */
- gtk_tree_path_free (path);
-}
-
-static void
-prepare_available_languages_tree (GladeXML *dialog)
-{
- GtkTreeStore *tree_store;
- GtkWidget *tree_view;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
-
- tree_store = gtk_tree_store_new (4, G_TYPE_BOOLEAN, G_TYPE_STRING,
- G_TYPE_STRING, G_TYPE_BOOLEAN);
- tree_view = WID ("available_languages_treeview");
-
- gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view),
- GTK_TREE_MODEL (tree_store));
-
- /* Toggle Button */
- renderer = gtk_cell_renderer_toggle_new ();
- g_object_set (G_OBJECT (renderer), "xalign", 0.0, NULL);
- g_signal_connect (G_OBJECT (renderer), "toggled",
- G_CALLBACK (item_toggled_cb), tree_store);
- column = gtk_tree_view_column_new_with_attributes (_("Show"),
- renderer, "active", 0, "visible", 3, NULL);
-
- gtk_tree_view_column_set_sizing (GTK_TREE_VIEW_COLUMN (column),
- GTK_TREE_VIEW_COLUMN_FIXED);
- gtk_tree_view_column_set_fixed_width (GTK_TREE_VIEW_COLUMN (column), 50);
- gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
-
- /* Language tree */
- renderer = gtk_cell_renderer_text_new ();
- g_object_set (renderer, "xalign", 0.0, NULL);
- column = gtk_tree_view_column_new_with_attributes (_("Language"),
- renderer, "text", 1, NULL);
-
- gtk_tree_view_column_set_sort_column_id (column, 1);
- gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
-
- gtk_tree_view_set_expander_column (GTK_TREE_VIEW (tree_view), column);
-}
-
-static void
-fill_selected_languages_tree (GladeXML * dialog)
-{
- GSList *langs;
- GSList *cur_lang;
- GtkListStore *list_store;
- gchar *locale;
- gchar *plocale;
- gchar *split;
-
- list_store = GTK_LIST_STORE (gtk_tree_view_get_model
- (GTK_TREE_VIEW (WID ("languages_treeview"))));
- gtk_list_store_clear (list_store);
-
- langs = get_selected_languages_list ();
-
- if (langs == NULL) { /* We get the environment preferences */
- locale = g_strdup (setlocale (LC_MESSAGES, NULL));
- plocale = locale;
- while (locale != NULL) {
- split = strchr (locale, ':');
- if (split) {
- *split = '\0';
- split++;
- }
- langs = g_slist_append (langs, locale);
- locale = split;
- }
- g_free (plocale);
-
- if (langs) {
- set_selected_languages_list (langs);
- }
- }
-
- for (cur_lang = langs; cur_lang != NULL; cur_lang = cur_lang->next) {
- GtkTreeIter iter;
- gunichar2 name[ICU_STRING_LONG];
- gchar *name_utf8;
- UErrorCode status;
-
- locale = (char *) cur_lang->data;
- status = U_ZERO_ERROR;
-
- uloc_getDisplayName (locale, locale, name,
- ICU_STRING_LONG, &status);
- /* Change the first letter to uppercase */
- name[0] = g_unichar_toupper (name[0]);
- name_utf8 = g_utf16_to_utf8 (name, -1, NULL, NULL, NULL);
-
- gtk_list_store_append (list_store, &iter);
-
- gtk_list_store_set (list_store, &iter,
- 0, name_utf8 ? name_utf8 : locale,
- 1, locale, -1);
- g_free (name_utf8);
- }
- if (idx2Select != -1) {
- GtkTreeSelection *selection;
- GtkTreePath *path;
-
- selection = gtk_tree_view_get_selection ((GTK_TREE_VIEW
- (WID ("languages_treeview"))));
- path = gtk_tree_path_new_from_indices (idx2Select, -1);
- gtk_tree_selection_select_path (selection, path);
- gtk_tree_path_free (path);
- idx2Select = -1;
- }
- enable_disable_move_buttons_cb (dialog);
-}
-
-static void
-fill_available_languages_tree (GladeXML *dialog)
-{
- GtkTreeStore *tree_store;
- gint32 nlocales;
- gint32 i;
- GSList *langs;
-
- tree_store = GTK_TREE_STORE (gtk_tree_view_get_model
- (GTK_TREE_VIEW (WID ("available_languages_treeview"))));
- gtk_tree_store_clear (tree_store);
-
- nlocales = uloc_countAvailable ();
- langs = get_selected_languages_list ();
-
- for (i = 0; i < nlocales; i++) {
- UErrorCode status;
- const gchar *locale;
- gunichar2 name[ICU_STRING_LONG];
- gchar *name_utf8;
- GtkTreeIter iter;
- GtkTreeIter child_iter;
-
- status = U_ZERO_ERROR;
- locale = uloc_getAvailable (i);
- if (uloc_getVariant (locale, NULL, 0, &status)) {
- continue; /* We don't handle the variant locales */
- }
-
- status = U_ZERO_ERROR;
-
- if (!uloc_getCountry (locale, NULL, 0, &status)) {
-
- uloc_getDisplayLanguage (locale, locale, name,
- ICU_STRING_LONG, &status);
- name[0] = g_unichar_toupper (name[0]);
- name_utf8 = g_utf16_to_utf8 (name, -1,
- NULL, NULL, NULL);
-
- gtk_tree_store_append (tree_store, &iter, NULL);
- if (g_slist_find_custom
- (langs, locale, (GCompareFunc) strcmp)) {
- gtk_tree_store_set (tree_store, &iter,
- 0, TRUE, 1, name_utf8,
- 2, locale, 3, TRUE, -1);
- } else {
- gtk_tree_store_set (tree_store, &iter,
- 0, FALSE, 1, name_utf8,
- 2, locale, 3, TRUE, -1);
- }
- } else {
- status = U_ZERO_ERROR;
-
- uloc_getDisplayCountry (locale, locale, name,
- ICU_STRING_LONG, &status);
- name_utf8 = g_utf16_to_utf8 (name, -1,
- NULL, NULL, NULL);
-
- gtk_tree_store_append (tree_store, &child_iter, &iter);
- if (g_slist_find_custom
- (langs, locale, (GCompareFunc) strcmp)) {
- gtk_tree_store_set (tree_store, &child_iter,
- 0, TRUE, 1, name_utf8,
- 2, locale, 3, TRUE, -1);
- } else {
- gtk_tree_store_set (tree_store, &child_iter,
- 0, FALSE, 1, name_utf8,
- 2, locale, 3, TRUE, -1);
- }
- }
- }
-}
-
-static void
-update_warning_box (GladeXML *dialog)
-{
- GtkWidget *warning;
-
- warning = WID ("warning_hbox");
- gtk_widget_show (warning);
-}
-
-static void
-update_info_box (GladeXML *dialog, const gchar *lang, const gchar *region)
-{
- GtkWidget *info;
- gchar main_lang[5];
- gchar region_lang[5];
- UErrorCode status;
-
- info = WID ("info_hbox");
-
- if (lang == NULL || region == NULL) {
- gtk_widget_show (info);
- return;
- }
- status = U_ZERO_ERROR;
- uloc_getLanguage (lang, main_lang, 5, &status);
- uloc_getLanguage (region, region_lang, 5, &status);
-
- if (strcmp (main_lang, region_lang)) {
- gtk_widget_show (info);
- } else {
- gtk_widget_hide (info);
- }
-
-}
-
-static void
-languages_changed_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, GladeXML *dialog)
-{
- GSList *langs;
- const gchar *region;
-
- if (our_update) {
- our_update = FALSE;
- } else {
- fill_selected_languages_tree (dialog);
- fill_available_languages_tree (dialog);
- }
- langs = gconf_value_get_list (entry->value);
- region = gconf_client_get_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region", NULL);
-
- update_warning_box (dialog);
- update_info_box (dialog, langs->data, region);
-
- fill_region_option_menu (dialog);
-}
-
-static void
-languages_sorted_cb (GtkWidget *widget,
- GdkDragContext *context,
- GladeXML *dialog)
-{
- GSList *old_langs;
- GSList *new_langs;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean changed, more_rows;
- gchar *code;
- guint len, i;
- const gchar *region;
-
- tree_view = WID ("languages_treeview");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- old_langs = get_selected_languages_list ();
- new_langs = NULL;
- len = g_slist_length (old_langs);
- changed = FALSE;
- if (gtk_tree_model_get_iter_first (model, &iter)) {
- more_rows = TRUE;
- for (i = 0; i < len && more_rows; i++) {
- gtk_tree_model_get (model, &iter, 1, &code, -1);
- if (strcmp (code, (const gchar *)g_slist_nth_data (old_langs, i))) {
- changed = TRUE;
- }
- new_langs = g_slist_append (new_langs, code);
- more_rows = gtk_tree_model_iter_next (model, &iter);
- }
- if (changed) {
- our_update = TRUE;
- set_selected_languages_list (new_langs);
- enable_disable_move_buttons_cb (dialog);
-
- region = gconf_client_get_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region", NULL);
-
- update_warning_box (dialog);
- update_info_box (dialog, new_langs->data, region);
- }
- }
-}
-
-static void
-change_languages_cb (GtkWidget *button, GladeXML *dialog)
-{
- GtkWidget *chooser;
- GtkWidget *main_capplet;
-
- chooser = WID ("available_languages_dialog");
- main_capplet = WID ("localization_dialog");
-
- gtk_window_set_transient_for (GTK_WINDOW (chooser),
- GTK_WINDOW (main_capplet));
- if (gtk_dialog_run (GTK_DIALOG (chooser)) == GTK_RESPONSE_OK) {
- GSList *langs;
- GSList *cur_lang;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkTreeIter child_iter;
- gboolean selected, changed;
- gchar *code;
-
- tree_view = WID ("available_languages_treeview");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- changed = FALSE;
- if (gtk_tree_model_get_iter_first (model, &iter)) {
- langs = get_selected_languages_list ();
- do {
- gtk_tree_model_get (model, &iter,
- 0, &selected, 2, &code, -1);
- cur_lang = g_slist_find_custom (langs,
- code, (GCompareFunc) strcmp);
-
- if (cur_lang && !selected) {
- langs = g_slist_delete_link
- (langs, cur_lang);
- changed = TRUE;
- } else if (!cur_lang && selected) {
- langs = g_slist_append
- (langs, code);
- changed = TRUE;
- } else {
- g_free (code);
- }
- if (gtk_tree_model_iter_children
- (model, &child_iter, &iter)) {
- do {
- gtk_tree_model_get (model,
- &child_iter,
- 0, &selected,
- 2, &code, -1);
- cur_lang = g_slist_find_custom
- (langs, code,
- (GCompareFunc) strcmp);
-
- if (cur_lang && !selected) {
- langs = g_slist_delete_link
- (langs, cur_lang);
- changed = TRUE;
- } else if (!cur_lang && selected) {
- langs = g_slist_append
- (langs, code);
- changed = TRUE;
- } else {
- g_free (code);
- }
- } while (gtk_tree_model_iter_next (model, &child_iter));
- }
- } while (gtk_tree_model_iter_next (model, &iter));
- }
- if (changed) {
- set_selected_languages_list (langs);
- }
- gtk_widget_hide (chooser);
- } else {
- gtk_widget_hide (chooser);
- }
-}
-
-static void
-language_move (GladeXML * dialog, int offset)
-{
- GtkTreeSelection *selection;
- GtkTreeIter siter;
- GtkTreeModel *model;
- GSList *langs;
- GtkTreePath *path;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW
- (WID ("languages_treeview")));
-
- if (gtk_tree_selection_get_selected (selection, &model, &siter)) {
- path = gtk_tree_model_get_path (model, &siter);
- if (path != NULL) {
- int *indices;
- char *id;
- GSList *node;
-
- id = NULL;
-
- langs = get_selected_languages_list ();
- indices = gtk_tree_path_get_indices (path);
- node = g_slist_nth (langs, indices[0]);
-
- langs = g_slist_remove_link (langs, node);
-
- id = (char *) node->data;
- g_slist_free_1 (node);
-
- langs = g_slist_insert (langs, id, indices[0] + offset);
- idx2Select = indices[0] + offset;
-
- set_selected_languages_list (langs);
- gtk_tree_path_free (path);
- }
- }
-}
-
-static void
-language_up_cb (GtkWidget *button, GladeXML *dialog)
-{
- language_move (dialog, -1);
-}
-
-static void
-language_down_cb (GtkWidget *button, GladeXML *dialog)
-{
- language_move (dialog, +1);
-}
-
-static void
-menu_item_activated_cb (GtkMenuItem *menu_item, GladeXML *dialog)
-{
- const gchar *locale;
-
- locale = g_object_get_data (G_OBJECT (menu_item), "itemId");
- gconf_client_set_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region",
- locale, NULL);
-}
-
-static void
-submenu_selected_cb (GtkMenu *menu, GladeXML *dialog)
-{
- GtkWidget *menu_item;
- GtkWidget *optionmenu;
- const gchar *locale;
-
- optionmenu = WID ("region_optionmenu");
- menu_item = gtk_menu_get_active (menu);
- locale = g_object_get_data (G_OBJECT (menu_item), "itemId");
- gconf_client_set_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region",
- locale, NULL);
- fill_region_option_menu (dialog);
-// gtk_option_menu_set_history (GTK_OPTION_MENU (optionmenu), 0);
-}
-
-static void
-update_region_examples (GladeXML *dialog, const gchar *region)
-{
- UErrorCode status;
- gunichar2 str[ICU_STRING_LONG];
- gchar *str_utf8;
- UCalendar *cal;
- UDate date;
- GtkWidget *label;
- UDateFormat* dfmt;
- UNumberFormat* nf;
- double number;
-
- status = U_ZERO_ERROR;
-
- cal = ucal_open (NULL, -1, region, UCAL_TRADITIONAL, &status);
- ucal_setDateTime (cal, 2004, UCAL_JANUARY, 2, 12, 34, 0, &status);
- date = ucal_getMillis (cal, &status);
-
- /* Full date label */
- status = U_ZERO_ERROR;
- dfmt = udat_open(UDAT_NONE, UDAT_FULL, region,
- NULL, -1, NULL, -1, &status);
- udat_format(dfmt, date, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("full_date_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-
- /* Medium date label */
- status = U_ZERO_ERROR;
- dfmt = udat_open(UDAT_NONE, UDAT_MEDIUM, region,
- NULL, -1, NULL, -1, &status);
- udat_format(dfmt, date, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("medium_date_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-
- /* Short date label */
- status = U_ZERO_ERROR;
- dfmt = udat_open(UDAT_NONE, UDAT_SHORT, region,
- NULL, -1, NULL, -1, &status);
- udat_format(dfmt, date, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("short_date_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-
- /* Short time AM label */
- status = U_ZERO_ERROR;
- dfmt = udat_open(UDAT_SHORT, UDAT_NONE, region,
- NULL, -1, NULL, -1, &status);
- udat_format(dfmt, date, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("am_time_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-
- /* Short time AM label */
- status = U_ZERO_ERROR;
- ucal_setDateTime (cal, 2004, UCAL_JANUARY, 2, 4, 56, 0, &status);
- date = ucal_getMillis (cal, &status);
- dfmt = udat_open(UDAT_SHORT, UDAT_NONE, region,
- NULL, -1, NULL, -1, &status);
- udat_format(dfmt, date, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("pm_time_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-
- /* Currency label */
- number = 1234.56;
- status = U_ZERO_ERROR;
- nf = unum_open(UNUM_CURRENCY, NULL, -1, region, NULL, &status);
- unum_formatDouble(nf, number, str, ICU_STRING_LONG, NULL, &status);
- str_utf8 = g_utf16_to_utf8 (str, -1, NULL, NULL, NULL);
- label = WID ("currency_label");
- gtk_label_set_text (GTK_LABEL(label), str_utf8);
- g_free (str_utf8);
-}
-
-static void
-fill_region_option_menu (GladeXML *dialog)
-{
- GSList *langs;
- gchar main_lang[5];
- UErrorCode status;
- const gchar *selected_region;
- GtkWidget *menu;
- GtkWidget *submenu;
- GtkWidget *menu_item;
- gboolean show_all;
- gint32 nlocales;
- gint32 i;
- gboolean has_childs;
- gboolean selected_region_added;
- GtkWidget *selected_region_mitem;
- GList *pitem_node;
- gint position;
-
- langs = get_selected_languages_list ();
- status = U_ZERO_ERROR;
-
- uloc_getLanguage ((gchar *)langs->data, main_lang, 5, &status);
- selected_region = gconf_client_get_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region", NULL);
-
- if (selected_region == NULL) { /* We get the environment preferences */
- selected_region = setlocale (LC_TIME, NULL);
- if (selected_region) {
- gconf_client_set_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region",
- selected_region, NULL);
- return; /* The GConf event will update the menu */
- } else {
- /* FIXME: What default should we use? */
- selected_region = (gchar *) langs->data;
- }
- }
- selected_region_added = FALSE;
- selected_region_mitem = NULL;
-
- show_all = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON
- (WID ("show_all_checkbutton")));
-
- /* FIXME: Is there a way to reuse the old menu? */
- menu = gtk_menu_new ();
- submenu = NULL;
- menu_item = NULL;
-
- nlocales = uloc_countAvailable ();
- has_childs = FALSE;
-
- for (i = 0; i < nlocales; i++) {
- const gchar *locale;
- gunichar2 name[ICU_STRING_LONG];
- gchar *name_utf8;
- gint position;
-
- locale = uloc_getAvailable (i);
-
- if (uloc_getVariant (locale, NULL, 0, &status)) {
- continue; /* We don't handle the variant locales */
- }
-
- status = U_ZERO_ERROR;
-
- if (!uloc_getCountry (locale, NULL, 0, &status)) {
- /* We remove the last country submenu
- * if it does not have childs
- */
- if (!has_childs && menu_item) {
- gtk_menu_item_remove_submenu
- (GTK_MENU_ITEM (menu_item));
- g_signal_connect
- (menu_item, "activate",
- G_CALLBACK (menu_item_activated_cb),
- dialog);
- }
-
- /* If it's the main language selected
- * we just add their childs to the root menu
- */
- if (strcmp (locale, main_lang) == 0 &&
- strcmp ((gchar *)langs->data,
- main_lang)) {
- has_childs = TRUE;
- submenu = menu;
- continue;
- } else if (!show_all) {
- has_childs = TRUE;
- submenu = NULL;
- continue;
- }
-
- status = U_ZERO_ERROR;
- uloc_getDisplayLanguage (locale, (gchar *)langs->data,
- name, ICU_STRING_LONG, &status);
- name[0] = g_unichar_toupper (name[0]);
- name_utf8 = g_utf16_to_utf8 (name, -1,
- NULL, NULL, NULL);
-
- if (selected_region_added) {
- position = 2;
- } else {
- position = 0;
- }
- pitem_node = g_list_nth (GTK_MENU_SHELL (menu)->children,
- position);
-
- for (position = selected_region_added ? 2 : 0;
- pitem_node != NULL;
- position++,
- pitem_node = pitem_node->next) {
- GtkWidget *label;
- const gchar *plocale;
- const gchar *txt;
-
- menu_item = GTK_WIDGET (pitem_node->data);
-
- plocale = g_object_get_data
- (G_OBJECT (menu_item), "itemId");
-
- status = U_ZERO_ERROR;
- if (!uloc_getCountry (plocale, NULL, 0, &status)) {
- label = GTK_BIN (menu_item)->child;
- txt = gtk_label_get_text (GTK_LABEL (label));
-
- /* FIXME: We must call setlocale */
- if (g_utf8_collate (txt, name_utf8) > 0) {
- break;
- }
- } else {
- /* We jump the main_locale regions */
- continue;
- }
- }
-
- menu_item = gtk_menu_item_new_with_label (name_utf8);
- g_object_set_data_full (G_OBJECT (menu_item), "itemId",
- g_strdup (locale),
- (GDestroyNotify) g_free);
-
- gtk_menu_shell_insert (GTK_MENU_SHELL (menu),
- GTK_WIDGET (menu_item), position);
- submenu = gtk_menu_new ();
- g_signal_connect (submenu, "selection-done",
- G_CALLBACK (submenu_selected_cb), dialog);
- gtk_menu_item_set_submenu (GTK_MENU_ITEM (menu_item), submenu);
- has_childs = FALSE;
- } else {
- status = U_ZERO_ERROR;
- has_childs = TRUE;
-
- uloc_getDisplayCountry (locale, (gchar *)langs->data,
- name, ICU_STRING_LONG, &status);
- name_utf8 = g_utf16_to_utf8 (name, -1,
- NULL, NULL, NULL);
-
- if (!strcmp (locale, selected_region) && menu != submenu) {
- /* This is the selected region, we must
- * add it also to the root menu
- */
- gunichar2 language[ICU_STRING_LONG];
- gchar *language_utf8;
- gchar *label;
-
- uloc_getDisplayLanguage (selected_region,
- (gchar *)langs->data,
- language, ICU_STRING_LONG,
- &status);
- language_utf8 = g_utf16_to_utf8 (language,
- -1, NULL, NULL, NULL);
-
- label = g_strdup_printf ("%s (%s)",
- name_utf8,
- language_utf8);
-
- g_free (language_utf8);
-
- menu_item = gtk_menu_item_new_with_label (label);
- selected_region_mitem = menu_item;
- g_free (label);
- g_object_set_data_full (G_OBJECT (menu_item),
- "itemId",
- g_strdup (selected_region),
- (GDestroyNotify) g_free);
-
- gtk_menu_shell_insert (GTK_MENU_SHELL (menu),
- GTK_WIDGET (menu_item), 0);
-
- menu_item = gtk_separator_menu_item_new ();
- gtk_menu_shell_insert (GTK_MENU_SHELL (menu),
- GTK_WIDGET (menu_item), 1);
-
- selected_region_added = TRUE;
- }
-
- if (!(show_all || menu == submenu)) {
- continue;
- }
-
- if (menu == submenu && selected_region_added) {
- position = 2;
- } else {
- position = 0;
- }
-
- pitem_node = g_list_nth (GTK_MENU_SHELL (submenu)->children,
- position);
-
- for ( ; pitem_node != NULL;
- position++,
- pitem_node = pitem_node->next) {
- GtkWidget *label;
- const gchar *plocale;
- const gchar *txt;
-
- menu_item = GTK_WIDGET (pitem_node->data);
- plocale = g_object_get_data
- (G_OBJECT (menu_item), "itemId");
-
- status = U_ZERO_ERROR;
- if (!uloc_getCountry (plocale, NULL, 0, &status)) {
- /* Here starts the other regions != main_language */
- break;
- }
- label = GTK_BIN (menu_item)->child;
- txt = gtk_label_get_text (GTK_LABEL (label));
- /* FIXME: We must call setlocale */
- if (g_utf8_collate (txt, name_utf8) > 0) {
- break;
- }
- }
-
- menu_item = gtk_menu_item_new_with_label (name_utf8);
- if (menu == submenu) {
- if (!strcmp (selected_region, locale)) {
- selected_region_mitem = menu_item;
- }
- g_signal_connect (menu_item, "activate",
- G_CALLBACK (menu_item_activated_cb),
- dialog);
- }
- g_object_set_data_full (G_OBJECT (menu_item), "itemId",
- g_strdup (locale),
- (GDestroyNotify) g_free);
- gtk_menu_shell_insert (GTK_MENU_SHELL (submenu),
- GTK_WIDGET (menu_item), position);
- }
- }
-
- if (selected_region_mitem) {
- pitem_node = GTK_MENU_SHELL (menu)->children;
- position = g_list_index (pitem_node, selected_region_mitem);
- if (position == -1) {
- /* FIXME: We have a problem.... */
- position = 0;
- }
- } else {
- /* FIXME: The user has a non valid region */
- position = 0;
- }
-
- /* We remove the old menu */
- gtk_option_menu_remove_menu (GTK_OPTION_MENU (WID ("region_optionmenu")));
- /* Add the new menu */
- gtk_option_menu_set_menu (GTK_OPTION_MENU (WID ("region_optionmenu")),
- GTK_WIDGET (menu));
- gtk_option_menu_set_history (GTK_OPTION_MENU
- (WID ("region_optionmenu")), position);
- gtk_widget_show_all (menu);
-
- update_region_examples (dialog, selected_region);
-}
-
-static void
-show_all_regions_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, GladeXML *dialog)
-{
- /* We just refresh the region_optionmenu */
- fill_region_option_menu (dialog);
-}
-
-static void
-region_changed_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, GladeXML *dialog)
-{
- GSList *langs;
- gchar *selected_region;
-
- langs = get_selected_languages_list ();
- selected_region = g_strdup (gconf_value_get_string (entry->value));
-
- update_info_box (dialog, langs->data, selected_region);
-
- g_free (selected_region);
-
- /* Updates the optionmenu */
- fill_region_option_menu (dialog);
-
-}
-
-static void
-dialog_response (GtkWidget *widget,
- gint response_id,
- GConfChangeSet *changeset)
-{
- if (response_id == GTK_RESPONSE_HELP) {
- /* FIXME: What should we add here? */
-/* capplet_help (GTK_WINDOW (widget),
- "user-guide.xml",
- "goscustperiph-2");*/
- } else {
- gtk_main_quit ();
- }
-}
-
-static void
-setup_dialog (GladeXML *dialog,
- GConfChangeSet *changeset)
-{
- GObject *peditor;
- GnomeProgram *program;
- GSList *langs;
- const gchar *region;
-
- /* load all the images */
- program = gnome_program_get ();
-
- capplet_init_stock_icons ();
-
- /* Language Tab */
-
- /* Flag to ignore our own updates when sorting the language list */
- our_update = FALSE;
-
- prepare_selected_languages_tree (dialog);
- prepare_available_languages_tree (dialog);
-
- fill_selected_languages_tree (dialog);
- fill_available_languages_tree (dialog);
-
- gconf_client_notify_add (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/languages",
- (GConfClientNotifyFunc) languages_changed_cb,
- dialog, NULL, NULL);
-
- g_signal_connect (G_OBJECT (WID ("languages_treeview")), "drag_end",
- G_CALLBACK (languages_sorted_cb), dialog);
- g_signal_connect (G_OBJECT (WID ("change_languages_button")), "clicked",
- G_CALLBACK (change_languages_cb), dialog);
- g_signal_connect (G_OBJECT (WID ("language_up_button")), "clicked",
- G_CALLBACK (language_up_cb), dialog);
- g_signal_connect (G_OBJECT (WID ("language_down_button")), "clicked",
- G_CALLBACK (language_down_cb), dialog);
-
- /* Formats Tab */
- fill_region_option_menu (dialog);
-
- peditor = gconf_peditor_new_boolean
- (changeset, GCONF_LOCALIZATION_ROOT_KEY "/show_all_regions",
- WID ("show_all_checkbutton"), NULL);
-
- gconf_client_notify_add (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/show_all_regions",
- (GConfClientNotifyFunc) show_all_regions_cb,
- dialog, NULL, NULL);
-
- gconf_client_notify_add (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region",
- (GConfClientNotifyFunc) region_changed_cb,
- dialog, NULL, NULL);
-
- langs = get_selected_languages_list();
- region = gconf_client_get_string (gconf_client_get_default (),
- GCONF_LOCALIZATION_ROOT_KEY "/region", NULL);
-
- update_info_box (dialog, langs->data, region);
-
- /* Dialog action buttons */
- g_signal_connect (G_OBJECT (WID ("localization_dialog")), "response",
- G_CALLBACK (dialog_response), changeset);
-
-}
-
-int
-main (int argc, char **argv)
-{
- GConfClient *client;
- GConfChangeSet *changeset;
- GladeXML *dialog;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-localization-properties", VERSION, LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- activate_settings_daemon ();
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, GCONF_LOCALIZATION_ROOT_KEY, GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- changeset = NULL;
- dialog = create_dialog ();
- setup_dialog (dialog, changeset);
- capplet_set_icon (WID ("localization_dialog"), "localization-capplet.png");
- gtk_widget_show (WID ("localization_dialog"));
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/localization/gnome-localization-properties.glade b/capplets/localization/gnome-localization-properties.glade
deleted file mode 100644
index a3242722d..000000000
--- a/capplets/localization/gnome-localization-properties.glade
+++ /dev/null
@@ -1,1024 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="localization_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Language and Culture Preferences</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">False</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_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="GtkNotebook" id="keyboard_notebook">
- <property name="border_width">6</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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="languages_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Languages in use:&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox19">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox50">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow5">
- <property name="width_request">250</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="languages_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">True</property>
- <property name="enable_search">False</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="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="language_up_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-up</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="language_down_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-go-down</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- </child>
- </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>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label77">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Drag languages to set the preferred
-order of use; If there exists a
-translation in the first language it will
-be used, otherwise the next will be tried</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox30">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="change_languages_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">C_hange languages in use...</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>
-
- <child>
- <widget class="GtkHBox" id="warning_hbox">
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-warning</property>
- <property name="icon_size">4</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkLabel" id="label53">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Changes will not take effect for the
-desktop's bars and menus before
-next time you log in. Changes take
-effect in applications next time you
-run them.</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.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">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="info_hbox">
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-info</property>
- <property name="icon_size">4</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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>
-
- <child>
- <widget class="GtkLabel" id="label54">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Your preferred language differs
-from that of your currently
-selected date, time, and number
-formats. You can change your
-formats in the Formats tab.</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.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">False</property>
- </packing>
- </child>
- </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">True</property>
- <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>
- </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">Language</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkVBox" id="vbox14">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkHBox" id="hbox32">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="region_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Region:</property>
- <property name="use_underline">True</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">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">region_optionmenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="region_optionmenu">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="show_all_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Show _all regions</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox38">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="dates_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Dates&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox35">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox39">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="full_date_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Thursday, January 2, 2003</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</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>
-
- <child>
- <widget class="GtkLabel" id="medium_date_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Jan 2, 2003</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</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>
-
- <child>
- <widget class="GtkLabel" id="short_date_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">1/2/03</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox46">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="button5">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Customize _dates...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</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>
- <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>
-
- <child>
- <widget class="GtkVBox" id="vbox45">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="times_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Times&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox36">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox48">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="am_time_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">12:34 AM</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</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>
-
- <child>
- <widget class="GtkLabel" id="pm_time_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">4:56 PM</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox49">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="button6">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Customize _times...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</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>
- <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>
-
- <child>
- <widget class="GtkVBox" id="vbox40">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="numbers_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Numbers&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox37">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="currency_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">$1,234.56</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button7">
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Customize _numbers...</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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox38">
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label78">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Measurement _Units:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">12</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">measure_optionmenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="measure_optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</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>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Formats</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="available_languages_dialog">
- <property name="border_width">6</property>
- <property name="title" translatable="yes">Available Languages</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">True</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <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="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="cancelbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="okbutton1">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-5</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="vbox44">
- <property name="border_width">6</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label76">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Select the items that appear in the Languages list:</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</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>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow6">
- <property name="height_request">250</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="available_languages_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">True</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">True</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/localization/localization-capplet.png b/capplets/localization/localization-capplet.png
deleted file mode 100644
index 35ebd6e50..000000000
--- a/capplets/localization/localization-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/localization/localization.desktop.in.in b/capplets/localization/localization.desktop.in.in
deleted file mode 100644
index 1d9fcd608..000000000
--- a/capplets/localization/localization.desktop.in.in
+++ /dev/null
@@ -1,14 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Language and Culture
-_Comment=Set your language and culture preferences
-Exec=gnome-localization-properties
-Icon=localization-capplet.png
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/mime-type/ChangeLog b/capplets/mime-type/ChangeLog
deleted file mode 100644
index 18b71483d..000000000
--- a/capplets/mime-type/ChangeLog
+++ /dev/null
@@ -1,112 +0,0 @@
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * mime-data.c (get_mime_clist): Set clist to reasonable default size.
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
diff --git a/capplets/mime-type/Makefile.am b/capplets/mime-type/Makefile.am
deleted file mode 100644
index 665c4a538..000000000
--- a/capplets/mime-type/Makefile.am
+++ /dev/null
@@ -1,30 +0,0 @@
-cappletname = mime-type
-cappletgroup = "Advanced/"
-bin_PROGRAMS = mime-type-capplet
-
-mime_type_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-mime_type_capplet_SOURCES = \
- mime-type-capplet.c\
- mime-data.h mime-data.c\
- edit-window.c edit-window.h\
- mime-info.c mime-info.h\
- new-mime-window.h new-mime-window.c
-
-pixmap_DATA =
-
-##
-## You should not need to modify anything below this line
-##
-@INTLTOOL_DESKTOP_RULE@
-@GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST)
-iconsdir = $(GNOMECC_ICONS_DIR)
-Gladedir = $(GNOMECC_GLADE_DIR)
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-Glade_DATA = $(cappletname)-properties.glade
-icons_DATA = $(cappletname)-capplet.png
-desktop = $(cappletname).desktop
-all-local: $(desktop)
diff --git a/capplets/mime-type/edit-window.c b/capplets/mime-type/edit-window.c
deleted file mode 100644
index 98dd8bb51..000000000
--- a/capplets/mime-type/edit-window.c
+++ /dev/null
@@ -1,578 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "edit-window.h"
-#include "mime-data.h"
-#include "mime-info.h"
-#include "capplet-widget.h"
-
-
-extern GtkWidget *capplet;
-extern GHashTable *user_mime_types;
-
-typedef struct {
- GtkWidget *window;
- GtkWidget *icon_entry;
- GtkWidget *mime_type;
-/* GtkWidget *ext_tag_label; */
- GtkWidget *regexp1_tag_label;
- GtkWidget *regexp2_tag_label;
-/* GtkWidget *ext_label; */
- GtkWidget *regexp1_label;
- GtkWidget *regexp2_label;
- GtkWidget *open_entry;
- GtkWidget *edit_entry;
- GtkWidget *view_entry;
- GtkWidget *ext_scroll;
- GtkWidget *ext_clist;
- GtkWidget *ext_entry;
- GtkWidget *ext_add_button;
- GtkWidget *ext_remove_button;
- MimeInfo *mi;
- MimeInfo *user_mi;
- GList *tmp_ext[2];
-} edit_window;
-static edit_window *main_win = NULL;
-static gboolean changing = TRUE;
-static void
-destruction_handler (GtkWidget *widget, gpointer data)
-{
- g_free (main_win);
- main_win = NULL;
-}
-static void
-entry_changed (GtkWidget *widget, gpointer data)
-{
- if (changing == FALSE)
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
-}
-static void
-ext_clist_selected (GtkWidget *clist, gint row, gint column, gpointer data)
-{
- gboolean deletable;
-
- deletable = GPOINTER_TO_INT (gtk_clist_get_row_data (GTK_CLIST (clist), row));
- if (deletable)
- gtk_widget_set_sensitive (main_win->ext_remove_button, TRUE);
- else
- gtk_widget_set_sensitive (main_win->ext_remove_button, FALSE);
-}
-static void
-ext_clist_deselected (GtkWidget *clist, gint row, gint column, gpointer data)
-{
- if (g_list_length (GTK_CLIST (clist)->selection) == 0)
- gtk_widget_set_sensitive (main_win->ext_remove_button, FALSE);
-}
-static void
-ext_entry_changed (GtkWidget *entry, gpointer data)
-{
- gchar *text;
- text = gtk_entry_get_text (GTK_ENTRY (entry));
- gtk_widget_set_sensitive (main_win->ext_add_button, (strlen (text) >0));
-}
-static void
-ext_add (GtkWidget *widget, gpointer data)
-{
- gchar *row[1];
- gint rownumber;
-
- row[0] = g_strdup (gtk_entry_get_text (GTK_ENTRY (main_win->ext_entry)));
- rownumber = gtk_clist_append (GTK_CLIST (main_win->ext_clist), row);
- gtk_clist_set_row_data (GTK_CLIST (main_win->ext_clist), rownumber,
- GINT_TO_POINTER (TRUE));
- gtk_entry_set_text (GTK_ENTRY (main_win->ext_entry), "");
-
- main_win->tmp_ext[0] = g_list_prepend (main_win->tmp_ext[0], row[0]);
- if (changing == FALSE)
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
-}
-static void
-ext_remove (GtkWidget *widget, gpointer data)
-{
- gint row;
- gchar *text;
- gchar *store;
- GList *tmp;
-
- text = (gchar *)g_malloc (sizeof (gchar) * 1024);
- gtk_clist_freeze (GTK_CLIST (main_win->ext_clist));
- row = GPOINTER_TO_INT (GTK_CLIST (main_win->ext_clist)->selection->data);
- gtk_clist_get_text (GTK_CLIST (main_win->ext_clist), row, 0, &text);
- store = g_strdup (text);
- gtk_clist_remove (GTK_CLIST (main_win->ext_clist), row);
-
- gtk_clist_thaw (GTK_CLIST (main_win->ext_clist));
-
- for (tmp = main_win->tmp_ext[0]; tmp; tmp = tmp->next) {
- GList *found;
-
- if (strcmp (tmp->data, store) == 0) {
- found = tmp;
-
- main_win->tmp_ext[0] = g_list_remove_link (main_win->tmp_ext[0], found);
- g_list_free_1 (found);
- break;
- }
- }
-
- if (changing == FALSE)
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
-}
-static void
-apply_entry_change (GtkWidget *entry, gchar *key, MimeInfo *mi)
-{
- const gchar *buf;
- gchar *text;
- /* buf is the value that existed before when we
- * started the capplet */
- buf = local_mime_get_value (mi->mime_type, key);
- if (buf == NULL)
- buf = gnome_mime_get_value (mi->mime_type, key);
- text = gtk_entry_get_text (GTK_ENTRY (entry));
- if (text && !*text)
- text = NULL;
-
- /* First we see if they've added something. */
- if (buf == NULL && text)
- set_mime_key_value (mi->mime_type, key, text);
- else {
- /* Has the value changed? */
- if (text && strcmp (text, buf))
- set_mime_key_value (mi->mime_type, key, text);
- else
- /* We _REALLY_ need a way to specify in
- * user.keys not to use the system defaults.
- * (ie. override the system default and
- * query it).
- * If we could then we'd set it here. */
- ;
- }
-}
-static GList*
-copy_mi_extensions (GList *orig)
-{
- GList *tmp;
- GList *list = NULL;
-
- for (tmp = orig; tmp; tmp = tmp->next) {
- list = g_list_append (list, g_strdup (tmp->data));
- }
- return list;
-}
-static void
-make_readable (MimeInfo *mi)
-{
- GList *list;
- GString *extension;
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->user_ext[0]; list; list = list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- mi->ext_readable[0] = extension->str;
- g_string_free (extension, FALSE);
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->user_ext[1]; list; list = list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- mi->ext_readable[1] = extension->str;
- g_string_free (extension, FALSE);
-}
-static void
-apply_changes (MimeInfo *mi)
-{
- GList *tmp;
- int i;
-
- apply_entry_change (gnome_icon_entry_gtk_entry (GNOME_ICON_ENTRY (main_win->icon_entry)),
- "icon-filename", mi);
- apply_entry_change (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->open_entry)),
- "open", mi);
- apply_entry_change (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->view_entry)),
- "view", mi);
- apply_entry_change (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->edit_entry)),
- "edit", mi);
-
- if (!main_win->user_mi) {
- add_to_key (mi->mime_type, "ext: tmp", user_mime_types, TRUE);
- /* the tmp extension will be removed when we copy the tmp_ext
- * stuff over the top of it.
- */
- main_win->user_mi = g_hash_table_lookup (user_mime_types,
- mi->mime_type);
- }
-
- for (i = 0; i < 2; i++) {
- if (main_win->tmp_ext[i]) {
- main_win->user_mi->user_ext[i] = copy_mi_extensions (main_win->tmp_ext[i]);
- mi->user_ext[i] = copy_mi_extensions (main_win->tmp_ext[i]);
- } else {
- main_win->user_mi->user_ext[i] = NULL;
- mi->user_ext[i] = NULL;
- }
- }
-
- make_readable (main_win->user_mi);
-
- if (! (main_win->user_mi->ext[0] || main_win->user_mi->ext[1] ||
- main_win->user_mi->user_ext[0] || main_win->user_mi->ext[1]))
- g_hash_table_remove (user_mime_types, mi->mime_type);
-
- /* Free the 2 tmp lists */
- for (i = 0; i < 2; i++) {
- if (main_win->tmp_ext[i])
- for (tmp = main_win->tmp_ext[i]; tmp; tmp = tmp->next)
- g_free (tmp->data);
- }
- if (changing == FALSE)
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
-}
-static void
-browse_callback (GtkWidget *widget, gpointer data)
-{
-}
-static void
-initialize_main_win ()
-{
- GtkWidget *align, *vbox, *hbox, *vbox2, *vbox3;
- GtkWidget *frame, *table, *label;
- GtkWidget *button;
- GString *extension;
- gchar *title[2] = {"Extensions"};
-
- main_win = g_new (edit_window, 1);
- main_win->window = gnome_dialog_new ("",
- GNOME_STOCK_BUTTON_OK,
- GNOME_STOCK_BUTTON_CANCEL,
- NULL);
- gtk_signal_connect (GTK_OBJECT (main_win->window),
- "destroy",
- destruction_handler,
- NULL);
- vbox = GNOME_DIALOG (main_win->window)->vbox;
-
- /* icon box */
- main_win->icon_entry = gnome_icon_entry_new ("mime_icon_entry", _("Select an icon..."));
- align = gtk_alignment_new (0.5, 0.5, 0.0, 0.0);
- gtk_container_add (GTK_CONTAINER (align), main_win->icon_entry);
- gtk_signal_connect (GTK_OBJECT (gnome_icon_entry_gtk_entry (GNOME_ICON_ENTRY (main_win->icon_entry))),
- "changed",
- entry_changed,
- NULL);
- gtk_box_pack_start (GTK_BOX (vbox), align, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("Mime Type: ")), FALSE, FALSE, 0);
- main_win->mime_type = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (hbox), main_win->mime_type, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- /* extension/regexp */
- vbox2 = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (vbox), vbox2, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- main_win->ext_clist = gtk_clist_new_with_titles (1, title);
- gtk_clist_column_titles_passive (GTK_CLIST (main_win->ext_clist));
- gtk_clist_set_auto_sort (GTK_CLIST (main_win->ext_clist), TRUE);
-
- gtk_signal_connect (GTK_OBJECT (main_win->ext_clist),
- "select-row",
- GTK_SIGNAL_FUNC (ext_clist_selected),
- NULL);
- gtk_signal_connect (GTK_OBJECT (main_win->ext_clist),
- "unselect-row",
- GTK_SIGNAL_FUNC (ext_clist_deselected),
- NULL);
- main_win->ext_scroll = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (main_win->ext_scroll),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- gtk_container_add (GTK_CONTAINER (main_win->ext_scroll),
- main_win->ext_clist);
-
- vbox3 = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- main_win->ext_add_button = gtk_button_new_with_label (_("Add"));
- gtk_signal_connect (GTK_OBJECT (main_win->ext_add_button),
- "clicked",
- GTK_SIGNAL_FUNC (ext_add),
- NULL);
- gtk_box_pack_start (GTK_BOX (vbox3), main_win->ext_add_button, FALSE, FALSE, 0);
- gtk_widget_set_sensitive (main_win->ext_add_button, FALSE);
-
- main_win->ext_remove_button = gtk_button_new_with_label (_("Remove"));
- gtk_signal_connect (GTK_OBJECT (main_win->ext_remove_button),
- "clicked",
- GTK_SIGNAL_FUNC (ext_remove),
- NULL);
- gtk_widget_set_sensitive (main_win->ext_remove_button, FALSE);
- gtk_box_pack_start (GTK_BOX (vbox3), main_win->ext_remove_button,
- FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (hbox), main_win->ext_scroll, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), vbox3, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, TRUE, TRUE, 0);
-
- main_win->ext_entry = gtk_entry_new ();
- gtk_signal_connect (GTK_OBJECT (main_win->ext_entry),
- "changed",
- ext_entry_changed,
- NULL);
- gtk_signal_connect (GTK_OBJECT (main_win->ext_entry),
- "activate",
- ext_add,
- NULL);
- gtk_box_pack_start (GTK_BOX (vbox2), main_win->ext_entry, TRUE, TRUE, 0);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- main_win->regexp1_label = gtk_label_new ("");
- main_win->regexp1_tag_label = gtk_label_new (_("First Regular Expression: "));
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), main_win->regexp1_tag_label,
- FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), main_win->regexp1_label, FALSE, FALSE, 0);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- main_win->regexp2_label = gtk_label_new ("");
- main_win->regexp2_tag_label = gtk_label_new (_("Second Regular Expression: "));
- gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), main_win->regexp2_tag_label,
- FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (hbox), main_win->regexp2_label, FALSE, FALSE, 0);
-
- /* Actions box */
- frame = gtk_frame_new (_("Mime Type Actions"));
- vbox2 = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (vbox), frame, TRUE, TRUE, 0);
- table = gtk_table_new (3, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
- gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);
- gtk_container_add (GTK_CONTAINER (frame), vbox2);
- label = gtk_label_new (_("Example: emacs %f"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label), 2, 0);
- gtk_box_pack_start (GTK_BOX (vbox2), label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
- label = gtk_label_new (_("Open"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label), 2, 0);
- gtk_table_attach_defaults (GTK_TABLE (table),
- label,
- 0, 1, 0, 1);
- main_win->open_entry = gnome_file_entry_new ("MIME_CAPPLET_OPEN", _("Select a file..."));
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->open_entry))),
- "changed",
- entry_changed,
- NULL);
-
- gtk_table_attach_defaults (GTK_TABLE (table),
- main_win->open_entry,
- 1, 2, 0, 1);
- label = gtk_label_new (_("View"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label), 2, 0);
- gtk_table_attach_defaults (GTK_TABLE (table),
- label,
- 0, 1, 1, 2);
-
- main_win->view_entry = gnome_file_entry_new ("MIME_CAPPLET_VIEW", _("Select a file..."));
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->view_entry))),
- "changed",
- entry_changed,
- NULL);
-
- gtk_table_attach_defaults (GTK_TABLE (table),
- main_win->view_entry,
- 1, 2, 1, 2);
- label = gtk_label_new (_("Edit"));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (label), 2, 0);
- gtk_table_attach_defaults (GTK_TABLE (table),
- label,
- 0, 1, 2, 3);
- main_win->edit_entry = gnome_file_entry_new ("MIME_CAPPLET_EDIT", _("Select a file..."));
- gtk_signal_connect (GTK_OBJECT (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (main_win->edit_entry))),
- "changed",
- entry_changed,
- NULL);
- gtk_table_attach_defaults (GTK_TABLE (table),
- main_win->edit_entry,
- 1, 2, 2, 3);
-}
-static void
-setup_entry (gchar *key, GtkWidget *g_entry, MimeInfo *mi)
-{
- const gchar *buf;
- GtkWidget *entry = gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (g_entry));
- buf = local_mime_get_value (mi->mime_type, key);
- if (buf == NULL)
- buf = gnome_mime_get_value (mi->mime_type, key);
- if (buf)
- gtk_entry_set_text (GTK_ENTRY (entry), buf);
- else
- gtk_entry_set_text (GTK_ENTRY (entry), "");
-}
-void
-initialize_main_win_vals (void)
-{
- MimeInfo *mi;
- gchar *title;
- gboolean showext = FALSE;
- if (main_win == NULL)
- return;
- mi = main_win->mi;
- if (mi == NULL)
- return;
- /* now we fill in the fields with the mi stuff. */
-
- changing = TRUE;
- gtk_label_set_text (GTK_LABEL (main_win->mime_type), mi->mime_type);
- gnome_icon_entry_set_icon (GNOME_ICON_ENTRY (main_win->icon_entry),
- gnome_mime_get_value (mi->mime_type,
- "icon-filename"));
-
- gtk_widget_show_all (GNOME_DIALOG (main_win->window)->vbox);
- /* we initialize everything */
- title = g_strdup_printf (_("Set actions for %s"), mi->mime_type);
- gtk_window_set_title (GTK_WINDOW (main_win->window), title);
- g_free (title);
-
- /* not sure why this is necessary */
- gtk_clist_clear (GTK_CLIST (main_win->ext_clist));
- if (mi->ext[0]) {
- GList *tmp;
- gchar *extension[1];
- gint row;
- for (tmp = mi->ext[0]; tmp; tmp = tmp->next) {
- extension[0] = g_strdup (tmp->data);
- row = gtk_clist_append (GTK_CLIST (main_win->ext_clist),
- extension);
- gtk_clist_set_row_data (GTK_CLIST (main_win->ext_clist),
- row, GINT_TO_POINTER (FALSE));
- }
- showext = TRUE;
- }
- if (mi->ext[1]) {
- GList *tmp;
- gchar *extension[1];
- gint row;
- for (tmp = mi->ext[1]; tmp; tmp = tmp->next) {
- extension[0] = g_strdup (tmp->data);
- row = gtk_clist_append (GTK_CLIST (main_win->ext_clist),
- extension);
- gtk_clist_set_row_data (GTK_CLIST (main_win->ext_clist),
- row, GINT_TO_POINTER (FALSE));
- }
- showext = TRUE;
- }
- if (main_win->tmp_ext[0]) {
- GList *tmp;
- gchar *extension[1];
- gint row;
- for (tmp = main_win->tmp_ext[0]; tmp; tmp = tmp->next) {
- extension[0] = g_strdup (tmp->data);
- row = gtk_clist_append (GTK_CLIST (main_win->ext_clist),
- extension);
- gtk_clist_set_row_data (GTK_CLIST (main_win->ext_clist),
- row, GINT_TO_POINTER (TRUE));
- }
- showext = TRUE;
- }
- if (main_win->tmp_ext[1]) {
- GList *tmp;
- gchar *extension[1];
- gint row;
- for (tmp = main_win->tmp_ext[0]; tmp; tmp = tmp->next) {
- extension[0] = g_strdup (tmp->data);
- row = gtk_clist_append (GTK_CLIST (main_win->ext_clist),
- extension);
- gtk_clist_set_row_data (GTK_CLIST (main_win->ext_clist),
- row, GINT_TO_POINTER (TRUE));
- }
- showext = TRUE;
- }
- if (!showext) {
- gtk_widget_hide (main_win->ext_clist);
- gtk_widget_hide (main_win->ext_entry);
- gtk_widget_hide (main_win->ext_add_button);
- gtk_widget_hide (main_win->ext_remove_button);
- gtk_widget_hide (main_win->ext_scroll);
- }
- if (mi->regex_readable[0])
- gtk_label_set_text (GTK_LABEL (main_win->regexp1_label),
- mi->regex_readable[0]);
- else {
- gtk_widget_hide (main_win->regexp1_label);
- gtk_widget_hide (main_win->regexp1_tag_label);
- }
- if (mi->regex_readable[1])
- gtk_label_set_text (GTK_LABEL (main_win->regexp2_label),
- mi->regex_readable[1]);
- else {
- gtk_widget_hide (main_win->regexp2_label);
- gtk_widget_hide (main_win->regexp2_tag_label);
- }
- /* initialize the entries */
- setup_entry ("open", main_win->open_entry, mi);
- setup_entry ("view", main_win->view_entry, mi);
- setup_entry ("edit", main_win->edit_entry, mi);
- changing = FALSE;
-
-}
-void
-launch_edit_window (MimeInfo *mi)
-{
- gint size;
-
- if (main_win == NULL)
- initialize_main_win ();
- main_win->mi = mi;
- main_win->user_mi = g_hash_table_lookup (user_mime_types, mi->mime_type);
- main_win->tmp_ext[0] = NULL;
- main_win->tmp_ext[1] = NULL;
- if (main_win->user_mi) {
- if (main_win->user_mi->user_ext[0])
- main_win->tmp_ext[0] = copy_mi_extensions (main_win->user_mi->user_ext[0]);
- if (main_win->user_mi->user_ext[1])
- main_win->tmp_ext[1] = copy_mi_extensions (main_win->user_mi->user_ext[1]);
- }
- initialize_main_win_vals ();
-
- switch(gnome_dialog_run (GNOME_DIALOG (main_win->window))) {
- case 0:
- apply_changes (mi);
- case 1:
- main_win->mi = NULL;
- gtk_widget_hide (main_win->window);
- break;
- }
-}
-
-void
-hide_edit_window (void)
-{
- if (main_win && main_win->mi && main_win->window)
- gtk_widget_hide (main_win->window);
-}
-void
-show_edit_window (void)
-{
- if (main_win && main_win->mi && main_win->window)
- gtk_widget_show (main_win->window);
-}
-
-
-
-
diff --git a/capplets/mime-type/edit-window.h b/capplets/mime-type/edit-window.h
deleted file mode 100644
index 626a7c6be..000000000
--- a/capplets/mime-type/edit-window.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-#include "mime-data.h"
-#ifndef _EDIT_WINDOW_H_
-#define _EDIT_WINDOW_H_
-
-
-void launch_edit_window (MimeInfo *mi);
-void initialize_main_win_vals (void);
-void hide_edit_window (void);
-void show_edit_window (void);
-
-#endif
diff --git a/capplets/mime-type/mime-data.c b/capplets/mime-type/mime-data.c
deleted file mode 100644
index a4698edae..000000000
--- a/capplets/mime-type/mime-data.c
+++ /dev/null
@@ -1,661 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "capplet-widget.h"
-#include "gnome.h"
-#include <string.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <regex.h>
-#include <ctype.h>
-#include "edit-window.h"
-#include "mime-data.h"
-#include "mime-info.h"
-#include "new-mime-window.h"
-#include <sys/stat.h>
-#include <unistd.h>
-#include <errno.h>
-
-
-/* Prototypes */
-static void mime_fill_from_file (const char *filename, gboolean init_user);
-static void mime_load_from_dir (const char *mime_info_dir, gboolean system_dir);
-void add_to_key (char *mime_type, char *def, GHashTable *table, gboolean init_user);
-static char *get_priority (char *def, int *priority);
-
-
-/* Global variables */
-static char *current_lang;
-static GHashTable *mime_types = NULL;
-static GHashTable *initial_user_mime_types = NULL;
-GHashTable *user_mime_types = NULL;
-static GtkWidget *clist = NULL;
-extern GtkWidget *delete_button;
-extern GtkWidget *capplet;
-/* Initialization functions */
-static void
-run_error (gchar *message)
-{
- GtkWidget *error_box;
-
- error_box = gnome_message_box_new (
- message,
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK,
- NULL);
- gnome_dialog_run_and_close (GNOME_DIALOG (error_box));
-}
-static char *
-get_priority (char *def, int *priority)
-{
- *priority = 0;
-
- if (*def == ','){
- def++;
- if (*def == '1'){
- *priority = 0;
- def++;
- } else if (*def == '2'){
- *priority = 1;
- def++;
- }
- }
-
- while (*def && *def == ':')
- def++;
-
- return def;
-}
-static void
-free_mime_info (MimeInfo *mi)
-{
-
-}
-void
-add_to_key (char *mime_type, char *def, GHashTable *table, gboolean init_user)
-{
- int priority = 1;
- char *s, *p, *ext;
- int used;
- MimeInfo *info;
-
- info = g_hash_table_lookup (table, (const void *) mime_type);
- if (info == NULL) {
- info = g_malloc (sizeof (MimeInfo));
- info->mime_type = g_strdup (mime_type);
- info->regex[0] = NULL;
- info->regex[1] = NULL;
- info->ext[0] = NULL;
- info->ext[1] = NULL;
- info->user_ext[0] = NULL;
- info->user_ext[1] = NULL;
- info->regex_readable[0] = NULL;
- info->regex_readable[1] = NULL;
- info->ext_readable[0] = NULL;
- info->ext_readable[1] = NULL;
- info->keys = gnome_mime_get_keys (mime_type);
- g_hash_table_insert (table, info->mime_type, info);
- }
- if (strncmp (def, "ext", 3) == 0){
- char *tokp;
-
- def += 3;
- def = get_priority (def, &priority);
- s = p = g_strdup (def);
-
- used = 0;
-
- while ((ext = strtok_r (s, " \t\n\r,", &tokp)) != NULL){
- /* FIXME: We really need to check for duplicates before entering this. */
- if (!init_user) {
- info->ext[priority] = g_list_prepend (info->ext[priority], ext);
- } else {
- info->user_ext[priority] = g_list_prepend (info->user_ext[priority], ext);
- }
- used = 1;
- s = NULL;
- }
- if (!used)
- g_free (p);
- }
-
- if (strncmp (def, "regex", 5) == 0){
- regex_t *regex;
-
- regex = g_new (regex_t, 1);
- def += 5;
- def = get_priority (def, &priority);
-
- while (*def && isspace (*def))
- def++;
-
- if (!*def)
- return;
- if (regcomp (regex, def, REG_EXTENDED | REG_NOSUB))
- g_free (regex);
- else {
- info->regex[priority] = regex;
- g_free (info->regex_readable[priority]);
- info->regex_readable[priority] = g_strdup (def);
- }
- }
-}
-static void
-mime_fill_from_file (const char *filename, gboolean init_user)
-{
- FILE *f;
- char buf [1024];
- char *current_key;
- gboolean used;
-
- g_assert (filename != NULL);
-
- f = fopen (filename, "r");
- if (!f)
- return;
-
- current_key = NULL;
- used = FALSE;
- while (fgets (buf, sizeof (buf), f)){
- char *p;
-
- if (buf [0] == '#')
- continue;
-
- /* Trim trailing spaces */
- for (p = buf + strlen (buf) - 1; p >= buf; p--){
- if (isspace (*p) || *p == '\n')
- *p = 0;
- else
- break;
- }
-
- if (!buf [0])
- continue;
-
- if (buf [0] == '\t' || buf [0] == ' '){
- if (current_key){
- char *p = buf;
-
- while (*p && isspace (*p))
- p++;
-
- if (*p == 0)
- continue;
- add_to_key (current_key, p, mime_types, init_user);
- if (init_user) {
- add_to_key (current_key, p,
- initial_user_mime_types,
- TRUE);
- add_to_key (current_key, p,
- user_mime_types, TRUE);
- }
- used = TRUE;
- }
- } else {
- if (!used && current_key)
- g_free (current_key);
- current_key = g_strdup (buf);
- if (current_key [strlen (current_key)-1] == ':')
- current_key [strlen (current_key)-1] = 0;
-
- used = FALSE;
- }
- }
- fclose (f);
-}
-
-static void
-mime_load_from_dir (const char *mime_info_dir, gboolean system_dir)
-{
- DIR *dir;
- struct dirent *dent;
- const int extlen = sizeof (".mime") - 1;
- char *filename;
-
- dir = opendir (mime_info_dir);
- if (!dir)
- return;
- if (system_dir) {
- filename = g_build_filename (mime_info_dir, "gnome.mime", NULL);
- mime_fill_from_file (filename, FALSE);
- g_free (filename);
- }
- while ((dent = readdir (dir)) != NULL){
-
- int len = strlen (dent->d_name);
-
- if (len <= extlen)
- continue;
-
- if (strcmp (dent->d_name + len - extlen, ".mime"))
- continue;
- if (system_dir && !strcmp (dent->d_name, "gnome.mime"))
- continue;
- if (!system_dir && !strcmp (dent->d_name, "user.mime"))
- continue;
-
- filename = g_build_filename (mime_info_dir, dent->d_name, NULL);
- mime_fill_from_file (filename, FALSE);
- g_free (filename);
- }
- if (!system_dir) {
- filename = g_build_filename (mime_info_dir, "user.mime", NULL);
- mime_fill_from_file (filename, TRUE);
- g_free (filename);
- }
- closedir (dir);
-}
-static int
-add_mime_vals_to_clist (gchar *mime_type, gpointer mi, gpointer cl)
-{
- /* we also finalize the MimeInfo structure here, now that we're done
- * loading it */
- static gchar *text[2];
- GList *list;
- GString *extension;
- gint row;
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->ext[0];list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- if (strcmp (extension->str, "") != 0 && ((MimeInfo *)mi)->user_ext[0])
- g_string_append (extension, ", ");
- for (list = ((MimeInfo *) mi)->user_ext[0]; list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- ((MimeInfo *) mi)->ext_readable[0] = extension->str;
- g_string_free (extension, FALSE);
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->ext[1];list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next)
- g_string_append (extension, ", ");
- }
- if (strcmp (extension->str, "") != 0 && ((MimeInfo *)mi)->user_ext[1])
- g_string_append (extension, ", ");
- for (list = ((MimeInfo *) mi)->user_ext[1]; list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- ((MimeInfo *) mi)->ext_readable[1] = extension->str;
- g_string_free (extension, FALSE);
-
- if (((MimeInfo *) mi)->ext[0] || ((MimeInfo *) mi)->user_ext[0]) {
- extension = g_string_new ((((MimeInfo *) mi)->ext_readable[0]));
- if (((MimeInfo *) mi)->ext[1] || ((MimeInfo *) mi)->user_ext[1]) {
- g_string_append (extension, ", ");
- g_string_append (extension, (((MimeInfo *) mi)->ext_readable[1]));
- }
- } else if (((MimeInfo *) mi)->ext[1] || ((MimeInfo *) mi)->user_ext[1])
- extension = g_string_new ((((MimeInfo *) mi)->ext_readable[1]));
- else
- extension = g_string_new ("");
-
- text[0] = ((MimeInfo *) mi)->mime_type;
- text[1] = extension->str;
-
- row = gtk_clist_insert (GTK_CLIST (cl), 1, text);
- gtk_clist_set_row_data (GTK_CLIST (cl), row, mi);
- g_string_free (extension, TRUE);
- return row;
-}
-static void
-selected_row_callback (GtkWidget *widget, gint row, gint column, GdkEvent *event, gpointer data)
-{
- MimeInfo *mi;
- if (column < 0)
- return;
-
- mi = (MimeInfo *) gtk_clist_get_row_data (GTK_CLIST (widget),row);
-
- if (event && event->type == GDK_2BUTTON_PRESS)
- launch_edit_window (mi);
-
- if (g_hash_table_lookup (user_mime_types, mi->mime_type)) {
- gtk_widget_set_sensitive (delete_button, TRUE);
- } else
- gtk_widget_set_sensitive (delete_button, FALSE);
-}
-
-/* public functions */
-void
-delete_clicked (GtkWidget *widget, gpointer data)
-{
- MimeInfo *mi;
- gint row = 0;
-
- if (GTK_CLIST (clist)->selection)
- row = GPOINTER_TO_INT ((GTK_CLIST (clist)->selection)->data);
- else
- return;
- mi = (MimeInfo *) gtk_clist_get_row_data (GTK_CLIST (clist), row);
-
- gtk_clist_remove (GTK_CLIST (clist), row);
- g_hash_table_remove (user_mime_types, mi->mime_type);
- remove_mime_info (mi->mime_type);
- free_mime_info (mi);
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
-}
-
-void
-edit_clicked (GtkWidget *widget, gpointer data)
-{
- MimeInfo *mi;
- gint row = 0;
-
- if (GTK_CLIST (clist)->selection)
- row = GPOINTER_TO_INT ((GTK_CLIST (clist)->selection)->data);
- else
- return;
- mi = (MimeInfo *) gtk_clist_get_row_data (GTK_CLIST (clist), row);
- if (mi)
- launch_edit_window (mi);
- gtk_clist_remove (GTK_CLIST (clist), row);
- row = add_mime_vals_to_clist (mi->mime_type, mi, clist);
- gtk_clist_select_row (GTK_CLIST (clist), row, 0);
-}
-void
-add_clicked (GtkWidget *widget, gpointer data)
-{
- launch_new_mime_window ();
-}
-
-GtkWidget *
-get_mime_clist (void)
-{
- GtkWidget *retval;
- gchar *titles[2];
-
- titles[0] = _("Mime Type");
- titles[1] = _("Extension");
- retval = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (retval),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
- clist = gtk_clist_new_with_titles (2, titles);
- gtk_widget_set_usize (clist, 400, 300);
- gtk_signal_connect (GTK_OBJECT (clist),
- "select_row",
- GTK_SIGNAL_FUNC (selected_row_callback),
- NULL);
- gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_BROWSE);
- gtk_clist_set_auto_sort (GTK_CLIST (clist), TRUE);
- if (clist)
- g_hash_table_foreach (mime_types, (GHFunc) add_mime_vals_to_clist, clist);
- gtk_clist_columns_autosize (GTK_CLIST (clist));
- gtk_clist_select_row (GTK_CLIST (clist), 0, 0);
- gtk_container_add (GTK_CONTAINER (retval), clist);
- return retval;
-}
-
-static void
-finalize_mime_type_foreach (gpointer mime_type, gpointer info, gpointer data)
-{
- MimeInfo *mi = (MimeInfo *)info;
- GList *list;
- GString *extension;
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->ext[0];list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- if (strcmp (extension->str, "") != 0 && mi->user_ext[0])
- g_string_append (extension, ", ");
- for (list = ((MimeInfo *) mi)->user_ext[0]; list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- ((MimeInfo *) mi)->ext_readable[0] = extension->str;
- g_string_free (extension, FALSE);
-
- extension = g_string_new ("");
- for (list = ((MimeInfo *) mi)->ext[1];list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next)
- g_string_append (extension, ", ");
- }
- if (strcmp (extension->str, "") != 0 && mi->user_ext[1])
- g_string_append (extension, ", ");
- for (list = ((MimeInfo *) mi)->user_ext[1]; list; list=list->next) {
- g_string_append (extension, (gchar *) list->data);
- if (list->next != NULL)
- g_string_append (extension, ", ");
- }
- ((MimeInfo *) mi)->ext_readable[1] = extension->str;
- g_string_free (extension, FALSE);
-
- if (((MimeInfo *) mi)->ext[0] || ((MimeInfo *) mi)->user_ext[0]) {
- extension = g_string_new ((((MimeInfo *) mi)->ext_readable[0]));
- if (((MimeInfo *) mi)->ext[1] || ((MimeInfo *) mi)->user_ext[1]) {
- g_string_append (extension, ", ");
- g_string_append (extension, (((MimeInfo *) mi)->ext_readable[1]));
- }
- } else if (((MimeInfo *) mi)->ext[1] || ((MimeInfo *) mi)->user_ext[1])
- extension = g_string_new ((((MimeInfo *) mi)->ext_readable[1]));
- else
- extension = g_string_new ("");
- g_string_free (extension, TRUE);
-}
-static void
-finalize_user_mime ()
-{
- g_hash_table_foreach (user_mime_types, finalize_mime_type_foreach, NULL);
- g_hash_table_foreach (initial_user_mime_types, finalize_mime_type_foreach, NULL);
-}
-void
-init_mime_type (void)
-{
- char *mime_info_dir;
-
- mime_types = g_hash_table_new (g_str_hash, g_str_equal);
- initial_user_mime_types = g_hash_table_new (g_str_hash, g_str_equal);
- user_mime_types = g_hash_table_new (g_str_hash, g_str_equal);
-
- mime_info_dir = gnome_unconditional_datadir_file ("mime-info");
- mime_load_from_dir (mime_info_dir, TRUE);
- g_free (mime_info_dir);
-
- mime_info_dir = g_build_filename (gnome_util_user_home (), ".gnome/mime-info", NULL);
- mime_load_from_dir (mime_info_dir, FALSE);
- g_free (mime_info_dir);
- finalize_user_mime ();
- init_mime_info ();
-}
-void
-add_new_mime_type (gchar *mime_type, gchar *raw_ext, gchar *regexp1, gchar *regexp2)
-{
- gchar *temp;
- MimeInfo *mi = NULL;
- gint row;
- gchar *ext = NULL;
- gchar *ptr, *ptr2;
-
- /* first we make sure that the information is good */
- if (mime_type == NULL || *mime_type == '\000') {
- run_error (_("You must enter a mime-type"));
- return;
- } else if ((raw_ext == NULL || *raw_ext == '\000') &&
- (regexp1 == NULL || *regexp1 == '\000') &&
- (regexp2 == NULL || *regexp2 == '\000')){
- run_error (_("You must add either a regular-expression or\na file-name extension"));
- return;
- }
- if (strchr (mime_type, '/') == NULL) {
- run_error (_("Please put your mime-type in the format:\nCATEGORY/TYPE\n\nFor Example:\nimage/png"));
- return;
- }
- if (g_hash_table_lookup (user_mime_types, mime_type) ||
- g_hash_table_lookup (mime_types, mime_type)) {
- run_error (_("This mime-type already exists"));
- return;
- }
- if (raw_ext || *raw_ext) {
- ptr2 = ext = g_malloc (sizeof (raw_ext));
- for (ptr = raw_ext;*ptr; ptr++) {
- if (*ptr != '.' && *ptr != ',') {
- *ptr2 = *ptr;
- ptr2 += 1;
- }
- }
- *ptr2 = '\000';
- }
- /* passed check, now we add it. */
- if (ext) {
- temp = g_strconcat ("ext: ", ext, NULL);
- add_to_key (mime_type, temp, user_mime_types, TRUE);
- mi = (MimeInfo *) g_hash_table_lookup (user_mime_types, mime_type);
- g_free (temp);
- }
- if (regexp1) {
- temp = g_strconcat ("regex: ", regexp1, NULL);
- add_to_key (mime_type, temp, user_mime_types, TRUE);
- g_free (temp);
- }
- if (regexp2) {
- temp = g_strconcat ("regex,2: ", regexp2, NULL);
- add_to_key (mime_type, temp, user_mime_types, TRUE);
- g_free (temp);
- }
- /* Finally add it to the clist */
- if (mi) {
- row = add_mime_vals_to_clist (mime_type, mi, clist);
- gtk_clist_select_row (GTK_CLIST (clist), row, 0);
- gtk_clist_moveto (GTK_CLIST (clist), row, 0, 0.5, 0.0);
- }
- g_free (ext);
-}
-static void
-write_mime_foreach (gpointer mime_type, gpointer info, gpointer data)
-{
- gchar *buf;
- MimeInfo *mi = (MimeInfo *) info;
- fwrite ((char *) mi->mime_type, 1, strlen ((char *) mi->mime_type), (FILE *) data);
- fwrite ("\n", 1, 1, (FILE *) data);
- if (mi->ext_readable[0]) {
- fwrite ("\text: ", 1, strlen ("\text: "), (FILE *) data);
- fwrite (mi->ext_readable[0], 1,
- strlen (mi->ext_readable[0]),
- (FILE *) data);
- fwrite ("\n", 1, 1, (FILE *) data);
- }
- if (mi->regex_readable[0]) {
- fwrite ("\tregex: ", 1, strlen ("\tregex: "), (FILE *) data);
- fwrite (mi->regex_readable[0], 1,
- strlen (mi->regex_readable[0]),
- (FILE *) data);
- fwrite ("\n", 1, 1, (FILE *) data);
- }
- if (mi->regex_readable[1]) {
- fwrite ("\tregex,2: ", 1, strlen ("\tregex,2: "), (FILE *) data);
- fwrite (mi->regex_readable[1], 1,
- strlen (mi->regex_readable[1]),
- (FILE *) data);
- fwrite ("\n", 1, 1, (FILE *) data);
- }
- fwrite ("\n", 1, 1, (FILE *) data);
-}
-
-static void
-write_mime (GHashTable *hash)
-{
- struct stat s;
- gchar *dirname, *filename;
- FILE *file;
- GtkWidget *error_box;
-
- dirname = g_build_filename (gnome_util_user_home (), ".gnome/mime-info", NULL);
- if ((stat (dirname, &s) < 0) || !(S_ISDIR (s.st_mode))){
- if (errno == ENOENT) {
- if (mkdir (dirname, S_IRWXU) < 0) {
- run_error (_("We are unable to create the directory\n"
- "~/.gnome/mime-info\n\n"
- "We will not be able to save the state."));
- return;
- }
- } else {
- run_error (_("We are unable to access the directory\n"
- "~/.gnome/mime-info\n\n"
- "We will not be able to save the state."));
- return;
- }
- }
- filename = g_build_filename (dirname, "user.mime", NULL);
-
- remove (filename);
- file = fopen (filename, "w");
- if (file == NULL) {
- run_error (_("Cannot create the file\n~/.gnome/mime-info/user.mime\n\n"
- "We will not be able to save the state"));
- return;
- }
- g_hash_table_foreach (hash, write_mime_foreach, file);
- fclose (file);
-}
-
-void
-write_user_mime (void)
-{
- write_mime (user_mime_types);
-}
-
-void
-write_initial_mime (void)
-{
- write_mime (initial_user_mime_types);
-}
-
-void
-reread_list ()
-{
- gtk_clist_freeze (GTK_CLIST (clist));
- gtk_clist_clear (GTK_CLIST (clist));
- g_hash_table_foreach (mime_types, (GHFunc) add_mime_vals_to_clist, clist);
- gtk_clist_thaw (GTK_CLIST (clist));
-}
-static void
-clean_mime_type (gpointer mime_type, gpointer mime_info, gpointer data)
-{
- /* we should write this )-: */
-}
-void
-discard_mime_info ()
-{
- gchar *filename;
- g_hash_table_foreach (user_mime_types, clean_mime_type, NULL);
- g_hash_table_destroy (user_mime_types);
- g_hash_table_foreach (initial_user_mime_types, clean_mime_type, NULL);
- g_hash_table_destroy (initial_user_mime_types);
- user_mime_types = g_hash_table_new (g_str_hash, g_str_equal);
- initial_user_mime_types = g_hash_table_new (g_str_hash, g_str_equal);
-
- filename = g_build_filename (gnome_util_user_home (), "/.gnome/mime-info/user.keys", NULL);
- mime_fill_from_file (filename, TRUE);
- finalize_user_mime ();
- reread_list ();
- g_free (filename);
-}
-
-
-
-
-
-
-
diff --git a/capplets/mime-type/mime-data.h b/capplets/mime-type/mime-data.h
deleted file mode 100644
index f5c8bedea..000000000
--- a/capplets/mime-type/mime-data.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-#ifndef _MIME_DATA_H_
-#define _MIME_DATA_H_
-#include "gnome.h"
-#include <regex.h>
-/* Typedefs */
-typedef struct {
- char *mime_type;
- regex_t *regex[2];
- GList *ext[2];
- GList *user_ext[2];
- char *ext_readable[2];
- char *regex_readable[2];
- char *file_name;
- GList *keys;
-} MimeInfo;
-
-extern GHashTable *user_mime_types;
-extern void add_to_key (char *mime_type, char *def, GHashTable *table, gboolean init_user);
-
-GtkWidget *get_mime_clist (void);
-void init_mime_type (void);
-void delete_clicked (GtkWidget *widget, gpointer data);
-void add_clicked (GtkWidget *widget, gpointer data);
-void edit_clicked (GtkWidget *widget, gpointer data);
-void add_new_mime_type (gchar *mime_type, gchar *ext, gchar *regexp1, gchar *regexp2);
-void write_user_mime (void);
-void write_initial_mime (void);
-void reread_list (void);
-void discard_mime_info (void);
-#endif
diff --git a/capplets/mime-type/mime-info.c b/capplets/mime-type/mime-info.c
deleted file mode 100644
index a61811426..000000000
--- a/capplets/mime-type/mime-info.c
+++ /dev/null
@@ -1,492 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "capplet-widget.h"
-#include "gnome.h"
-#include <string.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <regex.h>
-#include <ctype.h>
-#include "mime-info.h"
-#include "mime-data.h"
-#include <errno.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <fcntl.h>
-#include <unistd.h>
-
-#if !defined getc_unlocked && !defined HAVE_GETC_UNLOCKED
-# define getc_unlocked(fp) getc (fp)
-#endif
-
-typedef struct {
- char *mime_type;
- GHashTable *keys;
-} GnomeMimeContext;
-
-typedef enum {
- STATE_NONE,
- STATE_LANG,
- STATE_LOOKING_FOR_KEY,
- STATE_ON_MIME_TYPE,
- STATE_ON_KEY,
- STATE_ON_VALUE
-} ParserState;
-
-static char *current_lang = NULL;
-
-/*
- * A hash table containing all of the Mime records for specific
- * mime types (full description, like image/png)
- */
-static GHashTable *specific_types;
-static GHashTable *initial_specific_types;
-
-/*
- * A hash table containing all of the Mime records for non-specific
- * mime types (like image/\*)
- */
-static GHashTable *generic_types;
-static GHashTable *initial_generic_types;
-
-#define SWITCH_TO_MIME_TYPE() {
-static GnomeMimeContext *
-context_new (GString *str, gboolean is_default_context)
-{
- GnomeMimeContext *context;
- GHashTable *table;
- char *mime_type, *p;
-
- mime_type = g_strdup (str->str);
-
- if (is_default_context) {
- if ((p = strstr (mime_type, "/*")) == NULL){
- table = initial_specific_types;
- } else {
- *(p+1) = 0;
- table = initial_generic_types;
- }
- } else {
- if ((p = strstr (mime_type, "/*")) == NULL){
- table = specific_types;
- } else {
- *(p+1) = 0;
- table = generic_types;
- }
- }
- context = g_hash_table_lookup (table, mime_type);
-
- if (context)
- return context;
-
- context = g_new (GnomeMimeContext, 1);
- context->mime_type = mime_type;
- context->keys = g_hash_table_new (g_str_hash, g_str_equal);
-
- g_hash_table_insert (table, context->mime_type, context);
- return context;
-}
-
-static gboolean
-release_key_and_value (gpointer key, gpointer value, gpointer user_data)
-{
- g_free (key);
- g_free (value);
-
- return TRUE;
-}
-
-
-static gboolean
-remove_this_key (gpointer key, gpointer value, gpointer user_data)
-{
- if (strcmp ((gchar *)key, (gchar *)user_data) == 0){
- g_free (key);
- g_free (value);
- return TRUE;
- }
-
- return FALSE;
-}
-static void
-context_add_key (GnomeMimeContext *context, char *key, char *value)
-{
- char *v;
-
- v = g_hash_table_lookup (context->keys, key);
- if (v)
- g_hash_table_foreach_remove (context->keys, remove_this_key, key);
-
- g_hash_table_insert (context->keys, g_strdup (key), g_strdup (value));
-}
-static void
-context_destroy (GnomeMimeContext *context)
-{
- /*
- * Remove the context from our hash tables, we dont know
- * where it is: so just remove it from both (it can
- * only be in one).
- */
- if (context->mime_type) {
- g_hash_table_remove (specific_types, context->mime_type);
- g_hash_table_remove (generic_types, context->mime_type);
- }
- /*
- * Destroy it
- */
- if (context->keys) {
- g_hash_table_foreach_remove (context->keys, release_key_and_value, NULL);
- g_hash_table_destroy (context->keys);
- }
- g_free (context->mime_type);
- g_free (context);
-}
-
-static void
-load_mime_type_info_from (char *filename)
-{
- FILE *mime_file;
- gboolean in_comment, context_used;
- GString *line;
- int column, c;
- ParserState state;
- GnomeMimeContext *context, *default_context;
- char *key;
-
- mime_file = fopen (filename, "r");
- if (mime_file == NULL)
- return;
-
- in_comment = FALSE;
- context_used = FALSE;
- column = 0;
- context = NULL;
- default_context = NULL;
- key = NULL;
- line = g_string_sized_new (120);
- state = STATE_NONE;
-
- while ((c = getc_unlocked (mime_file)) != EOF){
- column++;
- if (c == '\r')
- continue;
-
- if (c == '#' && column == 0){
- in_comment = TRUE;
- continue;
- }
-
- if (c == '\n'){
- in_comment = FALSE;
- column = 0;
- if (state == STATE_ON_MIME_TYPE){
- context = context_new (line, FALSE);
- default_context = context_new (line, TRUE);
- context_used = FALSE;
- g_string_assign (line, "");
- state = STATE_LOOKING_FOR_KEY;
- continue;
- }
- if (state == STATE_ON_VALUE){
- context_used = TRUE;
- context_add_key (context, key, line->str);
- context_add_key (default_context, key, line->str);
- g_string_assign (line, "");
- g_free (key);
- key = NULL;
- state = STATE_LOOKING_FOR_KEY;
- continue;
- }
- continue;
- }
-
- if (in_comment)
- continue;
-
- switch (state){
- case STATE_NONE:
- if (c != ' ' && c != '\t')
- state = STATE_ON_MIME_TYPE;
- else
- break;
- /* fall down */
-
- case STATE_ON_MIME_TYPE:
- if (c == ':'){
- in_comment = TRUE;
- break;
- }
- g_string_append_c (line, c);
- break;
-
- case STATE_LOOKING_FOR_KEY:
- if (c == '\t' || c == ' ')
- break;
-
- if (c == '['){
- state = STATE_LANG;
- break;
- }
-
- if (column == 1){
- state = STATE_ON_MIME_TYPE;
- g_string_append_c (line, c);
- break;
- }
- state = STATE_ON_KEY;
- /* falldown */
-
- case STATE_ON_KEY:
- if (c == '\\'){
- c = getc (mime_file);
- if (c == EOF)
- break;
- }
- if (c == '='){
- key = g_strdup (line->str);
- g_string_assign (line, "");
- state = STATE_ON_VALUE;
- break;
- }
- g_string_append_c (line, c);
- break;
-
- case STATE_ON_VALUE:
- g_string_append_c (line, c);
- break;
-
- case STATE_LANG:
- if (c == ']'){
- state = STATE_ON_KEY;
- if (current_lang && line->str [0]){
- if (strcmp (current_lang, line->str) != 0){
- in_comment = TRUE;
- state = STATE_LOOKING_FOR_KEY;
- }
- } else {
- in_comment = TRUE;
- state = STATE_LOOKING_FOR_KEY;
- }
- g_string_assign (line, "");
- break;
- }
- g_string_append_c (line, c);
- break;
- }
- }
-
- if (context){
- if (key && line->str [0]) {
- context_add_key (context, key, line->str);
- context_add_key (default_context, key, line->str);
- } else
- if (!context_used) {
- context_destroy (context);
- context_destroy (default_context);
- }
-
- }
-
- g_string_free (line, TRUE);
- if (key)
- g_free (key);
-
- fclose (mime_file);
-}
-void
-set_mime_key_value (gchar *mime_type, gchar *key, gchar *value)
-{
- GnomeMimeContext *context;
-
- /* Assume no generic context's for now. */
- context = g_hash_table_lookup (specific_types, mime_type);
- if (context == NULL) {
- GString *str = g_string_new (mime_type);
- context = context_new (str, FALSE);
- g_string_free (str, TRUE);
- }
- context_add_key (context, key, value);
-}
-void
-init_mime_info (void)
-{
- gchar *filename;
-
- current_lang = getenv ("LANG");
- specific_types = g_hash_table_new (g_str_hash, g_str_equal);
- generic_types = g_hash_table_new (g_str_hash, g_str_equal);
- initial_specific_types = g_hash_table_new (g_str_hash, g_str_equal);
- initial_generic_types = g_hash_table_new (g_str_hash, g_str_equal);
-
- filename = g_build_filename (gnome_util_user_home (), "/.gnome/mime-info/user.keys", NULL);
- load_mime_type_info_from (filename);
- g_free (filename);
-}
-
-const char *
-local_mime_get_value (const char *mime_type, char *key)
-{
- char *value, *generic_type, *p;
- GnomeMimeContext *context;
-
- g_return_val_if_fail (mime_type != NULL, NULL);
- g_return_val_if_fail (key != NULL, NULL);
- context = g_hash_table_lookup (specific_types, mime_type);
- if (context){
- value = g_hash_table_lookup (context->keys, key);
-
- if (value)
- return value;
- }
-
- generic_type = g_strdup (mime_type);
- p = strchr (generic_type, '/');
- if (p)
- *(p+1) = 0;
-
- context = g_hash_table_lookup (generic_types, generic_type);
- g_free (generic_type);
-
- if (context){
- value = g_hash_table_lookup (context->keys, key);
- if (value)
- return value;
- }
- return NULL;
-}
-static void
-clean_mime_foreach (gpointer mime_type, gpointer gmc, gpointer data)
-{
- context_destroy ((GnomeMimeContext *) gmc);
-}
-static void
-write_mime_keys_foreach (gpointer key_name, gpointer value, gpointer data)
-{
- gchar *buf;
- if (current_lang && strcmp (current_lang, "C"))
- buf = g_strconcat ("\t[",
- current_lang,
- "]",
- (gchar *) key_name,
- "=",
- (gchar *) value,
- "\n", NULL);
- else
- buf = g_strconcat ("\t",
- (gchar *) key_name,
- "=",
- (gchar *) value,
- "\n", NULL);
- fwrite (buf, 1, strlen (buf), (FILE *) data);
- g_free (buf);
-}
-static void
-write_mime_foreach (gpointer mime_type, gpointer gmc, gpointer data)
-{
- gchar *buf;
- GnomeMimeContext *context = (GnomeMimeContext *) gmc;
-
- buf = g_strconcat ((gchar *) mime_type, ":\n", NULL);
- fwrite (buf, 1, strlen (buf), (FILE *) data);
- g_free (buf);
- g_hash_table_foreach (context->keys, write_mime_keys_foreach, data);
- fwrite ("\n", 1, strlen ("\n"), (FILE *) data);
-}
-
-static void
-run_error (gchar *message)
-{
- GtkWidget *error_box;
-
- error_box = gnome_message_box_new (
- message,
- GNOME_MESSAGE_BOX_ERROR,
- GNOME_STOCK_BUTTON_OK,
- NULL);
- gnome_dialog_run_and_close (GNOME_DIALOG (error_box));
-}
-static void
-write_keys (GHashTable *spec_hash, GHashTable *generic_hash)
-{
- struct stat s;
- gchar *dirname, *filename;
- FILE *file;
- GtkWidget *error_box;
-
- dirname = g_build_filename (gnome_util_user_home (), ".gnome/mime-info", NULL);
- if ((stat (dirname, &s) < 0) || !(S_ISDIR (s.st_mode))){
- if (errno == ENOENT) {
- if (mkdir (dirname, S_IRWXU) < 0) {
- run_error (_("We are unable to create the directory\n"
- "~/.gnome/mime-info\n\n"
- "We will not be able to save the state."));
- return;
- }
- } else {
- run_error (_("We are unable to access the directory\n"
- "~/.gnome/mime-info\n\n"
- "We will not be able to save the state."));
- return;
- }
- }
- filename = g_build_filename (dirname, "user.keys", NULL);
-
- remove (filename);
- file = fopen (filename, "w");
- if (file == NULL) {
- run_error (_("Cannot create the file\n~/.gnome/mime-info/user.keys.\n\n"
- "We will not be able to save the state"));
- return;
- }
- g_hash_table_foreach (spec_hash, write_mime_foreach, file);
- g_hash_table_foreach (generic_hash, write_mime_foreach, file);
- fclose (file);
-}
-void
-write_initial_keys (void)
-{
- write_keys (initial_generic_types, initial_specific_types);
-}
-void
-write_user_keys (void)
-{
- write_keys (generic_types, specific_types);
-}
-static void
-print_mime_foreach (gpointer mime_info, gpointer mi, gpointer data)
-{
- g_print ("mime_info:%s:\n", (char *)mime_info);
- g_print ("\t:%s:\n", ((MimeInfo *)mi)->mime_type);
-}
-void
-discard_key_info (void)
-{
- gchar *filename;
-
- current_lang = getenv ("LANG");
- g_hash_table_foreach (generic_types, clean_mime_foreach, NULL);
-/* g_hash_table_foreach (specific_types, print_mime_foreach, NULL); */
- g_hash_table_foreach (specific_types, clean_mime_foreach, NULL);
- g_hash_table_destroy (generic_types);
- g_hash_table_destroy (specific_types);
- specific_types = g_hash_table_new (g_str_hash, g_str_equal);
- generic_types = g_hash_table_new (g_str_hash, g_str_equal);
-
- filename = g_build_filename (gnome_util_user_home (), "/.gnome/mime-info/user.keys", NULL);
- load_mime_type_info_from (filename);
- reread_list ();
- g_free (filename);
-}
-void
-remove_mime_info (gchar *mime_type)
-{
- g_hash_table_remove (generic_types, mime_type);
- g_hash_table_remove (specific_types, mime_type);
-}
diff --git a/capplets/mime-type/mime-info.h b/capplets/mime-type/mime-info.h
deleted file mode 100644
index 18db2326f..000000000
--- a/capplets/mime-type/mime-info.h
+++ /dev/null
@@ -1,17 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-#ifndef _MIME_INFO_H_
-#define _MIME_INFO_H_
-#include "gnome.h"
-#include <regex.h>
-/* Typedefs */
-void init_mime_info (void);
-void discard_key_info (void);
-void set_mime_key_value (gchar *mime_type, gchar *key, gchar *value);
-const char * local_mime_get_value (const char *mime_type, char *key);
-void write_user_keys (void);
-void write_initial_keys (void);
-void remove_mime_info (gchar *mime_type);
-#endif
diff --git a/capplets/mime-type/mime-type-capplet.c b/capplets/mime-type/mime-type-capplet.c
deleted file mode 100644
index 6018b92f7..000000000
--- a/capplets/mime-type/mime-type-capplet.c
+++ /dev/null
@@ -1,143 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "capplet-widget.h"
-#include "gnome.h"
-#include <string.h>
-#include <sys/types.h>
-#include <dirent.h>
-#include <regex.h>
-#include <ctype.h>
-#include "mime-data.h"
-#include "mime-info.h"
-#include "edit-window.h"
-/* Prototypes */
-static void try_callback ();
-static void revert_callback ();
-static void ok_callback ();
-static void cancel_callback ();
-static void help_callback ();
-GtkWidget *capplet = NULL;
-GtkWidget *delete_button = NULL;
-
-static GtkWidget *
-left_aligned_button (gchar *label)
-{
- GtkWidget *button = gtk_button_new_with_label (label);
- gtk_misc_set_alignment (GTK_MISC (GTK_BIN (button)->child),
- 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child),
- GNOME_PAD_SMALL, 0);
-
- return button;
-}
-
-static void
-try_callback ()
-{
- write_user_keys ();
- write_user_mime ();
-}
-static void
-revert_callback ()
-{
- write_initial_keys ();
- write_initial_mime ();
- discard_key_info ();
- discard_mime_info ();
- initialize_main_win_vals ();
-}
-static void
-ok_callback ()
-{
- write_user_keys ();
- write_user_mime ();
-}
-static void
-cancel_callback ()
-{
- write_initial_keys ();
- write_initial_mime ();
-}
-
-static void
-help_callback ()
-{
- /* Sigh... empty as always */
-}
-
-static void
-init_mime_capplet ()
-{
- GtkWidget *vbox;
- GtkWidget *hbox;
- GtkWidget *button;
-
- capplet = capplet_widget_new ();
- delete_button = left_aligned_button (_("Delete"));
- gtk_signal_connect (GTK_OBJECT (delete_button), "clicked",
- delete_clicked, NULL);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD_SMALL);
- gtk_container_add (GTK_CONTAINER (capplet), hbox);
- gtk_box_pack_start (GTK_BOX (hbox), get_mime_clist (), TRUE, TRUE, 0);
- vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 0);
- button = left_aligned_button (_("Add..."));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- add_clicked, NULL);
- button = left_aligned_button (_("Edit..."));
- gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
- gtk_signal_connect (GTK_OBJECT (button), "clicked",
- edit_clicked, NULL);
- gtk_box_pack_start (GTK_BOX (vbox), delete_button, FALSE, FALSE, 0);
- gtk_widget_show_all (capplet);
- gtk_signal_connect(GTK_OBJECT(capplet), "try",
- GTK_SIGNAL_FUNC(try_callback), NULL);
- gtk_signal_connect(GTK_OBJECT(capplet), "revert",
- GTK_SIGNAL_FUNC(revert_callback), NULL);
- gtk_signal_connect(GTK_OBJECT(capplet), "ok",
- GTK_SIGNAL_FUNC(ok_callback), NULL);
- gtk_signal_connect(GTK_OBJECT(capplet), "cancel",
- GTK_SIGNAL_FUNC(cancel_callback), NULL);
- gtk_signal_connect(GTK_OBJECT(capplet), "page_hidden",
- GTK_SIGNAL_FUNC(hide_edit_window), NULL);
- gtk_signal_connect(GTK_OBJECT(capplet), "page_shown",
- GTK_SIGNAL_FUNC(show_edit_window), NULL);
-#if 0
- gtk_signal_connect(GTK_OBJECT(capplet), "help",
- GTK_SIGNAL_FUNC(help_callback), NULL);
-#endif
-}
-
-int
-main (int argc, char **argv)
-{
- int init_results;
-
- bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (PACKAGE, "UTF-8");
- textdomain (PACKAGE);
-
- init_results = gnome_capplet_init("mime-type", VERSION,
- argc, argv, NULL, 0, NULL);
-
- if (init_results < 0) {
- exit (0);
- }
-
- if (init_results == 0) {
- init_mime_type ();
- init_mime_capplet ();
- capplet_gtk_main ();
- }
- return 0;
-}
diff --git a/capplets/mime-type/mime-type-capplet.png b/capplets/mime-type/mime-type-capplet.png
deleted file mode 100644
index b253d29fe..000000000
--- a/capplets/mime-type/mime-type-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mime-type/mime-type-properties.glade b/capplets/mime-type/mime-type-properties.glade
deleted file mode 100644
index e69de29bb..000000000
--- a/capplets/mime-type/mime-type-properties.glade
+++ /dev/null
diff --git a/capplets/mime-type/mime-type.desktop.in.in b/capplets/mime-type/mime-type.desktop.in.in
deleted file mode 100644
index 3ca034881..000000000
--- a/capplets/mime-type/mime-type.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Mime Types
-_Comment=Configure how files are associated and started
-Icon=mime-type-capplet.png
-Exec=mime-type-capplet
-Terminal=0
-Type=Application
diff --git a/capplets/mime-type/new-mime-window.c b/capplets/mime-type/new-mime-window.c
deleted file mode 100644
index bc21109b7..000000000
--- a/capplets/mime-type/new-mime-window.c
+++ /dev/null
@@ -1,120 +0,0 @@
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include "new-mime-window.h"
-#include "capplet-widget.h"
-static GtkWidget *add_dialog = NULL;
-extern GtkWidget *capplet;
-
-/*Public functions */
-void
-launch_new_mime_window (void)
-{
- GtkWidget *mime_entry;
- GtkWidget *label;
- GtkWidget *frame;
- GtkWidget *ext_entry;
- GtkWidget *regex1_entry;
- GtkWidget *regex2_entry;
- GtkWidget *hbox;
- GtkWidget *vbox;
- GtkWidget *table;
-
- add_dialog = gnome_dialog_new (_("Add Mime Type"), GNOME_STOCK_BUTTON_OK, GNOME_STOCK_BUTTON_CANCEL, NULL);
- label = gtk_label_new (_("Add a new Mime Type\nFor example: image/tiff; text/x-scheme"));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), hbox, FALSE, FALSE, 0);
- label = gtk_label_new (_("Mime Type: "));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- mime_entry = gtk_entry_new ();
- gtk_box_pack_start (GTK_BOX (hbox), mime_entry, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), hbox, FALSE, FALSE, 0);
-
- frame = gtk_frame_new (_("Extensions"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), frame, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);
- label = gtk_label_new (_("Type in the extensions for this mime-type.\nFor example: .html, .htm"));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (frame), vbox);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new (_("Extension:")), FALSE, FALSE, 0);
- ext_entry = gtk_entry_new ();
- gtk_box_pack_start (GTK_BOX (hbox), ext_entry, TRUE, TRUE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
-
- frame = gtk_frame_new (_("Regular Expressions"));
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (add_dialog)->vbox), frame, FALSE, FALSE, 0);
- vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_container_set_border_width (GTK_CONTAINER (vbox), GNOME_PAD_SMALL);
- label = gtk_label_new (_("You can set up two regular expressions here to identify the Mime Type\nby. These fields are optional."));
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- hbox = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 0);
- gtk_container_add (GTK_CONTAINER (frame), vbox);
- gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (vbox), gtk_hseparator_new (), FALSE, FALSE, 0);
- table = gtk_table_new (2, 2, FALSE);
- gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
-/* gtk_container_set_border_width (GTK_CONTAINER (table), GNOME_PAD_SMALL);*/
- label = gtk_label_new (_("First Regular Expression: "));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_table_attach (GTK_TABLE (table),
- label,
- 0, 1, 0, 1,
- GTK_FILL, GTK_FILL, 0, 0);
- regex1_entry = gtk_entry_new ();
- gtk_table_attach_defaults (GTK_TABLE (table),
- regex1_entry,
- 1, 2, 0, 1);
- label = gtk_label_new (_("Second Regular Expression: "));
- gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5);
- gtk_label_set_justify (GTK_LABEL (label), GTK_JUSTIFY_LEFT);
- gtk_table_attach (GTK_TABLE (table),
- label,
- 0, 1, 1, 2,
- GTK_FILL, GTK_FILL, 0, 0);
- regex2_entry = gtk_entry_new ();
- gtk_table_attach_defaults (GTK_TABLE (table),
- regex2_entry,
- 1, 2, 1, 2);
- gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
-
-
- gtk_widget_show_all (GNOME_DIALOG (add_dialog)->vbox);
- switch (gnome_dialog_run (GNOME_DIALOG (add_dialog))) {
- case 0:
- capplet_widget_state_changed (CAPPLET_WIDGET (capplet),
- TRUE);
- add_new_mime_type (gtk_entry_get_text (GTK_ENTRY (mime_entry)),
- gtk_entry_get_text (GTK_ENTRY (ext_entry)),
- gtk_entry_get_text (GTK_ENTRY (regex1_entry)),
- gtk_entry_get_text (GTK_ENTRY (regex2_entry)));
- case 1:
- gtk_widget_destroy (add_dialog);
- default:;
- }
- add_dialog = NULL;
-}
-void
-hide_new_mime_window (void)
-{
- if (add_dialog != NULL)
- gtk_widget_hide (add_dialog);
-}
-void
-show_new_mime_window (void)
-{
- if (add_dialog != NULL)
- gtk_widget_show (add_dialog);
-}
diff --git a/capplets/mime-type/new-mime-window.h b/capplets/mime-type/new-mime-window.h
deleted file mode 100644
index 3071ab3fd..000000000
--- a/capplets/mime-type/new-mime-window.h
+++ /dev/null
@@ -1,14 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- */
-#include "mime-data.h"
-#ifndef _NEW_MIME_WINDOW_H_
-#define _NEW_MIME_WINDOW_H_
-
-void launch_new_mime_window (void);
-void hide_new_mime_window (void);
-void show_new_mime_window (void);
-
-#endif
-
diff --git a/capplets/mouse/.cvsignore b/capplets/mouse/.cvsignore
deleted file mode 100644
index 9089239c5..000000000
--- a/capplets/mouse/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.o
-*.lo
-*.la
-gnome-mouse-properties
-*.desktop
-gnome-settings-mouse.desktop.in
diff --git a/capplets/mouse/ChangeLog b/capplets/mouse/ChangeLog
deleted file mode 100644
index 076b71733..000000000
--- a/capplets/mouse/ChangeLog
+++ /dev/null
@@ -1,491 +0,0 @@
-2005-01-04 Sebastien Bacher <seb128@debian.org>
-
- * gnome-mouse-properties.glade: fixed a grammar error (Closes: #131521)
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-mouse-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * gnome-settings-mouse.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-mouse-properties.c: (main):
- Use themed icon for WM hint.
-
-2004-06-15 Bastien Nocera <hadess@hadess.net>
-
- * .cvsignore: upd
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-mouse-properties.c: (dialog_response_cb): Update help
- link to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-Mon Aug 11 13:53:23 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (delay_value_changed_cb): fix the
- double click peditor.
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-mouse-properties.glade: Patch to fix spacing between action
- area and vbox of preferences dialog.
-
-Fri Aug 1 14:29:12 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (setup_dialog): remove markup from
- translated strings, #118801.
-
-Fri Aug 1 13:06:04 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (create_dialog): add support for
- Xcursors.
-
-Thu Jul 24 16:14:33 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (setup_dialog): remove the float_to_int
- conversion as the peditor already does that.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-17 Dennis Cranston <dennis_cranston@yahoo.com>
-
- * gnome-mouse-properties.glade: HIGify dialog and fix
- ui-review bug 99532: remove help text from the dialog;
- s/Delay/Timeout; remove frames and use HIGified categories;
- change check box text to "Highlight the pointer when you
- press Ctrl"; change the cursor theme's note to "<i><small><b>
- Note:</b> Changes to theis setting will not take effect until
- you next log in.</small><i>"; and fix widget padding.
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-mouse-properties.c: (read_cursor_font), (setup_dialog):
- Plug a couple of leaks.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-25 Rajkumar Sivasamy <rajkumar.siva@wipro.com>
-
- * gnome-mouse-properties.c: Register mouse double click images
- as stock icons, so that they are themable.
- Fixes bug 96081
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * mouse.desktop.in: Fix the desktop file so that it validates.
-
-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.
-
-2002-07-10 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=85233
- * gnome-mouse-properties.c (create_dialog) : register the custom
- checkbox for glade.
- * gnome-mouse-properties.glade : Use the custom checkbox.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-mouse-properties.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * gnome-mouse-properties.c (dialog_response_cb) : Improve handling of
- help failures.
-
-Sun May 26 11:31:34 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-mouse-properties.c (main): use APPID instead of argv[0]
-
-2002-05-22 jacob berkman <jacob@ximian.com>
-
- * *.pcf(.gz):
- * Makefile.am (cursorfont_DATA):
- * gnome-mouse-properties.c (setup_dialog): use .pcf, not .pcf.gz
- as solaris can't read .gz files
-
- fixes #78023
-
-Tue May 21 20:09:22 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (event_box_button_press_event): fix
- broken double-click test.
-
-Mon May 13 16:53:45 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (main): uncomment accidentally
- commented lines. Also, fixed text, #76413
-
-2002-05-13 Jody Goldberg <jody@gnome.org>
-
- * gnome-mouse-properties.glade : Remove separator.
- Remove accelerators in tabs.
-
-2002-05-12 Anders Carlsson <andersca@gnu.org>
-
- * gnome-mouse-properties.c: (drag_threshold_from_gconf),
- (drag_threshold_to_gconf), (event_box_button_press_event),
- (load_pixbufs), (setup_dialog), (create_dialog),
- (dialog_response_cb), (main):
- * gnome-mouse-properties.glade:
- Lots of things. Fix drag threshold preference, use a GtkImage
- instead of a GtkDrawingArea for the double click test. Remove
- weird weak refs throughout the code. Clean up the glade file,
- requires a new libglade that has an a11y ref count fix.
-
-2002-05-10 Anders Carlsson <andersca@gnu.org>
-
- * gnome-mouse-properties.c: (get_default_mouse_info),
- (motion_acceleration_from_gconf), (threshold_from_gconf):
- If the threshold or acceleration value is -1, just set the slider
- to the default X value.
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-mouse-properties.c (dialog_button_clicked_cb) : enable help.
- (main) : ditto.
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-mouse-properties.glade : long forgotten atk patch from Dave.
- Sorry.
-
-2002-05-08 Jakub Steiner <jimmac@ximian.com>
-
- * double-click-maybe.png:
- * double-click-off.png:
- * double-click-on.png: use a lightbulb on a dark background
-
-Wed Apr 10 18:05:42 2002 Jonathan Blandford <jrb@gnome.org>
-
- * mouse.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-21 Dave Camp <dave@ximian.com>
-
- * gnome-mouse-properties.c (*_{to|from}_gconf): Add the peditor
- arguments.
- (setup_dialog): Use locate_pointer instead of locate_pointer_id.
- (threshold_to_gconf): New function.
- (setup_dialog): Use threshold_to_gconf for motion_threshold and
- drag_threshold.
-
-2002-03-11 Richard Hestilow <hestilow@ximian.com>
-
- * gnome-mouse-properties.c (drawing_area_button_press_event):
- Check for changeset != NULL before looking in changeset.
-
-2002-03-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-mouse-properties.c: (main):
-
- Activate the settings daemon if its not already running.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-mouse-properties.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-Tue Feb 19 23:52:17 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-mouse-properties.c (cursor_font_changed): Hook up cursor code.
-
-Fri Feb 8 01:41:40 2002 Jonathan Blandford <jrb@redhat.com>
-
- * Makefile.am (pixmap_DATA): install cursor images.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-mouse-properties.c (drawing_area_expose_event): Kill warning
- (dialog_button_clicked_cb): Use G_TYPE_STRING
- (dialog_button_clicked_cb): Use GtkDialog
- (left_handed_toggle_cb): Do not crash on NULL value
-
-Tue Jan 8 15:47:24 2002 Jonathan Blandford <jrb@redhat.com>
-
- * .cvsignore: New ignores.
- * gnome-mouse-properties.glade: Update of glade file for cursors
- * mouse-cursor-normal-large.png: New images
- * mouse-cursor-normal.png:
- * mouse-cursor-white-large.png:
- * mouse-cursor-white.png:
- * mouse-properties-capplet.c: (setup_dialog), (create_dialog),
- (main): Add support for new properties. Don't fully work yet, but
- we'll get it later.
- * mouse-properties.glade: not sure what changed -- need to remove
- this file.
-
-2001-12-20 Seth Nickell <snickell@stanford.edu>
-
- * mouse.desktop.in:
-
- Add Categories field.
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse.desktop.in (Icon, Exec): Update
-
- * mouse-properties-capplet.c (dialog_button_clicked_cb): Update
- (main): Use a GtkDialog rather than GnomeDialog; don't place weak
- ref on gtk_main_quit
- (load_pixbufs): Locate files with gnome_program_locate_file
- Eliminate compiler warnings
-
-2001-12-20 Hans Petter Jansson <hpj@ximian.com>
-
- * Makefile.am: Remove rule that prevented install.
-
-2001-12-20 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse.desktop.in.in (Exec): Update
-
-2001-12-19 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse-properties-capplet.c (double_click_from_gconf): Divide by
- 1000.0, use floats
- (double_click_to_gconf): Implement
- (drawing_area_button_press_event): Don't call
- double_click_from_gconf
- (drawing_area_button_press_event): Use response of
- gconf_change_set_check_value to determine if value is in changeset
- (main): Remove --apply and --init-session-settings
- (setup_dialog): Use g_object_set to set the conversion callbacks
- (*_{to|from}_gconf): Update to reflect changes in gconf peditors
- (setup_dialog): Use numeric_range
-
-2001-12-18 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse-properties-capplet.c (double_click_from_gconf): Single
- closed-form formula here
- Code reorganization; many changes
-
-2001-10-18 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse-properties-capplet.c (apply_settings): Only swap buttons 1
- and 3 in the mapping
-
-2001-10-12 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Make OAF file creation generic
-
-2001-09-28 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove support for disabling bonobo-conf build
-
- * Makefile.am: Change the binary name to
- mouse-properties-control and create a wrapper script from
- ../common/wrapper-script.in to be named mouse-properties-capplet
-
-2001-09-07 Chema Celorio <chema@celorio.com>
-
- * mouse-properties-capplet.c (create_dialog): dont set the pixmaps
- (capplet_fool_the_linker):
- (mouse_capplet_create_image_widget):
- (mouse_capplet_create_image_widget_canvas): implement.
- This sets antialiased pixmaps for the mouse capplet. Maybe this
- call should in common. Closes bug #58293
-
-2001-08-21 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse-properties-capplet.c (apply_settings): Use a CORBA
- exception structure
-
-2001-07-31 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): add DISTDIR to install-data-local
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * mouse-properties-capplet.c (apply_settings): Use MAX_THRESH -
- threshold value
-
- * mouse-properties.glade: Fix mouse speed and acceleration
- controls to be wider and to use discrete values
-
- * mouse-properties.xml: Change type of right-to-left to ulong
-
- * mouse-properties-capplet.c (apply_settings): Use get_ulong
- rather than get_boolean
-
- * RELEASE : 1.5.2
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am : generate the .oaf file from the .oaf.in file
- The DESKTOP_EXEC_LINE was missing the --capplet at the end, add.
- (cappletname): add pixmap_DATA to EXTRA_DIST
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am: remove the DESKTOP_IN_RULE and copy the sed here
-
-2001-07-25 Richard Hestilow <hestilow@ximian.com:
-
- * prefs-widget.c (read_preferences): Swap right and left enable.
- (left_handed_selected_cb): Ditto.
- (right_handed_selected_cb): Ditto.
-
-2001-07-24 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (pixmap_DATA): Fixed pixmap_DATA line to install
- mouse pixmaps
-
- Courtesy Stephen Browne <stephen.browne@sun.com>:
- * mouse-properties-capplet.c: bonobo-conf rewrite
- (setup_dialog): Use bonobo_peditor_option_radio_construct
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): distcheck love
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (EXTRA_DIST): Added mouse-left.png and mouse-right.png
-
-2001-07-18 Chema Celorio <chema@celorio.com>
-
- * prefs-widget.c (set_pixmap_file): the path of the pixmaps was
- changed
-
- * mouse-properties.glade: set a group for the radio buttons
-
-2001-07-17 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (EXTRA_DIST): Changed Applications_DATA to
- Applications_in_files
-
-2001-07-17 Jakub Steiner <jimmac@ximian.com>
-
- * mouse-left.png, mouse-right.png: hi-res images
-
-2001-06-27 Richard Hestilow <hestilow@ximian.com:
-
- * ChangeLog added.
-
- * mouse-properties.glade: New GUI by Anna Dirks.
-
- * mouse-left.png, mouse-right.png: Added.
-
- * Makefile.am: Install pixmaps.
-
- * prefs-widget.c (set_pixmap_file): Added function.
- (threshold_changed_cb, read_preferences): Call new macro
- THRESHOLD_CONVERT, as sensitivity is the reverse of threshold.
- (read_preferences, prefs_widget_init): Change "threshold_entry" to
- sensitivity_entry.
- (prefs_widget_init): Call set_pixmap_file for the new pixmaps.
diff --git a/capplets/mouse/Makefile.am b/capplets/mouse/Makefile.am
deleted file mode 100644
index cd954709d..000000000
--- a/capplets/mouse/Makefile.am
+++ /dev/null
@@ -1,36 +0,0 @@
-bin_PROGRAMS = gnome-mouse-properties
-
-gnome_mouse_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-gnome_mouse_properties_SOURCES = gnome-mouse-properties.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- double-click-on.png \
- double-click-off.png \
- double-click-maybe.png \
- mouse-left.png \
- mouse-right.png \
- mouse-cursor-normal.png \
- mouse-cursor-white.png \
- mouse-cursor-normal-large.png \
- mouse-cursor-white-large.png
-
-
-cursorfontdir = $(datadir)/gnome/cursor-fonts
-cursorfont_DATA = \
- cursor-large.pcf \
- cursor-white.pcf \
- cursor-large-white.pcf
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-mouse-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gnome-settings-mouse.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA) $(pixmap_DATA) $(cursorfont_DATA)
diff --git a/capplets/mouse/cursor-large-white.pcf b/capplets/mouse/cursor-large-white.pcf
deleted file mode 100644
index e1d7b6310..000000000
--- a/capplets/mouse/cursor-large-white.pcf
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/cursor-large.pcf b/capplets/mouse/cursor-large.pcf
deleted file mode 100644
index 6580b33d5..000000000
--- a/capplets/mouse/cursor-large.pcf
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/cursor-white.pcf b/capplets/mouse/cursor-white.pcf
deleted file mode 100644
index bc9932c34..000000000
--- a/capplets/mouse/cursor-white.pcf
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/double-click-maybe.png b/capplets/mouse/double-click-maybe.png
deleted file mode 100644
index 6504e2e91..000000000
--- a/capplets/mouse/double-click-maybe.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/double-click-off.png b/capplets/mouse/double-click-off.png
deleted file mode 100644
index ab428d13d..000000000
--- a/capplets/mouse/double-click-off.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/double-click-on.png b/capplets/mouse/double-click-on.png
deleted file mode 100644
index 1ee9202ec..000000000
--- a/capplets/mouse/double-click-on.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/gnome-mouse-properties.c b/capplets/mouse/gnome-mouse-properties.c
deleted file mode 100644
index 581326a9d..000000000
--- a/capplets/mouse/gnome-mouse-properties.c
+++ /dev/null
@@ -1,859 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* mouse-properties-capplet.c
- * Copyright (C) 2001 Red Hat, Inc.
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by: Jonathon Blandford <jrb@redhat.com>,
- * Bradford Hovinen <hovinen@ximian.com>,
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#include <config.h>
-
-#include <string.h>
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <gdk/gdkx.h>
-#include <math.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "activate-settings-daemon.h"
-#include "capplet-stock-icons.h"
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <dirent.h>
-
-/******************************************************************************/
-/* A quick custom widget to ensure that the left handed toggle works no matter
- * which button is pressed.
- */
-typedef struct { GtkCheckButton parent; } MouseCappletCheckButton;
-typedef struct { GtkCheckButtonClass parent; } MouseCappletCheckButtonClass;
-GNOME_CLASS_BOILERPLATE (MouseCappletCheckButton, mouse_capplet_check_button,
- GtkCheckButton, GTK_TYPE_CHECK_BUTTON)
-static void mouse_capplet_check_button_instance_init (MouseCappletCheckButton *obj) { }
-
-static gboolean
-mouse_capplet_check_button_button_press (GtkWidget *widget, GdkEventButton *event)
-{
- if (event->type == GDK_BUTTON_PRESS) {
- if (!GTK_WIDGET_HAS_FOCUS (widget))
- gtk_widget_grab_focus (widget);
- gtk_button_pressed (GTK_BUTTON (widget));
- }
- return TRUE;
-}
-static gboolean
-mouse_capplet_check_button_button_release (GtkWidget *widget, GdkEventButton *event)
-{
- gtk_button_released (GTK_BUTTON (widget));
- return TRUE;
-}
-
-static void
-mouse_capplet_check_button_class_init (MouseCappletCheckButtonClass *klass)
-{
- GtkWidgetClass *widget_class = (GtkWidgetClass *)klass;
- widget_class->button_press_event = mouse_capplet_check_button_button_press;
- widget_class->button_release_event = mouse_capplet_check_button_button_release;
-}
-/******************************************************************************/
-
-enum
-{
- DOUBLE_CLICK_TEST_OFF,
- DOUBLE_CLICK_TEST_MAYBE,
- DOUBLE_CLICK_TEST_ON
-};
-
-enum
-{
- COLUMN_PIXBUF,
- COLUMN_TEXT,
- COLUMN_FONT_PATH,
- N_COLUMNS
-};
-
-/* We use this in at least half a dozen places, so it makes sense just to
- * define the macro */
-
-#define DOUBLE_CLICK_KEY "/desktop/gnome/peripherals/mouse/double_click"
-#define CURSOR_FONT_KEY "/desktop/gnome/peripherals/mouse/cursor_font"
-#define CURSOR_SIZE_KEY "/desktop/gnome/peripherals/mouse/cursor_size"
-
-#ifdef HAVE_XCURSOR
-static gboolean server_supports_xcursor = TRUE;
-#else
-static gboolean server_supports_xcursor = FALSE;
-#endif
-
-/* State in testing the double-click speed. Global for a great deal of
- * convenience
- */
-gint double_click_state = DOUBLE_CLICK_TEST_OFF;
-
-/* normalilzation routines */
-/* All of our scales but double_click are on the range 1->10 as a result, we
- * have a few routines to convert from whatever the gconf key is to our range.
- */
-static GConfValue *
-double_click_from_gconf (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- gconf_value_set_int (new_value, CLAMP ((int) floor ((gconf_value_get_int (value) + 50) / 100.0) * 100, 100, 1000));
- return new_value;
-}
-
-static void
-delay_value_changed_cb (GtkWidget *range,
- gpointer dialog)
-{
- gchar *message = g_strdup_printf ("%.1f %s", gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))) / 1000.0, _("seconds"));
- gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message);
- g_free (message);
-}
-
-static void
-get_default_mouse_info (int *default_numerator, int *default_denominator, int *default_threshold)
-{
- int numerator, denominator;
- int threshold;
- int tmp_num, tmp_den, tmp_threshold;
-
- /* Query X for the default value */
- XGetPointerControl (GDK_DISPLAY (), &numerator, &denominator,
- &threshold);
- XChangePointerControl (GDK_DISPLAY (), True, True, -1, -1, -1);
- XGetPointerControl (GDK_DISPLAY (), &tmp_num, &tmp_den, &tmp_threshold);
- XChangePointerControl (GDK_DISPLAY (), True, True, numerator, denominator, threshold);
-
- if (default_numerator)
- *default_numerator = tmp_num;
-
- if (default_denominator)
- *default_denominator = tmp_den;
-
- if (default_threshold)
- *default_threshold = tmp_threshold;
-
-}
-
-static GConfValue *
-motion_acceleration_from_gconf (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *new_value;
- gfloat motion_acceleration;
-
- new_value = gconf_value_new (GCONF_VALUE_FLOAT);
-
- if (gconf_value_get_float (value) == -1.0) {
- int numerator, denominator;
-
- get_default_mouse_info (&numerator, &denominator, NULL);
-
- motion_acceleration = CLAMP ((gfloat)(numerator / denominator), 0.2, 6.0);
- }
- else {
- motion_acceleration = CLAMP (gconf_value_get_float (value), 0.2, 6.0);
- }
-
- if (motion_acceleration >= 1)
- gconf_value_set_float (new_value, motion_acceleration + 4);
- else
- gconf_value_set_float (new_value, motion_acceleration * 5);
-
- return new_value;
-}
-
-static GConfValue *
-motion_acceleration_to_gconf (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *new_value;
- gfloat motion_acceleration;
-
- new_value = gconf_value_new (GCONF_VALUE_FLOAT);
- motion_acceleration = CLAMP (gconf_value_get_float (value), 1.0, 10.0);
-
- if (motion_acceleration < 5)
- gconf_value_set_float (new_value, motion_acceleration / 5.0);
- else
- gconf_value_set_float (new_value, motion_acceleration - 4);
-
- return new_value;
-}
-
-static GConfValue *
-threshold_from_gconf (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_FLOAT);
-
- if (gconf_value_get_int (value) == -1) {
- int threshold;
-
- get_default_mouse_info (NULL, NULL, &threshold);
- gconf_value_set_float (new_value, CLAMP (threshold, 1, 10));
- }
- else {
- gconf_value_set_float (new_value, CLAMP (gconf_value_get_int (value), 1, 10));
- }
-
- return new_value;
-}
-
-static GConfValue *
-drag_threshold_from_gconf (GConfPropertyEditor *peditor,
- const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_FLOAT);
-
- gconf_value_set_float (new_value, CLAMP (gconf_value_get_int (value), 1, 10));
-
- return new_value;
-}
-
-static GConfValue *
-cursor_size_to_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
- gint widget_val;
-
- widget_val = gconf_value_get_int (value);
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- switch (widget_val) {
- case 12:
- gconf_value_set_int (new_value, 0);
- break;
- case 24:
- gconf_value_set_int (new_value, 1);
- break;
- case 36:
- gconf_value_set_int (new_value, 2);
- break;
- default:
- gconf_value_set_int (new_value, -1);
- break;
- }
-
- return new_value;
-}
-
-static GConfValue *
-cursor_size_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
- gint radio_val;
-
- radio_val = gconf_value_get_int (value);
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- switch (radio_val) {
- case 0:
- gconf_value_set_int (new_value, 12);
- break;
- case 1:
- gconf_value_set_int (new_value, 24);
- break;
- case 2:
- gconf_value_set_int (new_value, 36);
- break;
- default:
- g_assert_not_reached ();
- break;
- }
-
- return new_value;
-}
-
-/* Retrieve legacy settings */
-
-static void
-get_legacy_settings (void)
-{
-}
-
-/* Double Click handling */
-
-struct test_data_t
-{
- gint *timeout_id;
- GtkWidget *image;
-};
-
-/* Timeout for the double click test */
-
-static gboolean
-test_maybe_timeout (struct test_data_t *data)
-{
- double_click_state = DOUBLE_CLICK_TEST_OFF;
-
- gtk_image_set_from_stock (GTK_IMAGE (data->image),
- MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size());
-
- *data->timeout_id = 0;
-
- return FALSE;
-}
-
-/* Callback issued when the user clicks the double click testing area. */
-
-static gboolean
-event_box_button_press_event (GtkWidget *widget,
- GdkEventButton *event,
- GConfChangeSet *changeset)
-{
- gint double_click_time;
- GConfValue *value;
- static struct test_data_t data;
- static guint test_on_timeout_id = 0;
- static guint test_maybe_timeout_id = 0;
- static guint32 double_click_timestamp = 0;
- GtkWidget *image;
- GConfClient *client;
-
- if (event->type != GDK_BUTTON_PRESS)
- return FALSE;
-
- image = g_object_get_data (G_OBJECT (widget), "image");
-
- if (!(changeset && gconf_change_set_check_value (changeset, DOUBLE_CLICK_KEY, &value))) {
- client = gconf_client_get_default();
- double_click_time = gconf_client_get_int (client, DOUBLE_CLICK_KEY, NULL);
- g_object_unref (client);
-
- } else
- double_click_time = gconf_value_get_int (value);
-
- if (test_maybe_timeout_id != 0)
- gtk_timeout_remove (test_maybe_timeout_id);
- if (test_on_timeout_id != 0)
- gtk_timeout_remove (test_on_timeout_id);
-
- switch (double_click_state) {
- case DOUBLE_CLICK_TEST_OFF:
- double_click_state = DOUBLE_CLICK_TEST_MAYBE;
- data.image = image;
- data.timeout_id = &test_maybe_timeout_id;
- test_maybe_timeout_id = gtk_timeout_add (double_click_time, (GtkFunction) test_maybe_timeout, &data);
- break;
- case DOUBLE_CLICK_TEST_MAYBE:
- if (event->time - double_click_timestamp < double_click_time) {
- double_click_state = DOUBLE_CLICK_TEST_ON;
- data.image = image;
- data.timeout_id = &test_on_timeout_id;
- test_on_timeout_id = gtk_timeout_add (2500, (GtkFunction) test_maybe_timeout, &data);
- }
- break;
- case DOUBLE_CLICK_TEST_ON:
- double_click_state = DOUBLE_CLICK_TEST_OFF;
- break;
- }
-
- double_click_timestamp = event->time;
-
- switch (double_click_state) {
- case DOUBLE_CLICK_TEST_ON:
- gtk_image_set_from_stock (GTK_IMAGE (image),
- MOUSE_DBLCLCK_ON, mouse_capplet_dblclck_icon_get_size());
- break;
- case DOUBLE_CLICK_TEST_MAYBE:
- gtk_image_set_from_stock (GTK_IMAGE (image),
- MOUSE_DBLCLCK_MAYBE, mouse_capplet_dblclck_icon_get_size());
- break;
- case DOUBLE_CLICK_TEST_OFF:
- gtk_image_set_from_stock (GTK_IMAGE (image),
- MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size());
- break;
- }
-
- return TRUE;
-}
-
-/* Callback issued when the user switches between left- and right-handed button
- * mappings. Updates the appropriate image on the dialog.
- */
-
-static void
-left_handed_toggle_cb (GConfPropertyEditor *peditor, const gchar *key, const GConfValue *value, GtkWidget *image)
-{
- if (value && gconf_value_get_bool (value)) {
- gtk_image_set_from_stock (GTK_IMAGE (image), MOUSE_LEFT_HANDED, mouse_capplet_icon_get_size ());
- }
- else {
- gtk_image_set_from_stock (GTK_IMAGE (image), MOUSE_RIGHT_HANDED, mouse_capplet_icon_get_size ());
- }
-}
-
-static gchar *
-read_cursor_font (void)
-{
- DIR *dir;
- gchar *dir_name;
- struct dirent *file_dirent;
-
- dir_name = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (), ".gnome2/share/cursor-fonts", NULL);
- if (! g_file_test (dir_name, G_FILE_TEST_EXISTS))
- return NULL;
-
- dir = opendir (dir_name);
-
- while ((file_dirent = readdir (dir)) != NULL) {
- struct stat st;
- gchar *link_name;
-
- link_name = g_build_filename (dir_name, file_dirent->d_name, NULL);
- if (lstat (link_name, &st)) {
- g_free (link_name);
- continue;
- }
-
- if (S_ISLNK (st.st_mode)) {
- gint length;
- gchar target[256];
-
- length = readlink (link_name, target, 255);
- if (length > 0) {
- gchar *retval;
- target[length] = '\0';
- retval = g_strdup (target);
- g_free (link_name);
- closedir (dir);
- return retval;
- }
-
- }
- g_free (link_name);
- }
- g_free (dir_name);
- closedir (dir);
- return NULL;
-}
-
-static void
-cursor_font_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- GtkTreeView *tree_view;
- gchar *cursor_font;
- gchar *cursor_text;
- GtkTreeIter iter;
- GtkTreeModel *model;
- GtkTreeSelection *selection;
-
- tree_view = GTK_TREE_VIEW (user_data);
- selection = gtk_tree_view_get_selection (tree_view);
- model = gtk_tree_view_get_model (tree_view);
-
- cursor_font = gconf_client_get_string (client, CURSOR_FONT_KEY, NULL);
- gtk_tree_model_get_iter_root (model, &iter);
-
- do {
- gchar *temp_cursor_font;
- gtk_tree_model_get (model, &iter,
- COLUMN_FONT_PATH, &temp_cursor_font,
- -1);
- if ((temp_cursor_font == NULL && cursor_font == NULL) ||
- ((temp_cursor_font != NULL && cursor_font != NULL) &&
- (!strcmp (cursor_font, temp_cursor_font)))) {
- if (!gtk_tree_selection_iter_is_selected (selection, &iter))
- gtk_tree_selection_select_iter (selection, &iter);
- g_free (temp_cursor_font);
- g_free (cursor_font);
- return;
- }
- g_free (temp_cursor_font);
- } while (gtk_tree_model_iter_next (model, &iter));
-
- /* we didn't find it; we add it to the end. */
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- cursor_text = g_strdup_printf ("<b>%s</b>\n%s", _("Unknown Cursor"), cursor_font);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_TEXT, cursor_text,
- COLUMN_FONT_PATH, cursor_font,
- -1);
- gtk_tree_selection_select_iter (selection, &iter);
-
- g_free (cursor_font);
- g_free (cursor_text);
-}
-
-static void
-cursor_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- GtkTreeModel *model = NULL;
- GtkTreeIter iter;
- gchar *cursor_font = NULL;
- GConfClient *client = gconf_client_get_default ();
-
- if (! gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- gtk_tree_model_get (model, &iter,
- COLUMN_FONT_PATH, &cursor_font,
- -1);
- if (cursor_font != NULL) {
- gconf_client_set_string (client,
- CURSOR_FONT_KEY, cursor_font, NULL);
- g_free (cursor_font);
- } else
- gconf_client_unset (client,
- CURSOR_FONT_KEY, NULL);
- g_object_unref (client);
-}
-
-/* Set up the property editors in the dialog. */
-static void
-setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GObject *peditor;
- GtkWidget *tree_view;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkCellRenderer *renderer;
- GtkTreeViewColumn *column;
- GtkTreeIter iter;
- GConfValue *value;
- gchar *filename;
- GdkPixbuf *pixbuf;
- GnomeProgram *program;
- gchar *cursor_font;
- gchar *font_path;
- gchar *cursor_string;
- gboolean found_default;
- gchar *message;
-
- GConfClient *client = gconf_client_get_default ();
-
- program = gnome_program_get ();
- found_default = FALSE;
-
- /* Buttons page */
- /* Left-handed toggle */
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/peripherals/mouse/left_handed", WID ("left_handed_toggle"), NULL);
- g_signal_connect (peditor, "value-changed", (GCallback) left_handed_toggle_cb, WID ("orientation_image"));
-
- /* Make sure the image gets initialized correctly */
- value = gconf_client_get (client, "/desktop/gnome/peripherals/mouse/left_handed", NULL);
- left_handed_toggle_cb (GCONF_PROPERTY_EDITOR (peditor), NULL, value, WID ("orientation_image"));
- gconf_value_free (value);
-
- /* Double-click time */
- peditor = gconf_peditor_new_numeric_range
- (changeset, DOUBLE_CLICK_KEY, WID ("delay_scale"),
- "conv-to-widget-cb", double_click_from_gconf,
- NULL);
- g_signal_connect (G_OBJECT (WID ("delay_scale")), "value_changed", (GCallback) delay_value_changed_cb, dialog);
- gtk_widget_set_size_request (WID ("delay_scale"), 150, -1);
- gtk_image_set_from_stock (GTK_IMAGE (WID ("double_click_image")), MOUSE_DBLCLCK_OFF, mouse_capplet_dblclck_icon_get_size ());
- g_object_set_data (G_OBJECT (WID ("double_click_eventbox")), "image", WID ("double_click_image"));
- g_signal_connect (WID ("double_click_eventbox"), "button_press_event",
- G_CALLBACK (event_box_button_press_event), changeset);
-
- /* set the timeout value label with correct value of timeout */
- message = g_strdup_printf ("%.1f %s", gtk_range_get_value (GTK_RANGE (WID ("delay_scale"))) / 1000.0, _("seconds"));
- gtk_label_set_label ((GtkLabel*) WID ("delay_label"), message);
- g_free (message);
-
- /* Cursors page */
- tree_view = WID ("cursor_tree");
- cursor_font = read_cursor_font ();
-
-
-
-
- model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING);
- gtk_tree_view_set_model (GTK_TREE_VIEW (tree_view), model);
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (tree_view));
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE);
- g_signal_connect (G_OBJECT (selection), "changed", G_CALLBACK (cursor_changed), NULL);
- column = gtk_tree_view_column_new ();
- renderer = gtk_cell_renderer_pixbuf_new ();
- gtk_tree_view_column_pack_start (column, renderer, FALSE);
- gtk_tree_view_column_set_attributes (column, renderer,
- "pixbuf", COLUMN_PIXBUF,
- NULL);
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_column_pack_start (column, renderer, TRUE);
- gtk_tree_view_column_set_attributes (column, renderer,
- "markup", COLUMN_TEXT,
- NULL);
-
- /* Default cursor */
- filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "mouse-cursor-normal.png", TRUE, NULL);
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- if (cursor_font == NULL) {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Default Cursor - Current"), _("The default cursor that ships with X"));
- found_default = TRUE;
- } else {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Default Cursor"), _("The default cursor that ships with X"));
- }
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_TEXT, cursor_string,
- COLUMN_FONT_PATH, NULL,
- -1);
- g_free (cursor_string);
-
- /* Inverted cursor */
- filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "mouse-cursor-white.png", TRUE, NULL);
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
- font_path = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_DATADIR, "gnome/cursor-fonts/cursor-white.pcf", FALSE, NULL);
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- if (cursor_font && ! strcmp (cursor_font, font_path)) {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("White Cursor - Current"), _("The default cursor inverted"));
- found_default = TRUE;
- } else {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("White Cursor"), _("The default cursor inverted"));
- }
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_TEXT, cursor_string,
- COLUMN_FONT_PATH, font_path,
- -1);
- g_free (font_path);
- g_free (cursor_string);
-
- /* Large cursor */
- filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "mouse-cursor-normal-large.png", TRUE, NULL);
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
- font_path = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_DATADIR, "gnome/cursor-fonts/cursor-large.pcf", FALSE, NULL);
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- if (cursor_font && ! strcmp (cursor_font, font_path)) {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Large Cursor - Current"), _("Large version of normal cursor"));
- found_default = TRUE;
- } else {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Large Cursor"), _("Large version of normal cursor"));
- }
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_TEXT, cursor_string,
- COLUMN_FONT_PATH, font_path,
- -1);
- g_free (font_path);
- g_free (cursor_string);
-
- /* Large inverted cursor */
- filename = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_APP_PIXMAP, "mouse-cursor-white-large.png", TRUE, NULL);
- pixbuf = gdk_pixbuf_new_from_file (filename, NULL);
- g_free (filename);
- font_path = gnome_program_locate_file (program, GNOME_FILE_DOMAIN_DATADIR, "gnome/cursor-fonts/cursor-large-white.pcf", FALSE, NULL);
-
- gtk_list_store_append (GTK_LIST_STORE (model), &iter);
- if (cursor_font && ! strcmp (cursor_font, font_path)) {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Large White Cursor - Current"), _("Large version of white cursor"));
- found_default = TRUE;
- } else {
- cursor_string = g_strdup_printf ("<b>%s</b>\n%s", _("Large White Cursor"), _("Large version of white cursor"));
- }
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- COLUMN_PIXBUF, pixbuf,
- COLUMN_TEXT, cursor_string,
- COLUMN_FONT_PATH, font_path,
- -1);
- g_free (font_path);
- g_free (cursor_string);
-
- g_free (cursor_font);
-
- gtk_tree_view_append_column (GTK_TREE_VIEW (tree_view), column);
-
- gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/peripherals/mouse/locate_pointer", WID ("locate_pointer_toggle"), NULL);
-
- gconf_peditor_new_select_radio (changeset,
- CURSOR_SIZE_KEY,
- gtk_radio_button_get_group (GTK_RADIO_BUTTON (WID ("cursor_size_small_radio"))),
- "conv-to-widget-cb", cursor_size_to_widget,
- "conv-from-widget-cb", cursor_size_from_widget,
- NULL);
-
-
- /* Motion page */
- /* speed */
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/peripherals/mouse/motion_acceleration", WID ("accel_scale"),
- "conv-to-widget-cb", motion_acceleration_from_gconf,
- "conv-from-widget-cb", motion_acceleration_to_gconf,
- NULL);
-
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/peripherals/mouse/motion_threshold", WID ("sensitivity_scale"),
- "conv-to-widget-cb", threshold_from_gconf,
- NULL);
-
- /* DnD threshold */
- gconf_peditor_new_numeric_range
- (changeset, "/desktop/gnome/peripherals/mouse/drag_threshold", WID ("drag_threshold_scale"),
- "conv-to-widget-cb", drag_threshold_from_gconf,
- NULL);
-
- /* listen to cursors changing */
- gconf_client_notify_add (client,
- CURSOR_FONT_KEY,
- cursor_font_changed,
- tree_view, NULL, NULL);
-
- /* and set it up initially... */
- cursor_font_changed (client, 0, NULL, tree_view);
- g_object_unref (client);
-}
-
-/* Construct the dialog */
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
- GtkSizeGroup *size_group;
- gchar *text;
-
- /* register the custom type */
- (void) mouse_capplet_check_button_get_type ();
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-mouse-properties.glade", "mouse_properties_dialog", NULL);
-
- if (server_supports_xcursor) {
- gtk_widget_hide (WID ("cursor_font_vbox"));
- gtk_widget_show (WID ("cursor_size_vbox"));
- text = g_strdup_printf ("<b>%s</b>", _("Cursor Size"));
- gtk_label_set_markup (GTK_LABEL (WID ("cursor_category_label")), text);
- g_free (text);
- gtk_box_set_child_packing (GTK_BOX (WID ("cursors_vbox")),
- WID ("cursor_appearance_vbox"),
- FALSE, TRUE, 0, GTK_PACK_START);
- } else {
- gtk_widget_hide (WID ("cursor_size_vbox"));
- gtk_widget_show (WID ("cursor_font_vbox"));
- text = g_strdup_printf ("<b>%s</b>", _("Cursor Theme"));
- gtk_label_set_markup (GTK_LABEL (WID ("cursor_category_label")), text);
- g_free (text);
- gtk_box_set_child_packing (GTK_BOX (WID ("cursors_vbox")),
- WID ("cursor_appearance_vbox"),
- TRUE, TRUE, 0, GTK_PACK_START);
- }
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("acceleration_label"));
- gtk_size_group_add_widget (size_group, WID ("sensitivity_label"));
- gtk_size_group_add_widget (size_group, WID ("threshold_label"));
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("high_label"));
- gtk_size_group_add_widget (size_group, WID ("fast_label"));
- gtk_size_group_add_widget (size_group, WID ("large_label"));
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("low_label"));
- gtk_size_group_add_widget (size_group, WID ("slow_label"));
- gtk_size_group_add_widget (size_group, WID ("small_label"));
-
- return dialog;
-}
-
-/* Callback issued when a button is clicked on the dialog */
-
-static void
-dialog_response_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustperiph-5");
- else
- gtk_main_quit ();
-}
-
-int
-main (int argc, char **argv)
-{
- GConfClient *client;
- GConfChangeSet *changeset;
- GladeXML *dialog;
- GtkWidget *dialog_win;
-
- static gboolean get_legacy;
- static struct poptOption cap_options[] = {
- { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0,
- N_("Retrieve and store legacy settings"), NULL },
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-mouse-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_POPT_TABLE, cap_options,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- capplet_init_stock_icons ();
-
- activate_settings_daemon ();
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, "/desktop/gnome/peripherals/mouse", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- g_object_unref (client);
-
- if (get_legacy) {
- get_legacy_settings ();
- } else {
- changeset = NULL;
- dialog = create_dialog ();
- setup_dialog (dialog, changeset);
-
- dialog_win = WID ("mouse_properties_dialog");
- g_signal_connect (dialog_win, "response",
- G_CALLBACK (dialog_response_cb), changeset);
-
- capplet_set_icon (dialog_win, "gnome-dev-mouse-optical");
- gtk_widget_show (dialog_win);
-
- gtk_main ();
- }
-
- return 0;
-}
diff --git a/capplets/mouse/gnome-mouse-properties.glade b/capplets/mouse/gnome-mouse-properties.glade
deleted file mode 100644
index 7c796b741..000000000
--- a/capplets/mouse/gnome-mouse-properties.glade
+++ /dev/null
@@ -1,1288 +0,0 @@
-<?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="mouse_properties_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Mouse Preferences</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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">2</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="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>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="orientation_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Mouse Orientation&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="MouseCappletCheckButton" id="left_handed_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Left-handed mouse</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>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkImage" id="orientation_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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>
-
- <child>
- <widget class="GtkVBox" id="vbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="delay_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Double-Click Timeout &lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Timeout:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">delay_scale</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHScale" id="delay_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_RIGHT</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">400 100 1000 100 100 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="delay_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</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="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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkEventBox" id="double_click_eventbox">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkImage" id="double_click_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </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">Buttons</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkVBox" id="cursors_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="cursor_appearance_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="cursor_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes"></property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="cursor_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkVBox" id="cursor_size_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="cursor_size_small_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Small</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="cursor_size_medium_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Medium</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>
- <property name="group">cursor_size_small_radio</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="cursor_size_large_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Large</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>
- <property name="group">cursor_size_small_radio</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>
-
- <child>
- <widget class="GtkVBox" id="cursor_font_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTreeView" id="cursor_tree">
- <property name="width_request">350</property>
- <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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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="GtkLabel" id="logout_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;&lt;small&gt;&lt;b&gt;Note:&lt;/b&gt; Changes to this setting will not take effect until next time you log in.&lt;/small&gt;&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="cursor_locate_pointer_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="locate_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Locate Pointer&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="locate_pointer_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Highlight the _pointer when you press Ctrl</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Cursors</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="speed_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Speed&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">4</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="acceleration_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Acceleration:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">accel_scale</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="sensitivity_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Sensitivity:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">sensitivity_scale</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="fast_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Fast&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="high_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;High&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="sensitivity_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">1 1 10 1 1 0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="accel_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_RIGHT</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">6 1 10 1 1 0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="slow_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Slow&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="low_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Low&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </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">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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>
-
- <child>
- <widget class="GtkVBox" id="vbox13">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="dnd_category_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Drag and Drop&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox12">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="threshold_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Threshold:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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">drag_threshold_scale</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="small_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Small&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHScale" id="drag_threshold_scale">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">False</property>
- <property name="value_pos">GTK_POS_TOP</property>
- <property name="digits">0</property>
- <property name="update_policy">GTK_UPDATE_DISCONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">1 1 10 1 1 0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="large_label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;i&gt;Large&lt;/i&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">1</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">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</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="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Motion</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/mouse/gnome-settings-mouse.desktop.in.in b/capplets/mouse/gnome-settings-mouse.desktop.in.in
deleted file mode 100644
index b78312818..000000000
--- a/capplets/mouse/gnome-settings-mouse.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Mouse
-_Comment=Set your mouse preferences
-Exec=gnome-mouse-properties
-Icon=gnome-dev-mouse-optical
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=mouse
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/mouse/mouse-cursor-normal-large.png b/capplets/mouse/mouse-cursor-normal-large.png
deleted file mode 100644
index afef4ea8e..000000000
--- a/capplets/mouse/mouse-cursor-normal-large.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/mouse-cursor-normal.png b/capplets/mouse/mouse-cursor-normal.png
deleted file mode 100644
index 1d9351c80..000000000
--- a/capplets/mouse/mouse-cursor-normal.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/mouse-cursor-white-large.png b/capplets/mouse/mouse-cursor-white-large.png
deleted file mode 100644
index 8f98438a4..000000000
--- a/capplets/mouse/mouse-cursor-white-large.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/mouse-cursor-white.png b/capplets/mouse/mouse-cursor-white.png
deleted file mode 100644
index 2be63acdb..000000000
--- a/capplets/mouse/mouse-cursor-white.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/mouse-left.png b/capplets/mouse/mouse-left.png
deleted file mode 100644
index 8eb13b49c..000000000
--- a/capplets/mouse/mouse-left.png
+++ /dev/null
Binary files differ
diff --git a/capplets/mouse/mouse-right.png b/capplets/mouse/mouse-right.png
deleted file mode 100644
index 022c69c09..000000000
--- a/capplets/mouse/mouse-right.png
+++ /dev/null
Binary files differ
diff --git a/capplets/network/.cvsignore b/capplets/network/.cvsignore
deleted file mode 100644
index adb2e4313..000000000
--- a/capplets/network/.cvsignore
+++ /dev/null
@@ -1,10 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-gnome-network-preferences
-gnome-network-preferences.desktop
-gnome-network-preferences.desktop.in
diff --git a/capplets/network/ChangeLog b/capplets/network/ChangeLog
deleted file mode 100644
index 48b7aeead..000000000
--- a/capplets/network/ChangeLog
+++ /dev/null
@@ -1,268 +0,0 @@
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.glade: Use HIG compliant spacing
- for the proxy dialog, patch by dennis_cranston@yahoo.com
- (Closes: #167856).
-
-2005-05-16 Olav Vitters <olav@bkor.dhs.org>
-
- * gnome-network-preferences.glade:
- Make proxy settings HIG compliant. Patch by Jorn Baayen.
-
- Fixes bug #167856
-
-2005-02-04 Shakti Sen <shprasad@novell.com>
-
- * gnome-network-preferences.c (cb_add_url, cb_remove_url):
- Adding/Removing the host name instantly to/from gconf.
-
- Fixes bug #166233
-
-2005-01-11 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.c: (create_listmodel),
- (populate_listmodel), (config_treeview), (cb_add_url),
- (cb_remove_url), (cb_dialog_response), (setup_dialog):
- * gnome-network-preferences.glade:
- patch from Adriano Del Vigna <adriano.delvigna@freedows.com> to add
- a proxy exclusion list configuration (Closes: #147666).
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-12-15 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.desktop.in.in: changed the tooltip
- to respect the HIG.
-
-2004-12-03 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.glade: use "Preferences" for the window
- title (like the other capplets) instead of "Configuration",
- bug noticed by Lars Weber <me@lars.in-berlin.de> (Closes: #132391).
-
-2004-11-21 Sebastien Bacher <seb128@debian.org>
-
- * gnome-network-preferences.c: (cb_http_details_button_clicked):
- use the stock_proxy icon for the capplet (Closes: #130624).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * gnome-network-preferences.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-06-26 Muktha <muktha.narayan@wipro.com>
-
- * gnome-network-preferences.glade: Allow only numeric values in
- spin buttons. Fixes #138654.
-
-2004-06-21 David Sedeño <david@alderia.com>
-
- * gnome-network-preferences.glade: Change mnemonic for Username.
- Fixes bug #144333
-
-2004-05-18 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-network-preferences.glade: Mark accessible names for
- translation. Fixes bug #136291.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-07 Jody Goldberg <jody@gnome.org>
-
- * gnome-network-preferences.c : sync the icon with the desktop file
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-03-05 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-network-preferences.glade: Add accessible names for port
- entry fields. Fixes more of bug #126714.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-network-preferences.c: (cb_dialog_response),
- (cb_details_dialog_response): Update help link to point to
- user-guide.xml
-
-2004-01-16 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-network-preferences.glade: Move some declarations so that
- AtkRelations are defined. Fixes bug #126714.
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-Tue Aug 26 15:00:34 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-network-preferences.c (setup_dialog): Work around peditor
- bug that resets the port when we start up for the first time,
- #120111
-
-2003-07-18 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-network-capplet.png: New file.
-
- * Makefile.am, gnome-network-preferences.c: Add the missing
- window icon.
-
-2003-07-18 Christian Neumair <chris@gnome-de.org>
-
- * gnome-network-preferences.glade: Some more padding fixes.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-network-preferences.glade: Minor HIG widget padding
- adjustments. Fix a mnemonic conflict.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-15 Malcolm Tredinnick <malcolm@commsecure.com.au>
-
- * gnome-network-preferences.desktop.in: Use Header
- capitalisation for menu items. Fixes bug #112939.
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-02-05 Pasupathi Duraisamy <pasupathi.duraisamy@wipro.com>
-
- * gnome-network-preferences.c: Added "/system/proxy" and
- "/system/http_proxy" to the list of directories GConfClient
- will watch. Fixes #98596
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * gnome-network-preferences.desktop.in: Fix the desktop file so
- that it validates.
-
-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
- * gnome-network-preferences.c (extract_proxy_host) : validate.
- This is not the prettiest way to do this, but it is effective.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-network-preferences.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * gnome-network-preferences.c (cb_dialog_response) : Improve handling
- of help failures.
-
-Sun May 26 11:45:26 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-network-preferences.c (main): use APPID instead of argv[0]
-
-2002-05-15 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-network-preferences.c (setup_dialog): kill workaround
- libglade bug that has since been fixed.
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * gnome-network-preferences.glade : add help.
-
- * gnome-network-preferences.c (cb_dialog_response) : fix help.
-
diff --git a/capplets/network/Makefile.am b/capplets/network/Makefile.am
deleted file mode 100644
index fe966faf6..000000000
--- a/capplets/network/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-bin_PROGRAMS = gnome-network-preferences
-
-gnome_network_preferences_SOURCES = gnome-network-preferences.c
-gnome_network_preferences_LDADD = \
- $(GNOMECC_CAPPLETS_LIBS)
-
-@INTLTOOL_DESKTOP_RULE@
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = gnome-network-preferences.glade
-
-desktopdir = $(datadir)/applications
-desktop_in_files = gnome-network-preferences.desktop.in
-desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA)
diff --git a/capplets/network/gnome-network-preferences.c b/capplets/network/gnome-network-preferences.c
deleted file mode 100644
index 5a6fceb1c..000000000
--- a/capplets/network/gnome-network-preferences.c
+++ /dev/null
@@ -1,448 +0,0 @@
-/* gnome-network-preferences.c: network preferences capplet
- *
- * Copyright (C) 2002 Sun Microsystems Inc.
- *
- * Written by: Mark McLoughlin <mark@skynet.ie>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <libgnome/libgnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-uri.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-
-enum ProxyMode
-{
- PROXYMODE_NONE,
- PROXYMODE_MANUAL,
- PROXYMODE_AUTO
-};
-
-static GEnumValue proxytype_values[] = {
- { PROXYMODE_NONE, "PROXYMODE_NONE", "none"},
- { PROXYMODE_MANUAL, "PROXYMODE_MANUAL", "manual"},
- { PROXYMODE_AUTO, "PROXYMODE_AUTO", "auto"},
- { 0, NULL, NULL }
-};
-
-#define USE_PROXY_KEY "/system/http_proxy/use_http_proxy"
-#define HTTP_PROXY_HOST_KEY "/system/http_proxy/host"
-#define HTTP_PROXY_PORT_KEY "/system/http_proxy/port"
-#define HTTP_USE_AUTH_KEY "/system/http_proxy/use_authentication"
-#define HTTP_AUTH_USER_KEY "/system/http_proxy/authentication_user"
-#define HTTP_AUTH_PASSWD_KEY "/system/http_proxy/authentication_password"
-#define IGNORE_HOSTS_KEY "/system/http_proxy/ignore_hosts"
-#define PROXY_MODE_KEY "/system/proxy/mode"
-#define SECURE_PROXY_HOST_KEY "/system/proxy/secure_host"
-#define SECURE_PROXY_PORT_KEY "/system/proxy/secure_port"
-#define FTP_PROXY_HOST_KEY "/system/proxy/ftp_host"
-#define FTP_PROXY_PORT_KEY "/system/proxy/ftp_port"
-#define SOCKS_PROXY_HOST_KEY "/system/proxy/socks_host"
-#define SOCKS_PROXY_PORT_KEY "/system/proxy/socks_port"
-#define PROXY_AUTOCONFIG_URL_KEY "/system/proxy/autoconfig_url"
-
-static GtkWidget *details_dialog = NULL;
-static GSList *ignore_hosts = NULL;
-static GtkTreeModel *model = NULL;
-
-static GtkTreeModel *
-create_listmodel()
-{
- GtkListStore *store;
-
- store = gtk_list_store_new(1, G_TYPE_STRING);
-
- return GTK_TREE_MODEL(store);
-}
-
-static GtkTreeModel *
-populate_listmodel(GtkListStore *store, GSList *list)
-{
- GtkTreeIter iter;
- GSList *pointer;
-
- gtk_list_store_clear(store);
-
- pointer = list;
- while(pointer)
- {
- gtk_list_store_append(store, &iter);
- gtk_list_store_set(store, &iter, 0, (char *) pointer->data, -1);
- pointer = g_slist_next(pointer);
- }
-
- return GTK_TREE_MODEL(store);
-}
-
-static GtkWidget *
-config_treeview(GtkTreeView *tree, GtkTreeModel *model)
-{
- GtkCellRenderer *renderer;
-
- renderer = gtk_cell_renderer_text_new();
- gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(tree),
- -1, "Hosts", renderer,
- "text", 0, NULL);
-
- gtk_tree_view_set_model(GTK_TREE_VIEW(tree), model);
-
- return GTK_WIDGET(tree);
-}
-
-static void
-cb_add_url (GtkButton *button, gpointer data)
-{
- GladeXML *dialog = (GladeXML *) data;
- gchar *new_url = NULL;
- GConfClient *client;
-
- new_url = g_strdup(gtk_entry_get_text(GTK_ENTRY(WID("entry_url"))));
- if (strlen (new_url) == 0)
- return;
- g_slist_append(ignore_hosts, new_url);
- populate_listmodel(GTK_LIST_STORE(model), ignore_hosts);
- gtk_entry_set_text(GTK_ENTRY(WID("entry_url")), "");
-
- client = gconf_client_get_default ();
- gconf_client_set_list (client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, ignore_hosts, NULL);
- g_object_unref (client);
-}
-
-static void
-cb_remove_url (GtkButton *button, gpointer data)
-{
- GladeXML *dialog = (GladeXML *) data;
- GtkTreeSelection *selection;
- GtkTreeIter iter;
- GConfClient *client;
-
- selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(WID("treeview_ignore_host")));
- if (gtk_tree_selection_get_selected(selection, &model, &iter))
- {
- gchar *url;
- GSList *pointer;
-
- gtk_tree_model_get (model, &iter, 0, &url, -1);
-
- pointer = ignore_hosts;
- while(pointer)
- {
- if(strcmp(url, (char *) pointer->data) == 0)
- {
- ignore_hosts = g_slist_delete_link(ignore_hosts, pointer);
- break;
- }
- pointer = g_slist_next(pointer);
- }
-
- g_free(url);
- populate_listmodel(GTK_LIST_STORE(model), ignore_hosts);
-
- client = gconf_client_get_default ();
- gconf_client_set_list(client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, ignore_hosts, NULL);
- g_object_unref (client);
- }
-}
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustdesk-50");
- else
- {
- if(ignore_hosts)
- g_slist_free(ignore_hosts);
-
- gtk_main_quit ();
- }
-}
-
-static void
-cb_details_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustdesk-50");
- else {
- gtk_widget_destroy (GTK_WIDGET (dialog));
- details_dialog = NULL;
- }
-}
-
-static void
-cb_use_auth_toggled (GtkToggleButton *toggle,
- GtkWidget *table)
-{
- gtk_widget_set_sensitive (table, toggle->active);
-}
-
-static void
-cb_http_details_button_clicked (GtkWidget *button,
- GtkWidget *parent)
-{
- GladeXML *dialog;
- GtkWidget *widget;
- GConfPropertyEditor *peditor;
-
- if (details_dialog != NULL) {
- gtk_window_present (GTK_WINDOW (details_dialog));
- gtk_widget_grab_focus (details_dialog);
- return;
- }
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-network-preferences.glade",
- "details_dialog", NULL);
-
- details_dialog = widget = WID ("details_dialog");
-
- gtk_window_set_transient_for (GTK_WINDOW (widget), GTK_WINDOW (parent));
-
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("use_auth_checkbutton"))->child), TRUE);
-
- g_signal_connect (G_OBJECT (WID ("use_auth_checkbutton")),
- "toggled",
- G_CALLBACK (cb_use_auth_toggled),
- WID ("auth_table"));
-
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_boolean (
- NULL, HTTP_USE_AUTH_KEY, WID ("use_auth_checkbutton"),
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, HTTP_AUTH_USER_KEY, WID ("username_entry"),
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, HTTP_AUTH_PASSWD_KEY, WID ("password_entry"),
- NULL));
-
- g_signal_connect (widget, "response",
- G_CALLBACK (cb_details_dialog_response), NULL);
-
- capplet_set_icon (widget, "stock_proxy");
-
- gtk_widget_show_all (widget);
-}
-
-static GConfValue *
-extract_proxy_host (GConfPropertyEditor *peditor, const GConfValue *orig)
-{
- char const *entered_text = gconf_value_get_string (orig);
- GConfValue *res = NULL;
-
- if (entered_text != NULL) {
- GnomeVFSURI *uri = gnome_vfs_uri_new (entered_text);
- if (uri != NULL) {
- char const *host = gnome_vfs_uri_get_host_name (uri);
- if (host != NULL) {
- res = gconf_value_new (GCONF_VALUE_STRING);
- gconf_value_set_string (res, host);
- }
- gnome_vfs_uri_unref (uri);
- }
- }
-
- if (res != NULL)
- return res;
- return gconf_value_copy (orig);
-}
-
-static void
-proxy_mode_radiobutton_clicked_cb (GtkWidget *widget,
- GladeXML *dialog)
-{
- GSList *mode_group;
- int mode;
- GConfClient *client;
-
- if (!gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(widget)))
- return;
-
- mode_group = g_slist_copy (gtk_radio_button_get_group
- (GTK_RADIO_BUTTON (WID ("none_radiobutton"))));
- mode_group = g_slist_reverse (mode_group);
- mode = g_slist_index (mode_group, widget);
- g_slist_free (mode_group);
-
- gtk_widget_set_sensitive (WID ("manual_box"),
- mode == PROXYMODE_MANUAL);
- gtk_widget_set_sensitive (WID ("auto_box"),
- mode == PROXYMODE_AUTO);
- client = gconf_client_get_default ();
- gconf_client_set_bool (client, USE_PROXY_KEY,
- mode == PROXYMODE_AUTO || mode == PROXYMODE_MANUAL, NULL);
- g_object_unref (client);
-}
-
-static void
-connect_sensitivity_signals (GladeXML *dialog, GSList *mode_group)
-{
- for (; mode_group != NULL; mode_group = mode_group->next)
- {
- g_signal_connect (G_OBJECT (mode_group->data), "clicked",
- G_CALLBACK(proxy_mode_radiobutton_clicked_cb),
- dialog);
- }
-}
-
-static void
-setup_dialog (GladeXML *dialog)
-{
- GConfPropertyEditor *peditor;
- GSList *mode_group;
- GType mode_type = 0;
- GConfClient *client;
- gint port_value;
-
- mode_type = g_enum_register_static ("NetworkPreferencesProxyType",
- proxytype_values);
-
- /* There's a bug in peditors that cause them to not initialize the entry
- * correctly. */
- client = gconf_client_get_default ();
-
- /* Hackety hack */
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("none_radiobutton"))->child), TRUE);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("manual_radiobutton"))->child), TRUE);
- gtk_label_set_use_markup (GTK_LABEL (GTK_BIN (WID ("auto_radiobutton"))->child), TRUE);
-
- /* Mode */
- mode_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (WID ("none_radiobutton")));
- connect_sensitivity_signals (dialog, mode_group);
-
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_select_radio_with_enum (NULL,
- PROXY_MODE_KEY, mode_group, mode_type,
- TRUE, NULL));
-
- /* Http */
- port_value = gconf_client_get_int (client, HTTP_PROXY_PORT_KEY, NULL);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("http_port_spinbutton")), (gdouble) port_value);
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, HTTP_PROXY_HOST_KEY, WID ("http_host_entry"),
- "conv-from-widget-cb", extract_proxy_host,
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_integer (
- NULL, HTTP_PROXY_PORT_KEY, WID ("http_port_spinbutton"),
- NULL));
- g_signal_connect (G_OBJECT (WID ("details_button")),
- "clicked",
- G_CALLBACK (cb_http_details_button_clicked),
- WID ("network_dialog"));
-
- /* Secure */
- port_value = gconf_client_get_int (client, SECURE_PROXY_PORT_KEY, NULL);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("secure_port_spinbutton")), (gdouble) port_value);
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, SECURE_PROXY_HOST_KEY, WID ("secure_host_entry"),
- "conv-from-widget-cb", extract_proxy_host,
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_integer (
- NULL, SECURE_PROXY_PORT_KEY, WID ("secure_port_spinbutton"),
- NULL));
-
- /* Ftp */
- port_value = gconf_client_get_int (client, FTP_PROXY_PORT_KEY, NULL);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("ftp_port_spinbutton")), (gdouble) port_value);
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, FTP_PROXY_HOST_KEY, WID ("ftp_host_entry"),
- "conv-from-widget-cb", extract_proxy_host,
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_integer (
- NULL, FTP_PROXY_PORT_KEY, WID ("ftp_port_spinbutton"),
- NULL));
-
- /* Socks */
- port_value = gconf_client_get_int (client, SOCKS_PROXY_PORT_KEY, NULL);
- gtk_spin_button_set_value (GTK_SPIN_BUTTON (WID ("socks_port_spinbutton")), (gdouble) port_value);
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, SOCKS_PROXY_HOST_KEY, WID ("socks_host_entry"),
- "conv-from-widget-cb", extract_proxy_host,
- NULL));
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_integer (
- NULL, SOCKS_PROXY_PORT_KEY, WID ("socks_port_spinbutton"),
- NULL));
-
- /* Autoconfiguration */
- peditor = GCONF_PROPERTY_EDITOR (gconf_peditor_new_string (
- NULL, PROXY_AUTOCONFIG_URL_KEY, WID ("autoconfig_entry"),
- NULL));
-
- g_signal_connect (WID ("network_dialog"), "response",
- G_CALLBACK (cb_dialog_response), NULL);
-
-
- gtk_label_set_use_markup (GTK_LABEL (WID ("label_ignore_host")), TRUE);
- ignore_hosts = gconf_client_get_list(client, IGNORE_HOSTS_KEY, GCONF_VALUE_STRING, NULL);
- g_object_unref (client);
-
- model = create_listmodel();
- populate_listmodel(GTK_LIST_STORE(model), ignore_hosts);
- config_treeview(GTK_TREE_VIEW(WID("treeview_ignore_host")), model);
-
- g_signal_connect (WID ("button_add_url"), "clicked",
- G_CALLBACK (cb_add_url), dialog);
- g_signal_connect (WID ("entry_url"), "activate",
- G_CALLBACK (cb_add_url), dialog);
- g_signal_connect (WID ("button_remove_url"), "clicked",
- G_CALLBACK (cb_remove_url), dialog);
-}
-
-int
-main (int argc, char **argv)
-{
- GladeXML *dialog;
- GConfClient *client;
- GtkWidget *widget;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-network-preferences", VERSION,
- LIBGNOMEUI_MODULE,
- argc, argv, GNOME_PARAM_NONE);
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, "/system/gnome-vfs",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/system/http_proxy",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/system/proxy",
- GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-network-preferences.glade",
- "network_dialog", NULL);
-
- setup_dialog (dialog);
- widget = WID ("network_dialog");
- capplet_set_icon (widget, "stock_proxy");
- gtk_widget_show_all (widget);
- gtk_main ();
-
- g_object_unref (client);
-
- return 0;
-}
diff --git a/capplets/network/gnome-network-preferences.desktop.in.in b/capplets/network/gnome-network-preferences.desktop.in.in
deleted file mode 100644
index 83520f088..000000000
--- a/capplets/network/gnome-network-preferences.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Network Proxy
-_Comment=Set your network proxy preferences
-Exec=gnome-network-preferences
-Icon=stock_proxy
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=network preferences
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/network/gnome-network-preferences.glade b/capplets/network/gnome-network-preferences.glade
deleted file mode 100644
index f072847c4..000000000
--- a/capplets/network/gnome-network-preferences.glade
+++ /dev/null
@@ -1,1266 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="network_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Network Proxy Preferences</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">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="focus_on_click">True</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="focus_on_click">True</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="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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkRadioButton" id="none_radiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Direct internet connection&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="no_direct_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="manual_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="manual_radiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Manual proxy configuration&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none_radiobutton</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="manual_box">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="manual_table">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">5</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label6">
- <property name="visible">True</property>
- <property name="label" translatable="yes">H_TTP proxy:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">http_host_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Secure HTTP proxy:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">secure_host_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_FTP proxy:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">ftp_host_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</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="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">S_ocks host:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">socks_host_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="http_host_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="secure_host_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="ftp_host_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</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="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="socks_host_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Port:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Port:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Port:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</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="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Port:</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="http_port_spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="secure_port_spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="ftp_port_spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkSpinButton" id="socks_port_spinbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="climb_rate">1</property>
- <property name="digits">0</property>
- <property name="numeric">False</property>
- <property name="update_policy">GTK_UPDATE_ALWAYS</property>
- <property name="snap_to_ticks">False</property>
- <property name="wrap">False</property>
- <property name="adjustment">0 0 65535 1 10 10</property>
- </widget>
- <packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="details_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Details</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">4</property>
- <property name="right_attach">5</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="auto_radiobutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Automatic proxy configuration&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">none_radiobutton</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="auto_box">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Autoconfiguration _URL:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">autoconfig_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="autoconfig_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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">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="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Proxy Configuration</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>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label_ignore_host">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Ignore Host List&lt;/b&gt;</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label22">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table1">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkEntry" id="entry_url">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="button_add_url">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="treeview_ignore_host">
- <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="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="yalign">0</property>
- <property name="xscale">1</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkButton" id="button_remove_url">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Advanced Configuration</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>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="type">tab</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="details_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">HTTP Proxy Details</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">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton2">
- <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="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="closebutton2">
- <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="focus_on_click">True</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="vbox3">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="use_auth_checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">&lt;b&gt;_Use authentication&lt;/b&gt;</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="auth_table">
- <property name="visible">True</property>
- <property name="sensitive">False</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">U_sername:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">username_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Password:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">password_entry</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="password_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">False</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkEntry" id="username_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char">*</property>
- <property name="activates_default">False</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/rollback/.cvsignore b/capplets/rollback/.cvsignore
deleted file mode 100644
index 40aa0bcbd..000000000
--- a/capplets/rollback/.cvsignore
+++ /dev/null
@@ -1,9 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-rollback-capplet
-rollback.desktop
diff --git a/capplets/rollback/ChangeLog b/capplets/rollback/ChangeLog
deleted file mode 100644
index f872d71c7..000000000
--- a/capplets/rollback/ChangeLog
+++ /dev/null
@@ -1,196 +0,0 @@
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * main.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2001-10-15 Jakub Steiner <jimmac@ximian.com>
-
- * rollback-capplet.png: the applet icon
-
-2001-09-14 Bradford Hovinen <hovinen@ximian.com>
-
- * rollback-capplet-dialog.c (rollback_capplet_dialog_init): Create
- apply and close buttons, ala the setup tools
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-10 Kai Lahmann <kl@linuxfaqs.de>
-
- * rollback.desktop: added german translation
-
-2001-07-05 Bradford Hovinen <hovinen@ximian.com>
-
- * config-manager-dialog.c: Update #include locations
-
- * Makefile.am (INCLUDES):
- (rollback_capplet_LDADD): Update to include ximian_archiver stuff
- correctly
-
-2001-01-29 Bradford Hovinen <hovinen@ximian.com>
-
- * rollback-widget.c (rollback_widget_realize): Check entire
- success array and warn if any allocation did not succeed
-
- * config-manager-dialog.c (cancel_cb): Don't do rollback
-
- * Makefile.am (rollback_capplet_SOURCES): Added rollback-control.[ch]
-
- * config-manager-dialog.c (config_manager_dialog_init): Construct
- a rollback widget with a rollback control and place it in the
- dialog
-
-2001-01-27 Bradford Hovinen <hovinen@ximian.com>
-
- * rollback-widget.c (rollback_widget_realize): Allocate control
- colors
-
- * rollback-widget.h (struct _RollbackWidget ): Added array
- control_colors
-
- * rollback-widget.c (rollback_widget_realize):
- (rollback_widget_unrealize): Implement. Just calls the parent's
- [un]realize and creates/destroys a GC to be used by the individual
- controls.
- (rollback_widget_get_gc): Implement. Return the GC created above
-
-2001-01-25 Bradford Hovinen <hovinen@ximian.com>
-
- * main.c (main): Support operating on global backends
- Add popt option for operating on global backends
-
-2001-01-24 Bradford Hovinen <hovinen@ximian.com>
-
- * config-manager-dialog.c (config_manager_dialog_finalize): Update
- unrefs
- (config_manager_dialog_init): GLADE_DIR -> GLADE_DATADIR
- (config_manager_dialog_init): Remove outdated signal connections
- (config_manager_dialog_init): Remove code to create location list
- Inherit from CappletWidget rather than GnomeDialog
- (config_manager_dialog_init): Remove gtk_window_set_policy call
- (ok_cb):
- (cancel_cb): Remove gnome_dialog_close call
- (config_manager_dialog_init): Set state to "changed" so that the
- Ok button is active
- (populate_backends_cb): Set backend_id in dialog if not already set
-
- * Makefile.am (INCLUDES): Changed CAPPLET_CFLAGS to
- ROLLBACK_CAPPLET_CFLAGS
- (rollback_capplet_LDADD): Ditto for CAPPLET_LIBS
-
- * config-manager-dialog.c: Remove #include
- "create-location-dialog.h" and #include "location-list.h"; set all
- the includes from libarchiver to get their files from the right
- directory
-
-2001-01-18 Bradford Hovinen <hovinen@ximian.com>
-
- * config-manager-dialog.c (do_rollback): Rewrite, add boolean
- rollback_to_last to signature
-
- * config-manager-dialog.h: Change base class to CappletWidget
-
diff --git a/capplets/rollback/Makefile.am b/capplets/rollback/Makefile.am
deleted file mode 100644
index 34973e174..000000000
--- a/capplets/rollback/Makefile.am
+++ /dev/null
@@ -1,34 +0,0 @@
-cappletname = rollback
-cappletgroup =
-
-bin_PROGRAMS = rollback-capplet
-
-rollback_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(top_builddir)/archiver/libconfig_archiver.la
-
-rollback_capplet_SOURCES = \
- rollback-capplet-dialog.c rollback-capplet-dialog.h \
- main.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-####@###GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
-$(desktop).in: %.desktop.in: %.desktop.in.in
- sed -e "s#@DESKTOP_EXEC_LINE@#$(DESKTOP_EXEC_LINE)#" -e "s#Icon=.*#Icon=$(GNOMECC_ICONS_DIR)/${cappletname}-capplet.png#" < $< > ${cappletname}.desktop.in
-
-install-data-local:
- $(mkinstalldirs) $(DESTDIR)$(datadir)/control-center/capplets/$(cappletgroup)
- $(INSTALL_DATA) $(desktop) $(DESTDIR)$(datadir)/control-center/capplets/$(cappletgroup)$(desktop)
-
-install-data-am: install-data-local
-####@###GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST)
-iconsdir = $(GNOMECC_ICONS_DIR)
-Gladedir = $(GNOMECC_GLADE_DIR)
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-Glade_DATA = $(cappletname).glade
-icons_DATA = $(cappletname)-capplet.png
-desktop = $(cappletname).desktop
-all-local: $(desktop)
diff --git a/capplets/rollback/TODO b/capplets/rollback/TODO
deleted file mode 100644
index fa0155866..000000000
--- a/capplets/rollback/TODO
+++ /dev/null
@@ -1,28 +0,0 @@
-Short-term
- * Accept command line argument to allow rollback of a specific backend
- * Remove backends list and rely on the above command line argument
- * Add logic in the control center to activate this capplet with the
- appropriate command line argument from menu items or a control
- connected with each capplet
- * Something that tells the user when he tries to go back so far in
- time that there is no configuration available from that date
- * Have config manager dialog set flag when rolling back and, upon
- cancel, only roll forward if that flag is set
-
-Long(er)-term
- * Somehow fix this so that the user sees the old configurations as he
- selects a time. The selection should be a slider that the user slides
- back and forth to roll forwards and backwards, and the user should see
- the configuration settings as reflected in the position of the slider.
- - This could just be put into libcapplet, so that the user
- sees this slider at all times. That could be a bit much for a lot of
- users, though.
- - This could be a bonobo component, acting as a container for
- capplets (which are then bonobo controls).
- - This could be a feature of libcapplet enabled by a command
- line switch
-
-Done
- * Get this thing to actually work
- * Accept command line argument to tell whether it's going to be user
- or global
diff --git a/capplets/rollback/main.c b/capplets/rollback/main.c
deleted file mode 100644
index 02ca69fb3..000000000
--- a/capplets/rollback/main.c
+++ /dev/null
@@ -1,80 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* main.c
- * Copyright (C) 2000-2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <bonobo.h>
-#include <glade/glade.h>
-
-#include "rollback-capplet-dialog.h"
-
-static gboolean is_global;
-static gchar *capplet_name;
-
-static struct poptOption rollback_options[] = {
- {"capplet", 'c', POPT_ARG_STRING, &capplet_name, 0,
- N_("Rollback the capplet given")},
- {"global", 'g', POPT_ARG_NONE, &is_global, 0,
- N_("Operate on global backends")},
- {NULL, '\0', 0, NULL, 0}
-};
-
-int
-main (int argc, char **argv)
-{
- CORBA_ORB orb;
- GtkObject *dialog;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnomelib_register_popt_table (rollback_options,
- _("Options for the rollback GUI"));
-
- gnome_init ("config-manager", VERSION, argc, argv);
- glade_gnome_init ();
-
- orb = oaf_init (argc, argv);
- if (bonobo_init (orb, CORBA_OBJECT_NIL, CORBA_OBJECT_NIL) == FALSE)
- g_error ("Cannot initialize bonobo");
-
- if (capplet_name != NULL) {
- dialog = rollback_capplet_dialog_new (capplet_name);
-
- if (dialog == NULL) {
- g_critical ("Could not create rollback dialog");
- return -1;
- } else {
- gtk_widget_show (GTK_WIDGET (dialog));
- gtk_signal_connect (dialog, "destroy", gtk_main_quit, NULL);
- }
- }
-
- bonobo_main ();
-
- return 0;
-}
diff --git a/capplets/rollback/rollback-capplet-dialog.c b/capplets/rollback/rollback-capplet-dialog.c
deleted file mode 100644
index 7cd020a15..000000000
--- a/capplets/rollback/rollback-capplet-dialog.c
+++ /dev/null
@@ -1,592 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-capplet-dialog.c
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <glade/glade.h>
-#include <bonobo.h>
-#include <gnome-xml/parser.h>
-
-#include <config-archiver/archiver-client.h>
-#include <config-archiver/util.h>
-
-#include "rollback-capplet-dialog.h"
-
-static const gchar date_mod_units[] = {
- 'y', 'M', 'M', 'd', 'd', 'd', 'h', 'm', 'm', 'm', 'm', '\0'
-};
-
-static const gint date_mod_values[] = {
- -1, -6, -1, -7, -3, -1, -1, -30, -10, -5, -1, 0
-};
-
-static const gchar *labels[] = {
- N_("1 year ago"), N_("6 months ago"), N_("1 month ago"), N_("1 week ago"),
- N_("3 days ago"), N_("1 day ago"), N_("1 hour ago"), N_("30 minutes ago"),
- N_("10 minutes ago"), N_("5 minutes ago"), N_("1 minute ago"), N_("Current time")
-};
-
-#define NUM_ROLLBACK_LEVELS (sizeof (labels) / sizeof (const gchar *))
-
-enum {
- ARG_0,
- ARG_CAPPLET_NAME
-};
-
-struct _RollbackCappletDialogPrivate
-{
- GladeXML *data;
- GtkWidget *contents;
- GtkWidget *control_socket;
- GtkWidget *label;
- gchar *capplet_name;
- gchar *capplet_moniker_name;
-
- Bonobo_PropertyControl property_control;
- Bonobo_PropertyBag control_pb;
-
- guint rollback_level;
-
- struct tm mod_dates[NUM_ROLLBACK_LEVELS - 1];
-};
-
-static GnomeDialogClass *parent_class;
-
-static void rollback_capplet_dialog_init (RollbackCappletDialog *rollback_capplet_dialog);
-static void rollback_capplet_dialog_class_init (RollbackCappletDialogClass *class);
-
-static void rollback_capplet_dialog_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void rollback_capplet_dialog_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-
-static void rollback_capplet_dialog_destroy (GtkObject *object);
-static void rollback_capplet_dialog_finalize (GtkObject *object);
-
-static gchar *get_moniker (gchar *capplet_name,
- struct tm *date);
-static void get_modified_date (guint rollback_level,
- struct tm *date);
-static gboolean do_setup (RollbackCappletDialog *dialog);
-static void apply_settings (RollbackCappletDialog *dialog);
-
-static gboolean is_leap_year (guint year);
-static void mod_date_by_str (struct tm *date,
- gint value,
- gchar unit);
-
-static void rollback_changed_cb (RollbackCappletDialog *dialog,
- GtkAdjustment *adj);
-static void apply_cb (GtkButton *button,
- RollbackCappletDialog *dialog);
-static void close_cb (GtkButton *button,
- RollbackCappletDialog *dialog);
-
-GType
-rollback_capplet_dialog_get_type (void)
-{
- static GType rollback_capplet_dialog_type = 0;
-
- if (!rollback_capplet_dialog_type) {
- GtkTypeInfo rollback_capplet_dialog_info = {
- "RollbackCappletDialog",
- sizeof (RollbackCappletDialog),
- sizeof (RollbackCappletDialogClass),
- (GtkClassInitFunc) rollback_capplet_dialog_class_init,
- (GtkObjectInitFunc) rollback_capplet_dialog_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- rollback_capplet_dialog_type =
- gtk_type_unique (gnome_dialog_get_type (),
- &rollback_capplet_dialog_info);
- }
-
- return rollback_capplet_dialog_type;
-}
-
-static void
-rollback_capplet_dialog_init (RollbackCappletDialog *dialog)
-{
- GtkAdjustment *adj;
- GtkWidget *range;
- GladeXML *data;
-
- static const gchar *buttons[] = {
- GNOME_STOCK_BUTTON_APPLY,
- GNOME_STOCK_BUTTON_CLOSE,
- NULL
- };
-
- data = glade_xml_new (GNOMECC_GLADE_DIR "/rollback.glade", "rollback_dialog");
-
- if (data == NULL) {
- g_critical ("Your Glade file is either missing or corrupt.");
- dialog->p = (gpointer) 0xdeadbeef;
- return;
- }
-
- dialog->p = g_new0 (RollbackCappletDialogPrivate, 1);
- dialog->p->data = data;
- dialog->p->contents = glade_xml_get_widget (dialog->p->data, "rollback_dialog");
- dialog->p->control_socket = glade_xml_get_widget (dialog->p->data, "control_socket");
- dialog->p->label = glade_xml_get_widget (dialog->p->data, "rollback_level_label");
- dialog->p->rollback_level = 12;
-
- range = glade_xml_get_widget (dialog->p->data, "rollback_scale");
- adj = GTK_ADJUSTMENT (gtk_adjustment_new (12, 0, 12, 1, 1, 1));
- gtk_range_set_adjustment (GTK_RANGE (range), adj);
- gtk_signal_connect_object (GTK_OBJECT (adj), "value-changed",
- GTK_SIGNAL_FUNC (rollback_changed_cb), GTK_OBJECT (dialog));
-
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (dialog)->vbox), dialog->p->contents, TRUE, TRUE, 0);
-
- gnome_dialog_constructv (GNOME_DIALOG (dialog), _("Rollback"), buttons);
-
- gnome_dialog_button_connect (GNOME_DIALOG (dialog), 0, GTK_SIGNAL_FUNC (apply_cb), dialog);
- gnome_dialog_button_connect (GNOME_DIALOG (dialog), 1, GTK_SIGNAL_FUNC (close_cb), dialog);
-}
-
-static void
-rollback_capplet_dialog_class_init (RollbackCappletDialogClass *class)
-{
- GtkObjectClass *object_class;
-
- gtk_object_add_arg_type ("RollbackCappletDialog::capplet-name",
- GTK_TYPE_POINTER,
- GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
- ARG_CAPPLET_NAME);
-
- object_class = GTK_OBJECT_CLASS (class);
- object_class->destroy = rollback_capplet_dialog_destroy;
- object_class->finalize = rollback_capplet_dialog_finalize;
- object_class->set_arg = rollback_capplet_dialog_set_arg;
- object_class->get_arg = rollback_capplet_dialog_get_arg;
-
- parent_class = GNOME_DIALOG_CLASS
- (gtk_type_class (gnome_dialog_get_type ()));
-}
-
-static void
-rollback_capplet_dialog_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackCappletDialog *dialog;
- gchar *tmp;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CAPPLET_DIALOG (object));
-
- dialog = ROLLBACK_CAPPLET_DIALOG (object);
-
- if (dialog->p == (gpointer) 0xdeadbeef)
- return;
-
- switch (arg_id) {
- case ARG_CAPPLET_NAME:
- g_return_if_fail (GTK_VALUE_POINTER (*arg) != NULL);
-
- dialog->p->capplet_name = GTK_VALUE_POINTER (*arg);
-
- dialog->p->capplet_moniker_name = g_strdup (dialog->p->capplet_name);
- if ((tmp = strstr (dialog->p->capplet_moniker_name, "-capplet")) != NULL) *tmp = '\0';
-
- break;
-
- default:
- g_warning ("Bad argument set");
- break;
- }
-}
-
-static void
-rollback_capplet_dialog_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackCappletDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CAPPLET_DIALOG (object));
-
- dialog = ROLLBACK_CAPPLET_DIALOG (object);
-
- switch (arg_id) {
- case ARG_CAPPLET_NAME:
- GTK_VALUE_POINTER (*arg) = dialog->p->capplet_name;
- break;
-
- default:
- g_warning ("Bad argument get");
- break;
- }
-}
-
-static void
-rollback_capplet_dialog_destroy (GtkObject *object)
-{
- RollbackCappletDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CAPPLET_DIALOG (object));
-
- dialog = ROLLBACK_CAPPLET_DIALOG (object);
-
- if (dialog->p != (gpointer) 0xdeadbeef) {
- bonobo_object_release_unref (dialog->p->property_control, NULL);
- bonobo_object_release_unref (dialog->p->control_pb, NULL);
- gtk_object_destroy (GTK_OBJECT (dialog->p->data));
- }
-
- if (dialog->p->capplet_name != NULL) {
- g_free (dialog->p->capplet_name);
- dialog->p->capplet_name = NULL;
- }
-
- if (dialog->p->capplet_moniker_name != NULL) {
- g_free (dialog->p->capplet_moniker_name);
- dialog->p->capplet_moniker_name = NULL;
- }
-
- GTK_OBJECT_CLASS (parent_class)->destroy (object);
-}
-
-static void
-rollback_capplet_dialog_finalize (GtkObject *object)
-{
- RollbackCappletDialog *dialog;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CAPPLET_DIALOG (object));
-
- dialog = ROLLBACK_CAPPLET_DIALOG (object);
-
- if (dialog->p != (gpointer) 0xdeadbeef)
- g_free (dialog->p);
-
- GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GtkObject *
-rollback_capplet_dialog_new (gchar *capplet_name)
-{
- GtkObject *object;
-
- object = gtk_object_new (rollback_capplet_dialog_get_type (),
- "capplet-name", capplet_name,
- NULL);
-
- if (ROLLBACK_CAPPLET_DIALOG (object)->p == (gpointer) 0xdeadbeef) {
- gtk_object_destroy (object);
- return NULL;
- }
-
- if (do_setup (ROLLBACK_CAPPLET_DIALOG (object))) {
- return object;
- } else {
- gtk_object_destroy (object);
- return NULL;
- }
-}
-
-static gchar *
-get_moniker (gchar *capplet_name, struct tm *date)
-{
- if (date == NULL)
- return g_strconcat ("archive:user-archive#archiverdb:", capplet_name, NULL);
- else
- return g_strdup_printf
- ("archive:user-archive#archiverdb:[|%04d%02d%02d%02d%02d%02d]%s",
- date->tm_year + 1900, date->tm_mon + 1, date->tm_mday,
- date->tm_hour, date->tm_min, date->tm_sec, capplet_name);
-}
-
-static void
-get_modified_date (guint rollback_level, struct tm *date)
-{
- time_t t;
-
- t = time (NULL);
- gmtime_r (&t, date);
- mod_date_by_str (date, date_mod_values[rollback_level], date_mod_units[rollback_level]);
-}
-
-/* do_setup
- *
- * Sets up the dialog's controls
- *
- * Returns TRUE on success and FALSE on failure
- */
-
-static gboolean
-do_setup (RollbackCappletDialog *dialog)
-{
- CORBA_Environment ev;
- Bonobo_Control control;
-
- BonoboControlFrame *cf;
-
- GtkWidget *control_wid;
- GtkWidget *err_dialog;
-
- gchar *tmp, *tmp1;
- gchar *oaf_iid;
- gchar *moniker;
-
- guint i;
-
- CORBA_exception_init (&ev);
-
- tmp = g_strdup (dialog->p->capplet_moniker_name);
- while ((tmp1 = strchr (tmp, '-'))) *tmp1 = '_';
-
- oaf_iid = g_strconcat ("OAFIID:Bonobo_Control_Capplet_", tmp, NULL);
- dialog->p->property_control = bonobo_get_object (oaf_iid, "IDL:Bonobo/PropertyControl:1.0", &ev);
- g_free (oaf_iid);
- g_free (tmp);
-
- if (BONOBO_EX (&ev) || dialog->p->property_control == CORBA_OBJECT_NIL) {
- err_dialog = gnome_error_dialog ("Could not load the capplet.");
- gnome_dialog_run_and_close (GNOME_DIALOG (err_dialog));
- return FALSE;
- }
-
- control = Bonobo_PropertyControl_getControl (dialog->p->property_control, 0, &ev);
-
- if (BONOBO_EX (&ev) || control == CORBA_OBJECT_NIL) {
- bonobo_object_release_unref (dialog->p->property_control, NULL);
- return FALSE;
- }
-
- control_wid = bonobo_widget_new_control_from_objref (control, CORBA_OBJECT_NIL);
-
- if (control_wid == NULL) {
- bonobo_object_release_unref (dialog->p->property_control, NULL);
- bonobo_object_release_unref (control, NULL);
- return FALSE;
- }
-
- for (i = 0; i < NUM_ROLLBACK_LEVELS - 1; i++)
- get_modified_date (i, &(dialog->p->mod_dates[i]));
-
- moniker = get_moniker (dialog->p->capplet_moniker_name, NULL);
-
- cf = bonobo_widget_get_control_frame (BONOBO_WIDGET (control_wid));
- dialog->p->control_pb = bonobo_control_frame_get_control_property_bag (cf, &ev);
- bonobo_property_bag_client_set_value_string (dialog->p->control_pb, "moniker", moniker, &ev);
- g_free (moniker);
-
- if (BONOBO_EX (&ev)) {
- err_dialog = gnome_error_dialog ("Could not load your configuration settings.");
- gnome_dialog_run_and_close (GNOME_DIALOG (err_dialog));
- bonobo_object_release_unref (dialog->p->property_control, NULL);
- bonobo_object_release_unref (dialog->p->control_pb, NULL);
- gtk_object_destroy (GTK_OBJECT (control_wid));
- return FALSE;
- }
-
-/* gtk_widget_set_sensitive (control_wid, FALSE); */
- gtk_container_add (GTK_CONTAINER (dialog->p->control_socket), control_wid);
-
- gtk_widget_show_all (dialog->p->contents);
-
- CORBA_exception_free (&ev);
-
- return TRUE;
-}
-
-static void
-apply_settings (RollbackCappletDialog *dialog)
-{
- ConfigArchiver_Archive archive;
- ConfigArchiver_Location location;
- CORBA_Environment ev;
- xmlDocPtr doc;
-
- if (dialog->p->rollback_level == NUM_ROLLBACK_LEVELS - 1)
- return;
-
- CORBA_exception_init (&ev);
-
- archive = bonobo_get_object ("archive:user-archive", "IDL:ConfigArchiver/Archive:1.0", &ev);
-
- if (BONOBO_EX (&ev) || archive == CORBA_OBJECT_NIL) {
- g_critical ("Could not retrieve archive (%s)", ev._repo_id);
- CORBA_exception_free (&ev);
- return;
- }
-
- location = ConfigArchiver_Archive__get_currentLocation (archive, &ev);
-
- if (BONOBO_EX (&ev) || location == CORBA_OBJECT_NIL) {
- g_critical ("Could not retrieve current location (%s)", ev._repo_id);
- bonobo_object_release_unref (archive, NULL);
- CORBA_exception_free (&ev);
- return;
- }
-
- doc = location_client_load_rollback_data
- (location, &(dialog->p->mod_dates[dialog->p->rollback_level]), 0, dialog->p->capplet_moniker_name, TRUE, &ev);
-
- if (BONOBO_EX (&ev) || doc == NULL) {
- gchar *filename;
-
- filename = g_strconcat (GNOMECC_DEFAULTS_DIR "/", dialog->p->capplet_moniker_name, ".xml", NULL);
- doc = xmlParseFile (filename);
- g_free (filename);
-
- if (doc == NULL) {
- g_critical ("Could not load rollback data (%s)", ev._repo_id);
- bonobo_object_release_unref (location, NULL);
- bonobo_object_release_unref (archive, NULL);
- CORBA_exception_free (&ev);
- return;
- }
-
- CORBA_exception_init (&ev);
- }
-
- location_client_store_xml
- (location, dialog->p->capplet_moniker_name, doc, ConfigArchiver_STORE_MASK_PREVIOUS, &ev);
-
- if (BONOBO_EX (&ev) || doc == NULL)
- g_critical ("Could not store rollback data (%s)", ev._repo_id);
-
- xmlFreeDoc (doc);
- bonobo_object_release_unref (archive, NULL);
- bonobo_object_release_unref (location, NULL);
-
- CORBA_exception_free (&ev);
-}
-
-static gboolean
-is_leap_year (guint year)
-{
- if (year % 4 == 0 && (year % 100 != 0 || year % 400 == 0))
- return TRUE;
- else
- return FALSE;
-}
-
-/* mod_date_by_str
- *
- * Modify the given date structure using the given time differential string
- * encoding
- */
-
-static void
-mod_date_by_str (struct tm *date, gint value, gchar unit)
-{
- static const guint month_days[] = {
- 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31
- };
-
- switch (unit) {
- case 'm':
- date->tm_min += value;
- break;
- case 'h':
- date->tm_hour += value;
- break;
- case 'd':
- date->tm_mday += value;
- break;
- case 'M':
- date->tm_mon += value;
- break;
- case 'y':
- date->tm_year += value;
- break;
- }
-
- if (date->tm_min < 0) {
- date->tm_min = 59;
- date->tm_hour--;
- }
-
- if (date->tm_hour < 0) {
- date->tm_hour = 23;
- date->tm_mday--;
- }
-
- if (date->tm_mday < 1) {
- if (date->tm_mon == 2 && is_leap_year (date->tm_year))
- date->tm_mday = 29;
- else
- date->tm_mday = month_days[(date->tm_mon + 11) % 12];
-
- date->tm_mon--;
- }
-
- if (date->tm_mon < 0) {
- date->tm_mon = 11;
- date->tm_year--;
- }
-}
-
-static void
-rollback_changed_cb (RollbackCappletDialog *dialog,
- GtkAdjustment *adj)
-{
- gchar *moniker;
-
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- dialog->p->rollback_level = adj->value;
- gtk_label_set_text (GTK_LABEL (dialog->p->label), labels[dialog->p->rollback_level]);
-
- if (dialog->p->rollback_level == NUM_ROLLBACK_LEVELS - 1)
- moniker = get_moniker (dialog->p->capplet_moniker_name, NULL);
- else
- moniker = get_moniker (dialog->p->capplet_moniker_name, &(dialog->p->mod_dates[dialog->p->rollback_level]));
-
- bonobo_property_bag_client_set_value_string (dialog->p->control_pb, "moniker", moniker, &ev);
- g_free (moniker);
-
- if (BONOBO_EX (&ev)) {
- g_critical ("Could not load settings for rollback level %.0f (%s)", adj->value, ev._repo_id);
-
- if (adj->value != dialog->p->rollback_level)
- gtk_adjustment_set_value (adj, dialog->p->rollback_level);
- } else {
- dialog->p->rollback_level = adj->value;
- }
-
- CORBA_exception_free (&ev);
-}
-
-static void
-apply_cb (GtkButton *button, RollbackCappletDialog *dialog)
-{
- apply_settings (dialog);
-}
-
-static void
-close_cb (GtkButton *button, RollbackCappletDialog *dialog)
-{
- gnome_dialog_close (GNOME_DIALOG (dialog));
-}
diff --git a/capplets/rollback/rollback-capplet-dialog.h b/capplets/rollback/rollback-capplet-dialog.h
deleted file mode 100644
index 6202e648a..000000000
--- a/capplets/rollback/rollback-capplet-dialog.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-capplet-dialog.h
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __ROLLBACK_CAPPLET_DIALOG_H
-#define __ROLLBACK_CAPPLET_DIALOG_H
-
-#include <gnome.h>
-
-
-BEGIN_GNOME_DECLS
-
-#define ROLLBACK_CAPPLET_DIALOG(obj) GTK_CHECK_CAST (obj, rollback_capplet_dialog_get_type (), RollbackCappletDialog)
-#define ROLLBACK_CAPPLET_DIALOG_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rollback_capplet_dialog_get_type (), RollbackCappletDialogClass)
-#define IS_ROLLBACK_CAPPLET_DIALOG(obj) GTK_CHECK_TYPE (obj, rollback_capplet_dialog_get_type ())
-
-typedef struct _RollbackCappletDialog RollbackCappletDialog;
-typedef struct _RollbackCappletDialogClass RollbackCappletDialogClass;
-typedef struct _RollbackCappletDialogPrivate RollbackCappletDialogPrivate;
-
-struct _RollbackCappletDialog
-{
- GnomeDialog parent;
-
- RollbackCappletDialogPrivate *p;
-};
-
-struct _RollbackCappletDialogClass
-{
- GnomeDialogClass gnome_dialog_class;
-};
-
-GType rollback_capplet_dialog_get_type (void);
-
-GtkObject *rollback_capplet_dialog_new (gchar *capplet_name);
-
-END_GNOME_DECLS
-
-#endif /* __ROLLBACK_CAPPLET_DIALOG_H */
diff --git a/capplets/rollback/rollback-capplet.png b/capplets/rollback/rollback-capplet.png
deleted file mode 100644
index 3621ea387..000000000
--- a/capplets/rollback/rollback-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/rollback/rollback-control.c b/capplets/rollback/rollback-control.c
deleted file mode 100644
index 9e0573afe..000000000
--- a/capplets/rollback/rollback-control.c
+++ /dev/null
@@ -1,352 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-control.c
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <archive.h>
-#include <location.h>
-#include <config-log.h>
-
-#include "rollback-control.h"
-#include "rollback-widget.h"
-
-#define CONTROL_HEIGHT 30
-#define MARKER_SIZE 8
-
-enum {
- ARG_0,
- ARG_CONTROL_NUMBER,
- ARG_BACKEND_ID,
- ARG_IS_GLOBAL
-};
-
-struct _RollbackControlPrivate
-{
- Archive *archive;
- Location *location;
- ConfigLog *config_log;
- gchar *backend_id;
- gint y; /* y-coordonite of the canvas item */
-
- GdkDrawable *drawable;
-};
-
-static GnomeCanvasItemClass *parent_class;
-
-static void rollback_control_init (RollbackControl *rollback_control);
-static void rollback_control_class_init (RollbackControlClass *class);
-
-static void rollback_control_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void rollback_control_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-
-static void rollback_control_finalize (GtkObject *object);
-
-static void rollback_control_update (GnomeCanvasItem *item,
- double affine[6],
- ArtSVP *clip_path,
- gint flags);
-static void rollback_control_draw (GnomeCanvasItem *item,
- GdkDrawable *drawable,
- int x, int y,
- int width, int height);
-
-static int draw_markers_cb (ConfigLog *config_log,
- gint id,
- gchar *backend_id,
- struct tm *time,
- RollbackControl *control);
-static gint time_to_x (time_t t, gint width);
-static gint horner (gint *coeff, gint degree,
- gint divisor, gint x);
-
-GType
-rollback_control_get_type (void)
-{
- static GType rollback_control_type = 0;
-
- if (!rollback_control_type) {
- GtkTypeInfo rollback_control_info = {
- "RollbackControl",
- sizeof (RollbackControl),
- sizeof (RollbackControlClass),
- (GtkClassInitFunc) rollback_control_class_init,
- (GtkObjectInitFunc) rollback_control_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- rollback_control_type =
- gtk_type_unique (gnome_canvas_item_get_type (),
- &rollback_control_info);
- }
-
- return rollback_control_type;
-}
-
-static void
-rollback_control_init (RollbackControl *rollback_control)
-{
- rollback_control->p = g_new0 (RollbackControlPrivate, 1);
-}
-
-static void
-rollback_control_class_init (RollbackControlClass *class)
-{
- GtkObjectClass *object_class;
- GnomeCanvasItemClass *canvas_item_class;
-
- gtk_object_add_arg_type ("RollbackControl::control-number",
- GTK_TYPE_INT,
- GTK_ARG_READWRITE,
- ARG_CONTROL_NUMBER);
- gtk_object_add_arg_type ("RollbackControl::backend-id",
- GTK_TYPE_POINTER,
- GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
- ARG_BACKEND_ID);
- gtk_object_add_arg_type ("RollbackControl::is-global",
- GTK_TYPE_INT,
- GTK_ARG_READWRITE | GTK_ARG_CONSTRUCT_ONLY,
- ARG_IS_GLOBAL);
-
- object_class = GTK_OBJECT_CLASS (class);
- object_class->finalize = rollback_control_finalize;
- object_class->set_arg = rollback_control_set_arg;
- object_class->get_arg = rollback_control_get_arg;
-
- canvas_item_class = GNOME_CANVAS_ITEM_CLASS (class);
- canvas_item_class->update = rollback_control_update;
- canvas_item_class->draw = rollback_control_draw;
-
- parent_class = GNOME_CANVAS_ITEM_CLASS
- (gtk_type_class (gnome_canvas_item_get_type ()));
-}
-
-static void
-rollback_control_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackControl *rollback_control;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CONTROL (object));
-
- rollback_control = ROLLBACK_CONTROL (object);
-
- switch (arg_id) { case ARG_CONTROL_NUMBER:
- rollback_control->p->y =
- GTK_VALUE_INT (*arg) * CONTROL_HEIGHT;
- break;
-
- case ARG_BACKEND_ID:
- g_return_if_fail (GTK_VALUE_POINTER (*arg) != NULL);
-
- rollback_control->p->backend_id =
- g_strdup (GTK_VALUE_POINTER (*arg));
- break;
-
- case ARG_IS_GLOBAL:
- if (GTK_VALUE_INT (*arg))
- rollback_control->p->archive =
- ARCHIVE (archive_load (TRUE));
- else
- rollback_control->p->archive =
- ARCHIVE (archive_load (FALSE));
-
- rollback_control->p->location =
- archive_get_current_location
- (rollback_control->p->archive);
-/* rollback_control->p->config_log = */
-/* location_get_config_log */
-/* (rollback_control->p->location); */
- break;
-
- default:
- g_warning ("Bad argument set");
- break;
- }
-}
-
-static void
-rollback_control_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackControl *rollback_control;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CONTROL (object));
-
- rollback_control = ROLLBACK_CONTROL (object);
-
- switch (arg_id) {
- case ARG_CONTROL_NUMBER:
- GTK_VALUE_INT (*arg) = rollback_control->p->y / CONTROL_HEIGHT;
- break;
-
- case ARG_BACKEND_ID:
- GTK_VALUE_POINTER (*arg) = rollback_control->p->backend_id;
- break;
-
- case ARG_IS_GLOBAL:
- GTK_VALUE_INT (*arg) = rollback_control->p->archive->is_global;
- break;
-
- default:
- g_warning ("Bad argument get");
- break;
- }
-}
-
-static void
-rollback_control_finalize (GtkObject *object)
-{
- RollbackControl *rollback_control;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_CONTROL (object));
-
- rollback_control = ROLLBACK_CONTROL (object);
-
- g_free (rollback_control->p);
-
- GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-rollback_control_update (GnomeCanvasItem *item, double affine[6],
- ArtSVP *clip_path, gint flags)
-{
- RollbackControl *control;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (IS_ROLLBACK_CONTROL (item));
-
- control = ROLLBACK_CONTROL (item);
-
- /* We don't support aa canvas for now */
-
- if (item->canvas->aa) {
- g_warning ("Anti-aliased canvas not supported for "
- "this item");
- } else {
- /* FIXME: Fix this */
- gnome_canvas_update_bbox (item,
- 0, control->p->y, 65536,
- control->p->y + CONTROL_HEIGHT);
- }
-}
-
-static void
-rollback_control_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
- int x, int y, int width, int height)
-{
- RollbackWidget *widget;
- RollbackControl *control;
- GdkGC *gc;
-
- g_return_if_fail (item != NULL);
- g_return_if_fail (IS_ROLLBACK_CONTROL (item));
- g_return_if_fail (IS_ROLLBACK_WIDGET (item->canvas));
-
- control = ROLLBACK_CONTROL (item);
- widget = ROLLBACK_WIDGET (item->canvas);
-
- gc = rollback_widget_get_gc (widget);
- control->p->drawable = drawable;
-
- /* Render the background color */
- gdk_gc_set_foreground (gc, &widget->control_colors[BACKGROUND_COLOR]);
- gdk_draw_rectangle (drawable, gc, TRUE, x, y, width, height);
-
- /* Render the markers */
- gdk_gc_set_foreground (gc, &widget->control_colors[MARKER_COLOR]);
- config_log_iterate (control->p->config_log,
- (ConfigLogIteratorCB) draw_markers_cb, control);
-}
-
-static int
-draw_markers_cb (ConfigLog *config_log, gint id, gchar *backend_id,
- struct tm *time, RollbackControl *control)
-{
- RollbackWidget *widget;
- GdkGC *gc;
- gint x;
-
- if (strcmp (backend_id, control->p->backend_id)) return 0;
-
- widget = ROLLBACK_WIDGET (GNOME_CANVAS_ITEM (control)->canvas);
- gc = rollback_widget_get_gc (widget);
-
- /* FIXME: Get the width correctly */
- x = time_to_x (mktime (time), 300);
-
- gdk_draw_arc (control->p->drawable, gc, TRUE, x,
- control->p->y + (CONTROL_HEIGHT - MARKER_SIZE) / 2,
- MARKER_SIZE, MARKER_SIZE, 0, 360 * 64);
-
- return 0;
-}
-
-/* I think I'm going to fake this over the rationals here by getting the lcm
- * of all the denominators and dividing the result by that in the end. That
- * might make my life less painful.
- */
-
-static gint
-time_to_x (time_t t, gint width)
-{
- gint coeff[5]; /* We have five points, so we use a degree-4
- * polynomial */
- time_t now;
-
- now = time (NULL);
-
- /* FIXME: Find out the real coefficients to use here */
- coeff[0] = 1;
- coeff[1] = 2;
- coeff[2] = 2;
- coeff[3] = 5;
- coeff[4] = 6;
-
- return width - width * (now - t) / (7 * 24 * 60 * 60);
-/* return width - horner (coeff, 1, 4, now - t) * width; */
-}
-
-/* Treat the array coeff as the coefficient vector of a polynomial over the
- * ring of integers and evaluate that polynomial at the given integer x,
- * dividing at each step by the given divisor
- */
-
-static gint
-horner (gint *coeff, gint divisor, gint degree, gint x)
-{
- gint total = 0, i;
-
- for (i = 0; i <= degree; i++)
- total = (total * x + coeff[i]) / divisor;
-
- return total;
-}
diff --git a/capplets/rollback/rollback-control.h b/capplets/rollback/rollback-control.h
deleted file mode 100644
index dda28b590..000000000
--- a/capplets/rollback/rollback-control.h
+++ /dev/null
@@ -1,56 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-control.h
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __ROLLBACK_CONTROL_H
-#define __ROLLBACK_CONTROL_H
-
-#include <gnome.h>
-
-
-BEGIN_GNOME_DECLS
-
-#define ROLLBACK_CONTROL(obj) GTK_CHECK_CAST (obj, rollback_control_get_type (), RollbackControl)
-#define ROLLBACK_CONTROL_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rollback_control_get_type (), RollbackControlClass)
-#define IS_ROLLBACK_CONTROL(obj) GTK_CHECK_TYPE (obj, rollback_control_get_type ())
-
-typedef struct _RollbackControl RollbackControl;
-typedef struct _RollbackControlClass RollbackControlClass;
-typedef struct _RollbackControlPrivate RollbackControlPrivate;
-
-struct _RollbackControl
-{
- GnomeCanvasItem parent;
-
- RollbackControlPrivate *p;
-};
-
-struct _RollbackControlClass
-{
- GnomeCanvasItemClass gnome_canvas_item_class;
-};
-
-GType rollback_control_get_type (void);
-
-END_GNOME_DECLS
-
-#endif /* __ROLLBACK_CONTROL_H */
diff --git a/capplets/rollback/rollback-widget.c b/capplets/rollback/rollback-widget.c
deleted file mode 100644
index d86a6f606..000000000
--- a/capplets/rollback/rollback-widget.c
+++ /dev/null
@@ -1,229 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-widget.c
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include "rollback-widget.h"
-
-enum {
- ARG_0,
- ARG_SAMPLE
-};
-
-struct _RollbackWidgetPrivate
-{
- GdkGC *main_gc;
-};
-
-static GnomeCanvasClass *parent_class;
-
-static void rollback_widget_init (RollbackWidget *rollback_widget);
-static void rollback_widget_class_init (RollbackWidgetClass *class);
-
-static void rollback_widget_set_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-static void rollback_widget_get_arg (GtkObject *object,
- GtkArg *arg,
- guint arg_id);
-
-static void rollback_widget_finalize (GtkObject *object);
-
-static void rollback_widget_realize (GtkWidget *widget);
-static void rollback_widget_unrealize (GtkWidget *widget);
-
-GType
-rollback_widget_get_type (void)
-{
- static GType rollback_widget_type = 0;
-
- if (!rollback_widget_type) {
- GtkTypeInfo rollback_widget_info = {
- "RollbackWidget",
- sizeof (RollbackWidget),
- sizeof (RollbackWidgetClass),
- (GtkClassInitFunc) rollback_widget_class_init,
- (GtkObjectInitFunc) rollback_widget_init,
- (GtkArgSetFunc) NULL,
- (GtkArgGetFunc) NULL
- };
-
- rollback_widget_type =
- gtk_type_unique (gnome_canvas_get_type (),
- &rollback_widget_info);
- }
-
- return rollback_widget_type;
-}
-
-static void
-rollback_widget_init (RollbackWidget *rollback_widget)
-{
- rollback_widget->p = g_new0 (RollbackWidgetPrivate, 1);
- gtk_widget_set_usize (GTK_WIDGET (rollback_widget), 200, 30);
-
- rollback_widget->control_colors[BACKGROUND_COLOR].red = 112 * 256;
- rollback_widget->control_colors[BACKGROUND_COLOR].green = 128 * 256;
- rollback_widget->control_colors[BACKGROUND_COLOR].blue = 144 * 256;
-
- rollback_widget->control_colors[MARKER_COLOR].red = 0;
- rollback_widget->control_colors[MARKER_COLOR].green = 0;
- rollback_widget->control_colors[MARKER_COLOR].blue = 0;
-}
-
-static void
-rollback_widget_class_init (RollbackWidgetClass *class)
-{
- GtkObjectClass *object_class;
- GtkWidgetClass *widget_class;
-
- gtk_object_add_arg_type ("RollbackWidget::sample",
- GTK_TYPE_POINTER,
- GTK_ARG_READWRITE,
- ARG_SAMPLE);
-
- object_class = GTK_OBJECT_CLASS (class);
- object_class->finalize = rollback_widget_finalize;
- object_class->set_arg = rollback_widget_set_arg;
- object_class->get_arg = rollback_widget_get_arg;
-
- widget_class = GTK_WIDGET_CLASS (class);
- widget_class->realize = rollback_widget_realize;
- widget_class->unrealize = rollback_widget_unrealize;
-
- parent_class = GNOME_CANVAS_CLASS
- (gtk_type_class (gnome_canvas_get_type ()));
-}
-
-static void
-rollback_widget_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackWidget *rollback_widget;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_WIDGET (object));
-
- rollback_widget = ROLLBACK_WIDGET (object);
-
- switch (arg_id) {
- case ARG_SAMPLE:
- break;
-
- default:
- g_warning ("Bad argument set");
- break;
- }
-}
-
-static void
-rollback_widget_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
-{
- RollbackWidget *rollback_widget;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_WIDGET (object));
-
- rollback_widget = ROLLBACK_WIDGET (object);
-
- switch (arg_id) {
- case ARG_SAMPLE:
- break;
-
- default:
- g_warning ("Bad argument get");
- break;
- }
-}
-
-static void
-rollback_widget_finalize (GtkObject *object)
-{
- RollbackWidget *rollback_widget;
-
- g_return_if_fail (object != NULL);
- g_return_if_fail (IS_ROLLBACK_WIDGET (object));
-
- rollback_widget = ROLLBACK_WIDGET (object);
-
- g_free (rollback_widget->p);
-
- GTK_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-GtkObject *
-rollback_widget_new (void)
-{
- return gtk_object_new (rollback_widget_get_type (),
- NULL);
-}
-
-GdkGC *
-rollback_widget_get_gc (RollbackWidget *widget)
-{
- g_return_val_if_fail (widget != NULL, NULL);
- g_return_val_if_fail (IS_ROLLBACK_WIDGET (widget), NULL);
-
- gdk_gc_ref (widget->p->main_gc);
- return widget->p->main_gc;
-}
-
-static void
-rollback_widget_realize (GtkWidget *widget)
-{
- RollbackWidget *rollback_widget;
- GdkColormap *colormap;
- gboolean success[LAST_COLOR];
- gint i;
-
- rollback_widget = ROLLBACK_WIDGET (widget);
-
- if (!GTK_WIDGET_REALIZED (widget)) {
- GTK_WIDGET_CLASS (parent_class)->realize (widget);
- rollback_widget->p->main_gc = gdk_gc_new (widget->window);
-
- colormap = gtk_widget_get_colormap (widget);
- gdk_colormap_alloc_colors (colormap,
- rollback_widget->control_colors,
- LAST_COLOR, FALSE, TRUE,
- success);
-
- for (i = 0; success[i] && i < LAST_COLOR; i++);
-
- if (i < LAST_COLOR)
- g_warning ("Could not allocate colors for rollback "
- "control\n");
- }
-}
-
-static void
-rollback_widget_unrealize (GtkWidget *widget)
-{
- if (ROLLBACK_WIDGET (widget)->p->main_gc != NULL) {
- gdk_gc_unref (ROLLBACK_WIDGET (widget)->p->main_gc);
- ROLLBACK_WIDGET (widget)->p->main_gc = NULL;
- }
-
- GTK_WIDGET_CLASS (parent_class)->unrealize (widget);
-}
diff --git a/capplets/rollback/rollback-widget.h b/capplets/rollback/rollback-widget.h
deleted file mode 100644
index 7e901dc3a..000000000
--- a/capplets/rollback/rollback-widget.h
+++ /dev/null
@@ -1,69 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* rollback-widget.h
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __ROLLBACK_WIDGET_H
-#define __ROLLBACK_WIDGET_H
-
-#include <gnome.h>
-
-
-BEGIN_GNOME_DECLS
-
-#define ROLLBACK_WIDGET(obj) GTK_CHECK_CAST (obj, rollback_widget_get_type (), RollbackWidget)
-#define ROLLBACK_WIDGET_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, rollback_widget_get_type (), RollbackWidgetClass)
-#define IS_ROLLBACK_WIDGET(obj) GTK_CHECK_TYPE (obj, rollback_widget_get_type ())
-
-typedef struct _RollbackWidget RollbackWidget;
-typedef struct _RollbackWidgetClass RollbackWidgetClass;
-typedef struct _RollbackWidgetPrivate RollbackWidgetPrivate;
-
-enum {
- BACKGROUND_COLOR,
- MARKER_COLOR,
- ARROW_COLOR,
- LAST_COLOR
-};
-
-struct _RollbackWidget
-{
- GnomeCanvas parent;
-
- RollbackWidgetPrivate *p;
-
- GdkColor control_colors[LAST_COLOR];
-};
-
-struct _RollbackWidgetClass
-{
- GnomeCanvasClass gnome_canvas_class;
-};
-
-GType rollback_widget_get_type (void);
-
-GtkObject *rollback_widget_new (void);
-
-GdkGC *rollback_widget_get_gc (RollbackWidget *widget);
-
-END_GNOME_DECLS
-
-#endif /* __ROLLBACK_WIDGET_H */
diff --git a/capplets/rollback/rollback.desktop.in.in b/capplets/rollback/rollback.desktop.in.in
deleted file mode 100644
index 71d05b42b..000000000
--- a/capplets/rollback/rollback.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Rollback
-_Comment=Restore earlier configuration
-Exec=rollback-capplet
-Icon=rollback-capplet.png
-Terminal=0
-Type=Application
diff --git a/capplets/rollback/rollback.glade b/capplets/rollback/rollback.glade
deleted file mode 100644
index 1b5d14969..000000000
--- a/capplets/rollback/rollback.glade
+++ /dev/null
@@ -1,872 +0,0 @@
-<?xml version="1.0"?>
-<GTK-Interface>
-
-<project>
- <name>Rollback-location-management</name>
- <program_name>rollback-location-management</program_name>
- <directory></directory>
- <source_directory>src</source_directory>
- <pixmaps_directory>pixmaps</pixmaps_directory>
- <language>C</language>
- <gnome_support>True</gnome_support>
- <gettext_support>True</gettext_support>
-</project>
-
-<widget>
- <class>GnomeDialog</class>
- <name>rollback_location_dialog</name>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>True</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area1</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button1</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button2</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button3</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkNotebook</class>
- <name>notebook1</name>
- <can_focus>True</can_focus>
- <show_tabs>True</show_tabs>
- <show_border>True</show_border>
- <tab_pos>GTK_POS_TOP</tab_pos>
- <scrollable>False</scrollable>
- <tab_hborder>2</tab_hborder>
- <tab_vborder>2</tab_vborder>
- <popup_enable>False</popup_enable>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkTable</class>
- <name>table1</name>
- <border_width>5</border_width>
- <rows>4</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>5</row_spacing>
- <column_spacing>5</column_spacing>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>rollback_all_toggle</name>
- <can_focus>True</can_focus>
- <signal>
- <name>toggled</name>
- <handler>rollback_all_toggled_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:58:48 GMT</last_modification_time>
- </signal>
- <label>Restore all tools</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>restore_type</group>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button4</name>
- <can_focus>True</can_focus>
- <label>View Logs...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button5</name>
- <can_focus>True</can_focus>
- <label>Advanced...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox2</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>rollback_one_toggle</name>
- <can_focus>True</can_focus>
- <signal>
- <name>toggled</name>
- <handler>rollback_one_toggled_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:58:59 GMT</last_modification_time>
- </signal>
- <label>Restore only</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>restore_type</group>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>backend_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label3</name>
- <label>Restore configuration from</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>time_count</name>
- <can_focus>True</can_focus>
- <signal>
- <name>changed</name>
- <handler>time_count_changed_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:15:27 GMT</last_modification_time>
- </signal>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>1000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label4</name>
- <label>days ago</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label1</name>
- <label>Configuration Restoration</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>location_tree_box</name>
- <border_width>5</border_width>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
-
- <widget>
- <class>GtkVBox</class>
- <name>vbox1</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>create_button</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>create_cb</handler>
- <last_modification_time>Wed, 20 Dec 2000 23:51:41 GMT</last_modification_time>
- </signal>
- <label>Create...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>destroy_button</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>destroy_cb</handler>
- <last_modification_time>Wed, 20 Dec 2000 23:51:56 GMT</last_modification_time>
- </signal>
- <label>Destroy...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>rename_button</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>rename_cb</handler>
- <last_modification_time>Wed, 20 Dec 2000 23:52:13 GMT</last_modification_time>
- </signal>
- <label>Rename...</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHSeparator</class>
- <name>hseparator1</name>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>change_location_button</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>change_location_cb</handler>
- <last_modification_time>Wed, 20 Dec 2000 23:52:33 GMT</last_modification_time>
- </signal>
- <label>Change to this Location</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>edit_button</name>
- <can_focus>True</can_focus>
- <signal>
- <name>clicked</name>
- <handler>edit_location_cb</handler>
- <last_modification_time>Wed, 20 Dec 2000 23:52:51 GMT</last_modification_time>
- </signal>
- <label>Edit this Location</label>
- <relief>GTK_RELIEF_NORMAL</relief>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkScrolledWindow</class>
- <name>location_tree_location</name>
- <hscrollbar_policy>GTK_POLICY_NEVER</hscrollbar_policy>
- <vscrollbar_policy>GTK_POLICY_AUTOMATIC</vscrollbar_policy>
- <hupdate_policy>GTK_UPDATE_CONTINUOUS</hupdate_policy>
- <vupdate_policy>GTK_UPDATE_CONTINUOUS</vupdate_policy>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <child_name>Notebook:tab</child_name>
- <name>label2</name>
- <label>Location Management</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>rollback_dialog_backup</name>
- <title>Restore old configuration</title>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area3</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button14</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button15</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button16</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>config_dialog_data</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>label10</name>
- <label>Restore configuration from</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>spinbutton1</name>
- <can_focus>True</can_focus>
- <signal>
- <name>changed</name>
- <handler>time_count_changed_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:15:27 GMT</last_modification_time>
- </signal>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>False</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>1</value>
- <lower>0</lower>
- <upper>1000</upper>
- <step>1</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label11</name>
- <label>days ago</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
- </widget>
-
- <widget>
- <class>GtkTable</class>
- <name>table2</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>5</row_spacing>
- <column_spacing>0</column_spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>rollback_all_toggle</name>
- <can_focus>True</can_focus>
- <signal>
- <name>toggled</name>
- <handler>rollback_all_toggled_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:58:48 GMT</last_modification_time>
- </signal>
- <label>Restore all tools</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>restore_type</group>
- <child>
- <left_attach>0</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkRadioButton</class>
- <name>rollback_one_toggle</name>
- <can_focus>True</can_focus>
- <signal>
- <name>toggled</name>
- <handler>rollback_one_toggled_cb</handler>
- <last_modification_time>Tue, 19 Dec 2000 20:58:59 GMT</last_modification_time>
- </signal>
- <label>Restore only</label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
- <group>restore_type</group>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>False</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GtkOptionMenu</class>
- <name>backend_select</name>
- <can_focus>True</can_focus>
- <items></items>
- <initial_choice>0</initial_choice>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-<widget>
- <class>GnomeDialog</class>
- <name>rollback_dialog_win</name>
- <type>GTK_WINDOW_TOPLEVEL</type>
- <position>GTK_WIN_POS_NONE</position>
- <modal>False</modal>
- <allow_shrink>False</allow_shrink>
- <allow_grow>False</allow_grow>
- <auto_shrink>False</auto_shrink>
- <auto_close>False</auto_close>
- <hide_on_close>False</hide_on_close>
-
- <widget>
- <class>GtkVBox</class>
- <child_name>GnomeDialog:vbox</child_name>
- <name>dialog-vbox4</name>
- <homogeneous>False</homogeneous>
- <spacing>8</spacing>
- <child>
- <padding>4</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkHButtonBox</class>
- <child_name>GnomeDialog:action_area</child_name>
- <name>dialog-action_area4</name>
- <layout_style>GTK_BUTTONBOX_END</layout_style>
- <spacing>8</spacing>
- <child_min_width>85</child_min_width>
- <child_min_height>27</child_min_height>
- <child_ipad_x>7</child_ipad_x>
- <child_ipad_y>0</child_ipad_y>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
-
- <widget>
- <class>GtkButton</class>
- <name>button17</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_OK</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button18</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_APPLY</stock_button>
- </widget>
-
- <widget>
- <class>GtkButton</class>
- <name>button19</name>
- <can_default>True</can_default>
- <can_focus>True</can_focus>
- <stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
- </widget>
- </widget>
-
- <widget>
- <class>GtkVBox</class>
- <name>rollback_dialog</name>
- <homogeneous>False</homogeneous>
- <spacing>5</spacing>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>GtkLabel</class>
- <name>rollback_level_label</name>
- <label>Current time</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkHScale</class>
- <name>rollback_scale</name>
- <can_focus>True</can_focus>
- <draw_value>False</draw_value>
- <value_pos>GTK_POS_TOP</value_pos>
- <digits>0</digits>
- <policy>GTK_UPDATE_DISCONTINUOUS</policy>
- <value>0</value>
- <lower>0</lower>
- <upper>0</upper>
- <step>0</step>
- <page>0</page>
- <page_size>0</page_size>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkFrame</class>
- <name>control_socket</name>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
-
- <widget>
- <class>Placeholder</class>
- </widget>
- </widget>
- </widget>
- </widget>
-</widget>
-
-</GTK-Interface>
diff --git a/capplets/sound/.cvsignore b/capplets/sound/.cvsignore
deleted file mode 100644
index bc22ad60b..000000000
--- a/capplets/sound/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-gnome-sound-properties
-sound.desktop
-gnome-settings-sound.desktop
-gnome-settings-sound.desktop.in
diff --git a/capplets/sound/ChangeLog b/capplets/sound/ChangeLog
deleted file mode 100644
index 91933d9e3..000000000
--- a/capplets/sound/ChangeLog
+++ /dev/null
@@ -1,478 +0,0 @@
-2005-05-22 Sebastien Bacher <seb128@debian.org>
-
- * sound-properties-capplet.c: (main):
- fix the title according to the HIG (Closes: #304950).
-
-2005-02-07 Sebastien Bacher <seb128@debian.org>
-
- * sound-properties-capplet.c: change fullscreen_flash to fullscreen
- (Closes: #166455).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * gnome-settings-sound.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * .cvsignore:
- Quiet CVS.
-
- * sound-properties-capplet.c: (main):
- Use themed icon for WM hint.
-
-2004-06-22 Leena Gunda <leena.gunda@wipro.com>
-
- * sound-properties-capplet.c:
- (create_dialog): set sensitivity of audible/visual bell
- options only if XKB enabled.
- (CheckXKB): function to check if XKB support available.
- Fixes bug #144090
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * sound-properties-capplet.c: (dialog_button_clicked_cb): Update
- help link to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * sound-properties-capplet.c: Patch to fix spacing between action
- area and vbox of preferences dialog.
-
-2003-07-11 Dennis Cranston <dennis_cranston at yahoo com>
-
- * sound-properties.glade, sound-properties-capplet.c:
- More fixes for ui-review bug number 99533.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-07-07 Calum Benson <calum.benson@sun.com>
-
- * visual-bell.png:
- Replace Bill's placeholder icon before the UI freeze :)
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-Fri Jun 6 19:16:43 2003 Jonathan Blandford <jrb@gnome.org>
-
- * sound-properties-capplet.c (bell_flash_to_widget),
- (bell_flash_from_widget): Use a peditor for the visual bell
- instead.
-
-2003-06-06 Bill Haneman <bill.haneman@sun.com>
-
- * sound-properties.glade:
- Added page tab and UI from "visual bell" capplet
- (UI originally from Calum, except for ugly icon)
-
- * visual-bell.png:
- Ugly new icon which needs TLC from Calum.
-
- * sound-properties-capplet.c:
- Added gconf keys for visual bell feature and control of
- audio bell.
- (visual_bell_type_changed): New, called when visual bell radiobuttons
- are toggled.
- (create_dialog):
- Set the image on the "System Bell" notebook tab.
- (setup_dialog):
- Added peditors for visual-bell and audio-bell checkboxes/gconf keys.
- Added guards for the visual-bell type buttons, controlled by
- the visual-bell-enabling checkbox.
- Connected visual_bell_type_changed to "toggled" signal on radiobuttons.
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-30 Alex Duggan <aldug@astrolinux.com>
-
- * sound-properties-capplet.c: use appropriate
- window border icon.
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * sound-properties-capplet.c: (main): Plug a leak.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-08 Deepa Natarajan <deepa.natarajan@wipro.com>
-
- *sound-properties.glade: Remove mnemonics for notebook tabs.
- Fixes bug# 94160.
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * sound.desktop.in: Fix the desktop file so that it validates.
-
-2002-07-31 Federico Mena Quintero <federico@ximian.com>
-
- * sound-properties-capplet.c (main): Do not pass -1 for the dialog
- flags; just pass GTK_DIALOG_NO_SEPARATOR. Fixes #89408 and #88614.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * sound-properties-capplet.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * sound-properties-capplet.c (dialog_button_clicked_cb) : Improve
- handling of help failures.
-
-Sun May 26 11:32:09 2002 Jonathan Blandford <jrb@gnome.org>
-
- * sound-properties-capplet.c (main): use APPID instead of argv[0]
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * sound-properties-capplet.c (dialog_button_clicked_cb) : fix help path
-
-2002-05-07 Jody Goldberg <jody@gnome.org>
-
- * sound-properties-capplet.c (main) : add help.
- (dialog_button_clicked_cb) : support help and support WM based exit.
-
-Wed Apr 10 18:05:30 2002 Jonathan Blandford <jrb@gnome.org>
-
- * sound.desktop.in (Exec): s/gnome2/gnome
-
-2002-03-27 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties.glade: Add mnemonics.
-
- * sound-properties-capplet.c (create_dialog): Connect to
- properties so we know when to save.
-
-2002-03-27 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties.glade: Add mnemonics.
-
- * sound-properties-capplet.c (create_dialog): Connect to
- properties so we know when to save.
-
-2002-03-10 Seth Nickell <snickell@stanford.edu>
-
- * main.c: (main):
- * sound-properties-capplet.c: (main):
-
- Activate the settings daemon if its not already running.
-
-2002-03-07 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties-capplet.c (main): Okay, so I'm an idiot.
-
-2002-03-06 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties-capplet.c (main): Remove textdomain stuff.
- I'm not 100% certain this is correct, but none of the other capplets
- have it.
-
-2002-03-07 Lauris Kaplinski <lauris@ximian.com>
-
- * sound-properties-capplet.c: Do not include unused <esd.h>
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * sound-properties-capplet.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-11 Seth Nickell <snickell@stanford.edu>
-
- * sound-properties-capplet.c: (setup_dialog),
- (dialog_button_clicked_cb), (main):
-
- Convert to instant apply.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * sound-properties-capplet.c (create_dialog): Use g_object_set_data,
- use g_signal_connect
- (dialog_button_clicked_cb): GtkDialog instead of GnomeDialog
- (create_dialog): Use gtk_widget_set_size_request
-
-2002-01-27 Seth Nickell <snickell@stanford.edu>
-
- * sound.desktop.in:
-
- Add categories field to .desktop file.
-
-2002-01-19 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
-
- Install icons into the pixmaps directory so the Panel
- & Nautilus will pick up on them.
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am (bin_PROGRAMS): Rename binary gnome2-sound-properties
-
-2002-01-08 Richard Hestilow <hestilow@ximian.com>
-
- * Port to GNOME 2.0.
-
-2001-11-18 Richard Hestilow <hestilow@ximian.com>
-
- * Makefile.am (sound_properties_control_LDADD): Add libsounds.a.
-
- * prefs-widget.c (apply_settings): Export our settings to
- gnome-config (needed by gnome-libs). Also save and reload event
- sounds.
- (create_dialog): Add a SoundView on the sound events.
-
- * sound-properties.glade: Add a tab for the sound events.
-
-2001-10-12 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Make OAF file creation generic
-
-2001-09-28 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove support for disabling bonobo-conf build
-
- * Makefile.am: Change the binary name to
- mouse-properties-control and create a wrapper script from
- ../common/wrapper-script.in to be named mouse-properties-capplet
-
-2001-07-31 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): add DISTDIR to install-data-local
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-25 Chema Celorio <chema@celorio.com>
-
- * Makefile.am: remove the OAF_FILE_IN_RULE and copy it here
- * Makefile.am: remove the DESKTOP_IN_RULE and copy the sed here
-
-2001-07-25 Bradford Hovinen <hovinen@ximian.com>
-
- * prefs-widget.c (prefs_widget_init): Fix macro name
-
- * main.c (main): Fix macro name
-
-2001-07-24 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties-capplet.c (main): Pass in legacy files to
- capplet_init.
- (get_legacy_settings): Use the "Main" config prefix.
-
-2001-07-23 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties-capplet.c (apply_settings): Make sure ESD gets
- killed if it's supposed to
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove SUBDIRS
- Remove extraneous EXTRA_DIST
- Make sure to include defaults and OAF info files
-
-2001-07-18 Bradford Hovinen <hovinen@ximian.com>
-
- * Bonobo_Control_Capplet_sound_properties.oaf: Update for new
- binary name
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties-capplet.c (create_dialog): Revert that.
-
-2001-07-18 Richard Hestilow <hestilow@ximian.com>
-
- * sound-properties-capplet.c (create_dialog): Change to reflect
- new prototype.
-
-2001-07-17 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (SUBDIRS): clean
-
-2001-07-17 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties-capplet.c (create_dialog): Implement
- (main): Call glade_gnome_init; pass create_dialog to capplet_init
- (setup_dialog): Retrieve the Glade data from the widget passed to
- this function
- (create_dialog): Make sure dialog is destroyed when widget is
-
- * Makefile.am (EXTRA_DIST): Changed Applications_DATA to
- Applications_in_files
- (INCLUDES): Add -DGLADE_DATADIR
-
- * sound-properties-capplet.c (setup_dialog): Sensitize events
- check box only if ESD is already enabled
-
- * sound-properties.glade: Prune dialog down to the two check
- buttons
-
-2001-07-13 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties-capplet.c (set_moniker_cb): Resolve
- configuration database and store in property frame
- (apply_cb): Retrieve configuration database from property frame
- (create_control_cb): Don't store config database in property
- control
- (create_control_cb): Add listener for property change in config
- database
- (changed_cb): Implement
-
-2001-07-12 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties-capplet.c (apply_settings): Disable launch of
- esd, due to esd's general suckiness
-
- * sound-properties.xml: Update to use correct names for settings
-
- * sound-properties-capplet.c (set_moniker_cb): Change event_sound
- to event_sounds
-
-2001-07-10 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties-capplet.c (set_moniker_cb): Make full moniker
- (apply_settings): Release the return value
- (main): Support --get-legacy option
- (get_legacy_settings): Implement
- (create_control_cb): Connect apply_cb
- (COPY_FROM_LEGACY): Use bonobo_config_set_...
- (main): Open config database regardless of what operation is
- requested; pass to create_control callback
- (apply_settings): Use bonobo_config_get_...
- (get_legacy_settings):
- (apply_settings): Don't accept CORBA_Environment *ev any more
- (create_control_cb): Store the config database in the property control
- (apply_settings): Use the correct setting name
- (apply_cb): Apply settings and sync
- (apply_settings): Kill esd when requested
- (get_legacy_settings): Sync database
-
- * sound-properties.xml: Fixed path name
-
-2001-07-09 Bradford Hovinen <hovinen@ximian.com>
-
- * sound-properties.xml: Use 0 and 1 rather than true and false
-
- * sound-properties-capplet.c (create_control_cb): Implement
- (main): Use create_control_cb
-
- * Bonobo_Control_Capplet_sound_properties.oaf: Use PropertyControl interface
-
- * sound-properties-capplet.c (create_dialog_cb): Update signature
- for use as a BonoboPropertyControlGetControlFn
-
- * Makefile.am (defaults_DATA): Add sound-properties.xml
- (EXTRA_DIST): Add defaults_DATA
-
- * sound-properties-capplet.c (close_cb): Don't destroy the widget
- -- it's already destroyed
-
-2001-06-07 Christian Rose <menthos@menthos.com>
-
- * sound-properties.desktop: Modified Swedish translation.
-
-2001-04-27 Bradford Hovinen <hovinen@ximian.com>
-
- * preferences.c (category_read_xml): Make description a child node
- rather than an attribute
- (sound_event_read_xml): Make name an attribute rather than a child
- node
-
-2000-10-08 Bradford Hovinen <hovinen@helixcode.com>
-
- * Makefile.am (EXTRA_DIST): Add translation file
-
diff --git a/capplets/sound/Makefile.am b/capplets/sound/Makefile.am
deleted file mode 100644
index 457c5f00b..000000000
--- a/capplets/sound/Makefile.am
+++ /dev/null
@@ -1,23 +0,0 @@
-bin_PROGRAMS = gnome-sound-properties
-
-gnome_sound_properties_LDADD = \
- $(top_builddir)/libsounds/libsounds.a \
- $(GNOMECC_CAPPLETS_LIBS) \
- $(SOUND_CAPPLET_LIBS)
-gnome_sound_properties_SOURCES = sound-properties-capplet.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = sound-properties.glade
-
-desktop_iconsdir = $(GNOMECC_PIXMAPS_DIR)
-desktop_icons_DATA = visual-bell.png
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gnome-settings-sound.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) $(SOUND_CAPPLET_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA) $(desktop_icons_DATA)
diff --git a/capplets/sound/gnome-settings-sound.desktop.in.in b/capplets/sound/gnome-settings-sound.desktop.in.in
deleted file mode 100644
index 8c377f5b8..000000000
--- a/capplets/sound/gnome-settings-sound.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Sound
-_Comment=Enable sound and associate sounds with events
-Exec=gnome-sound-properties
-Icon=gnome-settings-sound
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=sound
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/sound/sound-properties-capplet.c b/capplets/sound/sound-properties-capplet.c
deleted file mode 100644
index 879079077..000000000
--- a/capplets/sound/sound-properties-capplet.c
+++ /dev/null
@@ -1,291 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* sound-properties-capplet.c
- * Copyright (C) 2001 Ximian, Inc.
- *
- * Written by Bradford Hovinen <hovinen@ximian.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-
-#include <gdk/gdkx.h>
-#include <X11/X.h>
-#include <X11/Xlib.h>
-#include <X11/XKBlib.h>
-#include <X11/extensions/XKBrules.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-#include "libsounds/sound-view.h"
-
-#include <glade/glade.h>
-
-/* Needed only for the sound capplet */
-
-#include <stdlib.h>
-#include <sys/types.h>
-
-#include "activate-settings-daemon.h"
-
-#define ENABLE_ESD_KEY "/desktop/gnome/sound/enable_esd"
-#define EVENT_SOUNDS_KEY "/desktop/gnome/sound/event_sounds"
-#define VISUAL_BELL_KEY "/apps/metacity/general/visual_bell"
-#define AUDIO_BELL_KEY "/apps/metacity/general/audible_bell"
-#define VISUAL_BELL_TYPE_KEY "/apps/metacity/general/visual_bell_type"
-
-/* Capplet-specific prototypes */
-
-static SoundProperties *props = NULL;
-
-static gboolean
-CheckXKB (void)
-{
- gboolean have_xkb = FALSE;
- Display *dpy;
- int opcode, errorBase, major, minor, xkbEventBase;
-
- gdk_error_trap_push ();
- dpy = GDK_DISPLAY ();
- have_xkb = XkbQueryExtension (dpy, &opcode, &xkbEventBase,
- &errorBase, &major, &minor)
- && XkbUseExtension (dpy, &major, &minor);
- XSync (dpy, FALSE);
- gdk_error_trap_pop ();
-
- return have_xkb;
-}
-
-static void
-props_changed_cb (SoundProperties *p, SoundEvent *event, gpointer data)
-{
- sound_properties_user_save (p);
-}
-
-
-
-static GConfEnumStringPair bell_flash_enums[] = {
- { 0, "frame_flash" },
- { 1, "fullscreen" },
- { -1, NULL }
-};
-
-static GConfValue *
-bell_flash_from_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_STRING);
- gconf_value_set_string (new_value,
- gconf_enum_to_string (bell_flash_enums, gconf_value_get_int (value)));
-
- return new_value;
-}
-
-static GConfValue *
-bell_flash_to_widget (GConfPropertyEditor *peditor, const GConfValue *value)
-{
- GConfValue *new_value;
- const gchar *str;
- gint val = 2;
-
- str = (value && (value->type == GCONF_VALUE_STRING)) ? gconf_value_get_string (value) : NULL;
-
- new_value = gconf_value_new (GCONF_VALUE_INT);
- if (value->type == GCONF_VALUE_STRING) {
- gconf_string_to_enum (bell_flash_enums,
- str,
- &val);
- }
- gconf_value_set_int (new_value, val);
-
- return new_value;
-}
-
-/* create_dialog
- *
- * Create the dialog box and return it as a GtkWidget
- */
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
- GtkWidget *widget, *box;
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/sound-properties.glade", "prefs_widget", NULL);
- widget = glade_xml_get_widget (dialog, "prefs_widget");
- g_object_set_data (G_OBJECT (widget), "glade-data", dialog);
-
- props = sound_properties_new ();
- sound_properties_add_defaults (props, NULL);
- g_signal_connect (G_OBJECT (props), "event_changed",
- (GCallback) props_changed_cb, NULL);
- box = glade_xml_get_widget (dialog, "events_vbox");
- gtk_box_pack_start (GTK_BOX (box), sound_view_new (props),
- TRUE, TRUE, 0);
-
- g_signal_connect_swapped (G_OBJECT (widget), "destroy",
- (GCallback) gtk_object_destroy, props);
-
- gtk_image_set_from_file (GTK_IMAGE (WID ("bell_image")),
- GNOMECC_DATA_DIR "/pixmaps/visual-bell.png");
-
- gtk_widget_set_size_request (widget, -1, 250); /* Can this be right? Seems broken for large fonts. */
-
- if (!CheckXKB()) {
- GtkWidget *audible_bell_option = WID ("bell_audible_toggle");
- GtkWidget *visual_bell_option = WID ("bell_visual_toggle");
-
- gtk_widget_set_sensitive (audible_bell_option, FALSE);
- gtk_widget_set_sensitive (visual_bell_option, FALSE);
- }
-
- return dialog;
-}
-
-/* setup_dialog
- *
- * Set up the property editors for our dialog
- */
-
-static void
-setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GObject *peditor;
-
- peditor = gconf_peditor_new_boolean (NULL, ENABLE_ESD_KEY, WID ("enable_toggle"), NULL);
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("events_toggle"));
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("events_vbox"));
-
- gconf_peditor_new_boolean (NULL, EVENT_SOUNDS_KEY, WID ("events_toggle"), NULL);
-
- gconf_peditor_new_boolean (NULL, AUDIO_BELL_KEY, WID ("bell_audible_toggle"), NULL);
-
- peditor = gconf_peditor_new_boolean (NULL, VISUAL_BELL_KEY, WID ("bell_visual_toggle"), NULL);
- gconf_peditor_widget_set_guard (GCONF_PROPERTY_EDITOR (peditor), WID ("bell_flash_vbox"));
-
- /* peditor not so convenient for the radiobuttons */
- gconf_peditor_new_select_radio (NULL,
- VISUAL_BELL_TYPE_KEY,
- gtk_radio_button_get_group (GTK_RADIO_BUTTON (WID ("bell_flash_window_radio"))),
- "conv-to-widget-cb", bell_flash_to_widget,
- "conv-from-widget-cb", bell_flash_from_widget,
- NULL);
-}
-
-/* get_legacy_settings
- *
- * Retrieve older gnome_config -style settings and store them in the
- * configuration database.
- *
- * In most cases, it's best to use the COPY_FROM_LEGACY macro defined in
- * capplets/common/capplet-util.h.
- */
-
-static void
-get_legacy_settings (void)
-{
- GConfClient *client;
- gboolean val_bool, def;
-
- client = gconf_client_get_default ();
- COPY_FROM_LEGACY (bool, "/desktop/gnome/sound/enable_esd", "/sound/system/settings/start_esd=false");
- COPY_FROM_LEGACY (bool, "/desktop/gnome/sound/event_sounds", "/sound/system/settings/event_sounds=false");
- g_object_unref (G_OBJECT (client));
-}
-
-static void
-dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustmulti-2");
- else
- gtk_main_quit ();
-}
-
-int
-main (int argc, char **argv)
-{
- GConfClient *client;
- GConfChangeSet *changeset;
- GladeXML *dialog = NULL;
- GtkWidget *dialog_win;
-
- static gboolean apply_only;
- static gboolean get_legacy;
- static struct poptOption cap_options[] = {
- { "apply", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
- { "init-session-settings", '\0', POPT_ARG_NONE, &apply_only, 0,
- N_("Just apply settings and quit (compatibility only; now handled by daemon)"), NULL },
- { "get-legacy", '\0', POPT_ARG_NONE, &get_legacy, 0,
- N_("Retrieve and store legacy settings"), NULL },
- { NULL, '\0', 0, NULL, 0, NULL, NULL }
- };
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-sound-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_POPT_TABLE, cap_options,
- NULL);
-
- activate_settings_daemon ();
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, "/desktop/gnome/sound", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- gconf_client_add_dir (client, "/apps/metacity/general", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- if (get_legacy) {
- get_legacy_settings ();
- } else {
- changeset = gconf_change_set_new ();
- dialog = create_dialog ();
- setup_dialog (dialog, changeset);
-
- dialog_win = gtk_dialog_new_with_buttons
- (_("Sound Preferences"), NULL, GTK_DIALOG_NO_SEPARATOR,
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- NULL);
-
- gtk_container_set_border_width (GTK_CONTAINER (dialog_win), 5);
- gtk_box_set_spacing (GTK_BOX (GTK_DIALOG(dialog_win)->vbox), 2);
- gtk_dialog_set_default_response (GTK_DIALOG (dialog_win), GTK_RESPONSE_CLOSE);
- g_signal_connect (G_OBJECT (dialog_win), "response", (GCallback) dialog_button_clicked_cb, changeset);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog_win)->vbox), WID ("prefs_widget"), TRUE, TRUE, 0);
- capplet_set_icon (dialog_win, "gnome-settings-sound");
- gtk_widget_show_all (dialog_win);
-
- gtk_main ();
- gconf_change_set_unref (changeset);
- }
-
- g_object_unref (client);
- g_object_unref (dialog);
- return 0;
-}
diff --git a/capplets/sound/sound-properties.glade b/capplets/sound/sound-properties.glade
deleted file mode 100644
index a414420eb..000000000
--- a/capplets/sound/sound-properties.glade
+++ /dev/null
@@ -1,359 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkWindow" id="window1">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Sound Preferences</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>
-
- <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>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="enable_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">E_nable sound server startup</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">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="events_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Sounds for events</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">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</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">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>
-
- <child>
- <widget class="GtkVBox" id="events_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Sound Events</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>
-
- <child>
- <widget class="GtkVBox" id="bell_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="bell_image">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="bell_audible_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Sound an audible bell</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="bell_visual_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Visual feedback:</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">1</property>
-
- <child>
- <widget class="GtkFrame" id="frame2">
- <property name="width_request">20</property>
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="bell_flash_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkRadioButton" id="bell_flash_window_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Flash _window titlebar</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="bell_flash_screen_radio">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Flash _entire screen</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>
- <property name="group">bell_flash_window_radio</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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">System Bell</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/sound/visual-bell.png b/capplets/sound/visual-bell.png
deleted file mode 100644
index 91fb9490d..000000000
--- a/capplets/sound/visual-bell.png
+++ /dev/null
Binary files differ
diff --git a/capplets/theme-switcher/.cvsignore b/capplets/theme-switcher/.cvsignore
deleted file mode 100644
index 325bb0abc..000000000
--- a/capplets/theme-switcher/.cvsignore
+++ /dev/null
@@ -1,7 +0,0 @@
-Makefile.in
-Makefile
-.deps
-.libs
-gnome-theme-manager
-gtk-theme-selector.desktop
-gtk-theme-selector.desktop.in
diff --git a/capplets/theme-switcher/ChangeLog b/capplets/theme-switcher/ChangeLog
deleted file mode 100644
index 738e796dc..000000000
--- a/capplets/theme-switcher/ChangeLog
+++ /dev/null
@@ -1,955 +0,0 @@
-2005-02-08 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-installer.c: (file_theme_type), (transfer_done_cb),
- (install_dialog_response), (gnome_theme_installer_run):
- patch by Kjartan Maraas <kmaraas@gnome.org>, remove a load of leaks
- and make sure newly installed themes show up in the relevant lists
- without having to close/open the dialog again (Closes: #166267).
-
-2005-02-07 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-installer.c: (transfer_done_cb): fix some strings,
- changes by David Lodge <dave@cirt.net> (Closes: #166550).
-
-2005-02-01 Elijah Newren <newren@gmail.com>
-
- Fix an infinite loop that was bringing single-CPU systems to their
- knees. Approved by Kjartan. #160803
-
- * gnome-theme-manager.c: (window_settings_changed): keep track of
- the window manager theme last selected and just exit if we are
- already using the one we want
-
-2005-02-01 David Sedeño <david@alderia.com>
-
- New install procedure: See bug #102216.
- * gnome-theme-details.c: Remove gnome_theme_installer_run_cb,
- gnome_icon_theme_installer_run_cb because gnome_theme_installer_run
- function now detects if it is a icon or theme.
- (gnome_theme_details_init): Remove install buttons in theme details
- window.
- * gnome-theme-installer.c (file_theme_type): Detects the type of the
- theme inspecting the content of the file.
- (transfer_done_targz_idle_cb, transfer_done_tarbz2_idle_cb): Install
- the theme in the correct temp dir.
- (transfer_done_cb): Detects if the file to install it is in the
- correct format and informs the user if it is not supported. Unpack the
- file (informs the user if there are not the correct utility in the
- system) and install the theme in the correct directory.
- (gnome_theme_installer_run): Remove parameter. Now we detect the file
- type.
- * gnome-theme-manager.c (gnome_meta_theme_installer_run_cb,
- gnome_theme_manager_drag_data_received_cb): Call
- gnome_theme_installer_run without the third parameter. Now we detect
- the file type.
- * theme-properties.glade: Removes install buttons in details window.
-
-2005-01-06 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-installer.c: (install_dialog_response): check the
- permission of the .icons/.themes dir instead of the files in it
- (Closes: #161649).
-
-2005-01-03 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-installer.c: (install_dialog_response): use a temporary
- filename to not overwrite existant files in ~/.themes (Closes: #97180).
-
-2004-12-25 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-details.c: Don't include <gtk/gtk.h> twice.
- * gnome-theme-installer.c: Same (comes in from -installer.h)
- * gnome-theme-manager.c: Same.
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications.
-
- * gtk-theme-selector.desktop.in: add OnlyShowIn=GNOME;
-
-Tue Nov 2 16:03:41 2004 Jonathan Blandford <jrb@redhat.com>
-
- * theme-switcher.c (install_dialog_response): Patch from
- Vijaykumar Patwari <vijaykumar.patwari@wipro.com> to warn when
- .themes can't be written to.
-
-2004-10-28 Mike Newman <mikegtn@gnome.org>
-
- * gnome-theme-installer.c: (transfer_done_cb) install themes named
- .tgz correctly. Show a dialog and remove the file from .themes if the
- theme could not be installed (Closes: #148895).
-
-2004-10-27 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-installer.c: (transfer_done_targz_idle_cb),
- (transfer_done_tarbz2_idle_cb): *
- patch by Rajkumar <rajkumar.siva@wipro.com> to fix the themes
- installation with the non GNU versions of tar (Closes: #114553).
-
-2004-10-27 Sebastien Bacher <seb128@debian.org>
-
- * gnome-theme-save.c: (setup_directory_structure):
- patch by David Sedeño Fernández <david@alderia.com> to fix a
- warning during the compilation (Closes: #148345).
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-theme-details.c: (gnome_theme_details_init):
- * gnome-theme-manager.c: (setup_dialog):
- * theme-switcher.c: (setup_dialog):
- Use themed icon for WM hint.
-
-2004-07-31 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-save.c: (setup_directory_structure): Remove
- extra space in a string before question mark.
-
-2004-07-09 David Sedeño <david@alderia.com>
-
- (http://bugzilla.gnome.org/show_bug.cgi?id=122970)
- * gnome-theme-save.c (setup_directory_structure):
- If theme exists, show confirmation dialog to user.
-
-2004-06-20 David Sedeño <david@alderia.com>
-
- (http://bugzilla.gnome.org/show_bug.cgi?id=143958)
- * gnome-theme-manager.c, theme-properties.glade: Revert option added.
- Two now gboolean global var: 'themes_loaded' to check if its the first
- time that has cold meta_theme_selection_changed. 'rervert' to known
- in the same function if the selection has change because a revert.
- (meta_theme_selection_changed): If it's the same time, save the
- initial theme in initial_meta_theme_info. If the selection has change
- because a revert click, set the sensitive of the revert button
- to false.
- (revert_theme_clicked): callback for the revert button clicked signal.
- Set the initial_meta_theme and set sensitive to FALSE.
- (setup_dialog): Added the revert button to the gtk_size_group, connect
- the clicked callback and set sensitive initially to FALSE.
-
-2004-05-27 Padraig O'Briain <padraig.obriain@sun.com>
-
- * theme-properties.glade: Set accessible name for GtkTreeViews
- in Theme Details dialog. Fixes bug #142402.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-07 Jody Goldberg <jody@gnome.org>
-
- * gnome-theme-manager.c (update_settings_from_gconf_idle) : fix the
- selection when not running metacity. That was damn irritating.
-
-2004-03-10 Chris Lahey <clahey@ximian.com>
-
- * gnome-theme-manager.c: (pixbuf_async_func): rename function. Use
- broken_image.
- (pixbuf_async_data_free): rename function. Use PixbufAsyncData instead
- of a GList.
- (pixbuf_idle_func): rename function. Handle the case that things
- change again while we're updating. Stop what it's doing and start
- from the beginning.
- (add_pixbuf_idle):
- (load_meta_themes): clean up. Remove model_meta_theme_info.
- (update_themes_from_disk): Remove the code to check for
- have_meta_theme here. It works with no metathemes installed.
- (add_custom_row_to_meta_theme): handle the initial case too.
- (remove_custom_row_from_meta_theme): removed.
- (themes_equal): helper function for a fairly complicated comparison.
- (update_settings_from_gconf_idle), (update_settings_from_gconf):
- reamed. Instead of custom_theme_found to mean that there should be a
- custom theme, we use current_theme_saved.
- This means that there's a metatheme for the current theme. Its
- meaning is almost exactly the boolean opposite of the old
- one but it's more understandable. initial_theme_saved tells us
- whether the initial theme has a metatheme for it now.
- (theme_changed_idle), (theme_changed_func): Made this idle to reduce
- rerunning
- (setup_dialog): Load broken image.
- (gnome_theme_manager_sort_func): Make it symmetric.
- * gnome-theme-manager.h: Remove THEME_FLAG_INITIAL.
-
-2004-04-02 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-theme-details.c (update_list_something): Check that cursor
- position has changed before calling gtk_tree_view_set_cursor.
- * gnome-theme-manager.c (update_settings_from_gconf): Check that
- cursor position has changed before calling gtk_tree_view_set_cursor.
-
- Fixes bug #131538.
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-03-02 Jody Goldberg <jody@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes) : revert the commit on
- Wed Feb 4 00:05:11 2004 Jonathan Blandford <jrb@gnome.org>
- exit if it is a non-compliant wm (eg, anything but metacity)
-
-2004-02-25 Fernando Herrera <fherrera@onirica.com>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=132902
- * theme-install.glade: use GtkFileChooser.
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-theme-details.c: (cb_dialog_response):
- * gnome-theme-installer.c: (install_dialog_response):
- * gnome-theme-manager.c: (cb_dialog_response):
- * theme-switcher.c: (install_dialog_response),
- (cb_dialog_response): Update help links to point to user-guide.xml
-
-Sat Feb 7 00:34:45 2004 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes): fix #106424
-
-Fri Feb 6 20:49:25 2004 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-details.c (gnome_theme_details_init): Patch from
- Frederic Crozat to install themes in the right place.
-
-Wed Feb 4 00:05:11 2004 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes): exit if it is a
- non-compliant wm (eg, anything but metacity)
-
-Tue Feb 3 23:36:25 2004 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes): use
- g_markup_printf_escaped instead of g_strdup_printf, #110564
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2004-01-05 Muktha <muktha.narayan@wipro.com>
-
- * theme-properties.glade: Add accessible name and description.
- Fixes bug #128377.
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-12-05 Srinivasa Ragavan <sragavan@novell.com>
-
- * gnome-theme-installer.c (install_dialog_response): Fix for bug
- #127371, reporting invalid/ null file locations.
-
-2003-12-05 Srinivasa Ragavan <sragavan@novell.com>
-
- * gnome-theme-installer.c (install_dialog_response): Fix for infinite
- loop, when trying to install themes from ~/.themes , #116224
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-Tue Aug 5 15:38:31 2003 Jonathan Blandford <jrb@redhat.com>
-
- * theme-properties.glade: Fix from Christian Neumair to fix
- default and focus, #116892
-
- * theme-install.glade: ditto
-
-Mon Aug 4 14:14:53 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-manager.c (idle_async_func): make sure that we have
- a valid theme_id, #104824
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-07-02 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-theme-manager.c: (idle_async_func), (load_meta_themes):
- use the default image if the thumbnailer fails.
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-Wed Jun 18 15:46:27 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Makefile.am (EXTRA_DIST): add $(desktop_icons_DATA)
-
-2003-06-06 Mark Finlay <sisob@eircom.net>
-
- * gnome-ccthemes.png
- * Makefile.am
-
- Add icon for the theme applet from gnome-desktop
-
-2003-05-28 Christian Neumair <chris@gnome-de.org>
-
- * theme-install.glade
- * theme-properties.glade:
-
- HIGified (#105004).
-
-2003-05-13 Andrew Sobala <aes@gnome.org>
-
- * Makefile.am: removed theme-thumbnail.[ch]
- * gnome-theme-manager.c: (meta_theme_selection_changed):
- theme-thumbnail is now in libcommon. Removed meta_theme_set; also now
- in libcommon.
- * theme-thumbnail.c: removed, now in libcommon
- * theme-thumbnail.h: removed, now in libcommon
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-05-03 Kjartan Maraas <kmaraas@gnome.org>
-
- * theme-thumbnail.c: (create_image): Unref the
- icon_theme after using it.
-
-2003-05-02 Kjartan Maraas <kmaraas@gnome.org>
-
- * theme-properties.glade: Add a colon for consistency.
- Fixes bug #103923.
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-theme-manager.c: (main): Fix a typo. Adapted version
- of a patch from <mitr@volny.cz>. Fixes bug #111849.
-
-2003-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * theme-thumbnail.c: (message_from_capplet), (message_from_child),
- (generate_theme_thumbnail), (theme_thumbnail_factory_init): Plug
- leaks and guard against invalid reads reported by valgrind.
-
-Wed Feb 5 17:03:26 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.[ch] (get_default_string_from_key): get the
- default from the schema and always sort it at the top.
-
- * gnome-theme-details.c: ditto
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Tue Jan 21 00:44:03 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-save.c (escape_string_and_dup): correctly escape the
- file we're saving.
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-Thu Jan 16 02:32:39 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-details.c (gnome_theme_details_update_from_gconf):
- make sure we're initted, as this function can be run
- asynchronously.
-
- * gnome-theme-manager.c (gnome_meta_theme_installer_run_cb): hook
- up the installer.
-
- * gnome-theme-installer.c: Try to handle icon themes.
-
-Wed Jan 15 20:15:31 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-manager.c (gnome_theme_manager_tree_sort_func):
- remove this unneeded sort func.
-
- * gnome-theme-details.c (setup_tree_view): use the right sort
- function.
-
-2003-01-14 Jody Goldberg <jody@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes) : yet another place to
- handle NULL window manager.
-
-2003-01-14 Alex Duggan <aldug@gnome.org>
-
- * gnome-theme-manager.c (main):
- s/gnome-theme-properties/gnome-theme-manager/ Fixes #103525
-
-Tue Jan 14 02:16:22 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes): set the correct row to
- the new data. This was messing a lot up. Saving now works, so
- long as you don't type bad data.
-
- * TODO: update.
-
-2003-01-13 Jody Goldberg <jody@gnome.org>
-
- * gnome-theme-manager.c (load_meta_themes) : handle yet another place
- where gnome_wm_manager_get_current may be NULL.
-
-Mon Jan 13 15:20:17 2003 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-manager.c (main): gnome_theme_init ()
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Makefile.am (EXTRA_DIST) : dist the pixmaps too.
-
-2003-01-08 Anders Carlsson <andersca@codefactory.se>
-
- * gnome-theme-manager.c: (update_font_button_state),
- (font_key_changed), (apply_font_clicked), (setup_dialog):
- * gnome-theme-manager.h:
- Add support for applying fonts.
-
- * theme-thumbnail.c: (create_image):
- Allow SVG files as icons.
-
-2003-01-08 Jody Goldberg <jody@gnome.org>
-
- * gnome-theme-details.c (gnome_theme_details_update_from_gconf) :
- handle lack of metacity.
- (window_theme_selection_changed) : ditto.
- (gnome_theme_details_reread_themes_from_disk) : ditto.
-
-Wed Jan 8 01:57:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (add_initial_row_to_meta_theme): handle
- initial theme as custom.
-
- * TODO: update
-
-Tue Jan 7 03:10:36 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-save.c (save_dialog_response): add a description
- entry. Still needs escaping.
-
- * theme-thumbnail.c (generate_theme_thumbnail): read the thumbnail
- back from the child correctly. I think thumbnailing fully works.
-
- * TODO: Update
-
-2003-01-06 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-manager.c: (load_meta_themes):
- * theme-properties.glade:
-
- Removed #if 0'd code for hard-coding minimuum height
- of the tree view. Use glade properties to set minimuum
- height to a more reasonable value. Its hard to find
- items when you only see two in the scroll-view at
- any given time, and many people do not think to
- resize windows (nor should they have to :-)
-
-2003-01-06 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-manager.c: (add_custom_row_to_meta_theme):
-
- Don't mark internal string for translation so we don't
- break string freeze.
-
-Mon Jan 6 10:55:39 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (setup_dialog): fix default image.
- Remove debugging g_prints.
-
-2003-01-05 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-manager.c: (setup_dialog), (main):
- * Makefile.am:
- * theme-thumbnailing.png:
-
- Add a default image for when theme's are being
- thumbnailed.
-
- * theme-properties.glade:
-
- Hide dialog by default so it doesn't come
- up undrawn.
-
-2003-01-05 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-manager.c: (add_custom_row_to_meta_theme),
- (remove_custom_row_from_meta_theme):
- * theme-thumbnail.c: (theme_thumbnail_invalidate_cache):
- * theme-thumbnail.h:
-
- Generate thumbnails for the custom theme.
-
-Thu Jan 2 08:57:54 2003 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c: correctly merge disk updates and the
- current setup.
-
- * TODO: Add a TODO
-
-2002-12-31 Seth Nickell <snickell@stanford.edu>
-
- * theme-thumbnail.c: (create_image):
-
- Change the order of priority between folder icon names,
- since gnome-fs-directory is in the backup theme and will
- otherwise take precedence. This fix is a hack.
-
-2002-12-31 Seth Nickell <snickell@stanford.edu>
-
- * theme-thumbnail.c: (create_image):
-
- Thumbnail for themes (most currently) that use
- "gnome-fs-directory" as the icon name for folders rather
- than "folder".
-
-2002-12-30 Jody Goldberg <jody@gnome.org>
-
- Apply
- http://bugzilla.gnome.org/show_bug.cgi?id=101752
-
- * gnome-theme-details.c : Merge in Frederic's patch.
- * gnome-theme-details.c : ditto.
-
-2002-12-28 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-details.c: (path_to_theme_id), (load_theme_names),
- (gnome_theme_details_reread_themes_from_disk):
-
- Use the theme directory name rather than the "printable" name
- for icon themes. Does this need to be done for WM themes and
- GTK themes as well?
-
-2002-12-28 Seth Nickell <snickell@stanford.edu>
-
- * gnome-theme-manager.c: (update_themes_from_disk):
-
- Fix crash when current WM isn't detected.
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-Fri Dec 6 16:54:14 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-save-data.c: New file. Really saves now. Doesn't
- notice when a new metatheme is added, though.
-
-Tue Dec 3 20:45:17 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-save.c: Add saving support. Almost to a working
- point w/ this capplet...
-
-Tue Dec 3 14:26:05 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-theme-details.c (window_theme_selection_changed): Fix
- g_assert_not_reached() that can be reached.
-
-Tue Dec 3 00:40:13 2002 Jonathan Blandford <jrb@gnome.org>
-
- * .cvsignore: shut up, CVS
-
- * Makefile.am: build new objects
-
- * gnome-theme-details.[ch]: New file to encapsulate the details
- dialog.
-
- * gnome-theme-manager.c: Restructure code. Less love, more work.
- Prolly an improvement.
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-Sat Nov 16 00:55:58 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (meta_theme_selection_changed): actually
- set the theme.
-
-Thu Nov 14 19:30:02 2002 Jonathan Blandford <jrb@gnome.org>
-
- * theme-thumbnail.c (setup_theme_thumbnail_factory): add G_IO_HUP
- so the child can actually exit when the parent does.
-
-Thu Nov 14 17:14:00 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c: Use new theme system. Handle other
- themes better.
-
- * theme-thumbnail.c: new file to draw themes. Currently
- synchronous -- needs to be made async.
-
-Thu Nov 7 15:24:33 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gtk-theme-selector.desktop.in (Exec): change binary name.
-
-Tue Nov 5 15:48:20 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c (read_themes): make more robust.
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Makefile.am : Add missing file
-
-Fri Nov 1 11:01:16 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-theme-manager.c: Rewrote to handle metathemes and icon
- themes. The WM stuff was previously broken, too.
-
- * gnome-theme-installer.[ch]: Extract this code out to it's own
- file.
-
-2002-10-26 Havoc Pennington <hp@pobox.com>
-
- * theme-switcher.c (window_read_themes): adapt to gnome-wm-manager
- API changes
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Yanko Kaneti <yaneti@declera.com>
-
- * gtk-theme-switcher.schemas: reorder elements so that it validates.
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-26 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (drag_data_received_cb) : unescape the string.
-
-2002-09-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: use ../../libwindow-settings/libgnome-window-settings.la
- instead of -L../../libwindow-settings -lgnome-window-settings.
- Fixeds build breakage.
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-01 Christophe Fergeau <teuf@users.sourceforge.net>
-
- * theme-switcher.c : correctly deal with bzip2
- compressed theme files
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * gtk-theme-selector.desktop.in: Fix the desktop file so that it
- validates.
-
-2002-08-07 Jody Goldberg <jody@gnome.org>
- Patch from JRB for 88443
-
- * theme-switcher.c (read_themes) : store the current cursor
-
-2002-07-31 Federico Mena Quintero <federico@ximian.com>
-
- * theme-install.glade: Make the file entry modal. Fixes #89410.
-
-2002-07-10 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (show_install_dialog) : create and destroy the
- dialog.
-
-2002-07-05 jacob berkman <jacob@ximian.com>
-
- * theme-switcher.c (transfer_done_cb): do the real work in an idle
- (transfer_done_idle_cb): do the real work
-
- this fixes bug #86141 - i don't understand why, but some very evil
- things seem to have been happening. see that bug for details.
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
- * theme-switcher.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (install_dialog_response) : improve handling of
- help failures.
- (cb_dialog_response) : ditto.
-
-Sun May 26 11:34:31 2002 Jonathan Blandford <jrb@gnome.org>
-
- * theme-switcher.c (main): use APPID instead of argv[0]
-
-2002-05-16 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (install_dialog_response) : add some safety checks
- for invalid files.
-
-2002-05-16 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (cb_dialog_response) : fix path.
- (install_dialog_response) : add help link.
-
-Tue May 14 12:29:35 2002 Jonathan Blandford <jrb@redhat.com>
-
- * theme-switcher.c (read_themes): try to scroll to theme.
- Currently appears to be a little broken somewhere.
-
- * theme-properties.glade: clean up, and add an atk relation, #76416
-
-2002-05-10 Anders Carlsson <andersca@gnu.org>
-
- * theme-properties.glade:
- Remove ellipsis after "Go to theme folder".
-
- * theme-switcher.c: (show_manage_themes):
- Create the .themes directory if it doesn't exist.
-
-2002-05-10 Anders Carlsson <andersca@gnu.org>
-
- * theme-properties.glade:
- Remove ellipsis after "Go to theme folder".
-
- * theme-switcher.c: (show_manage_themes):
- Create the .themes directory if it doesn't exist.
-
-2002-05-08 Jody Goldberg <jody@gnome.org>
-
- * theme-switcher.c (cb_dialog_response) : new.
- (setup_dialog) : support help.
-
-Mon May 6 17:40:17 2002 Jonathan Blandford <jrb@redhat.com>
-
- * theme-switcher.c: remove print statements
-
- * theme-properties.glade: Fix up UI. Not perfect, but better.
-
-2002-04-29 Rachel Hestilow <hestilow@ximian.com>
-
- * theme-properties.glade: Further revamp based on seth's suggestions.
-
-2002-04-29 Rachel Hestilow <hestilow@ximian.com>
-
- * theme-properties.glade: Hide checkbutton until we actually
- implement that...put it on the backburner for now.
-
-2002-04-29 Rachel Hestilow <hestilow@ximian.com>
-
- * theme-properties.glade, theme-swither.c: Add support
- for install/manage themes.
-
-2002-04-27 Seth Nickell <snickell@stanford.edu>
-
- * gtk-theme-selector.desktop.in:
-
- Change name, move out of Advanced category.
-
- * theme-properties.glade:
-
- Tweak padding / spacing.
-
- * gtk-theme-selector.desktop.in.in:
-
- Old cruft file, delete.
-
-2002-04-26 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * gnome-font-and-theme-properties.c:
- * gnome-font-and-theme-properties.glade:
- * gtk-theme-selector.glade:
- * main.c:
- * theme-properties.glade:
- * theme-switcher.c: (create_dialog), (theme_selection_changed),
- (read_themes), (theme_key_changed), (theme_changed_func),
- (sort_func), (setup_dialog), (main):
-
- Move the font code into a seperate capplet.
-
-Thu Apr 18 19:35:42 2002 Jonathan Blandford <jrb@redhat.com>
-
- * gnome-font-and-theme-properties.c (setup_dialog): handle new
- theme-changing code, and sort code.
-
-2002-04-12 jacob berkman <jacob@ximian.com>
-
- * gnome-font-and-theme-properties.c (create_dialog): get the glade
- file from GLADEDIR
-
- * Makefile.am (INCLUDES): define GLADEDIR
- (glade_DATA): install the right glade file
-
-Wed Apr 10 18:03:25 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gtk-theme-selector.desktop.in (Exec): s/gtk2-theme-selector-capplet/gnome-font-and-theme-properties
-
-2002-04-10 Rachel Hestilow <hestilow@ximian.com>
-
- * gnome-font-and-theme-properties.glade: Add font options to UI.
-
- * gnome-font-and-theme-properties.c (setup_dialog): Add peditors
- for fonts.
-
-2002-04-10 jacob berkman <jacob@ximian.com>
-
- * Makefile.am (SUBDIRS): add back SUBDIRS
-
-2002-03-28 Richard Hestilow <hestilow@ximian.com>
-
- * control/control.c (create_form): Construct list example
- from a single string. Fixes bug #72761.
-
-2002-03-09 Richard Hestilow <hestilow@ximian.com>
-
- * gtk-theme-selector.glade, main.c: Remove preview option
- and button, this makes no sense with instant apply.
- (select_cb): Just call apply_cb.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * main.c: s/PACKAGE/GETTEXT_PACKAGE/g
-
-2002-02-18 Gediminas Paulauskas <menesis@delfi.lt>
-
- * main.c: fix i18n
-
-2002-02-11 Seth Nickell <snickell@stanford.edu>
-
- * gtk-theme-selector.glade:
- * main.c: (call_apply), (response_cb), (main):
-
- Convert to instant apply.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * main.c (themes_list_refresh): Use g_path_get_basename
- (get_selected_theme_name): Ditto
- (install_cb): Use g_signal_connect
-
- * control/control.c (create_form): Use gtk_menu_shell_append
- (create_form): Use gtk_radio_button_get_group,
- set entry max length explicitly
-
-2002-01-28 Richard Hestilow <hestilow@ximian.com>
-
- * main.c: Include gconf-client.h, add trailing NULLs to all
- gconf_client calls (for GError).
-
-2002-01-27 Seth Nickell <snickell@stanford.edu>
-
- * gtk-theme-selector.desktop.in.in:
-
- Add Categories field.
-
-2002-01-27 Richard Hestilow <hestilow@ximian.com>
-
- * control/control.c: Include string.h.
- (create_form): Defer modifying default rc files until property is set.
- (set_prop_cb): Set default files here instead.
-
-2002-01-21 Anders Carlsson <andersca@gnu.org>
-
- * main.c: Get the theme name right.
-
- * control/control.c (create_form): Use a GtkTreeView instead of a
- clist.
-
-2002-01-21 Richard Hestilow <hestilow@ximian.com>
-
- * Complete rewrite.
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Update
-
-2002-01-04 Bradford Hovinen <hovinen@ximian.com>
-
- * control/Makefile.am (gnome_theme_preview_LDADD): Use
- $(CONTROL_{CFLAGS|LIBS}) rather than @CONTROL_{CFLAGS|LIBS}@
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * Port to GConf.
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * Partial revamp to use bonobo control instead of bug-prone
- custom socket; also port away from libcapplet.
-
-2001-10-13 Bradford Hovinen <hovinen@ximian.com>
-
- * lister.c (edit_file_to_use): Be paranoid about what we have read
- from the input file -- make sure the string is always
- NULL-terminated
-
-2001-09-29 Richard Hestilow <hestilow@ximian.com>
-
- * gui.c (sort_alpha): Use g_strcasecmp, not strcmp.
- Fixes bug #13539.
-
-2001-09-29 Richard Hestilow <hestilow@ximian.com>
-
- * lister.c: (list_themes, list_system_themes, list_user_themes):
- Return a GList of ThemeEntry*, and remove extraneous number argument.
- Also, use g_strdup_printf instead of g_snprintf.
-
- * da.h (ThemeEntry): Add a "row" data member.
- * gui.c: Change variables current_theme, current_global_theme,
- initial_theme, and last_theme to ThemeEntry*.
- (make_main): Change GtkList to a GtkCList to avoid scrolling bug.
- (click_entry): Changed to "select_row" callback prototype.
- (delete_entry): Removed.
- (item_destroy_notify): Added in lieu of delete_entry.
- (sort_alpha): Accept ThemeEntry* and not GtkBin*.
- (add_theme_list): Added.
- (update_theme_entries): Use clist functions.
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Remove empty SUBDIRS line
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Richard Hestilow <hestilow@ximian.com>
-
- * Started.
-
- * main.c (main): Don't waitpid. I have no idea why it didn't work,
- but this is at least better than waiting forever.
diff --git a/capplets/theme-switcher/Makefile.am b/capplets/theme-switcher/Makefile.am
deleted file mode 100644
index 1e0692e3e..000000000
--- a/capplets/theme-switcher/Makefile.am
+++ /dev/null
@@ -1,42 +0,0 @@
-bin_PROGRAMS = gnome-theme-manager
-
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-pixmap_DATA = \
- theme-thumbnailing.png
-
-gnome_theme_manager_LDADD = \
- $(GNOMECC_CAPPLETS_LIBS) \
- $(METACITY_LIBS) \
- $(top_builddir)/libwindow-settings/libgnome-window-settings.la \
- $(top_builddir)/capplets/common/libcommon.la
-
-gnome_theme_manager_SOURCES = \
- gnome-theme-save.c \
- gnome-theme-save.h \
- gnome-theme-manager.c \
- gnome-theme-manager.h \
- gnome-theme-details.c \
- gnome-theme-details.h \
- gnome-theme-installer.c \
- gnome-theme-installer.h
-
-gnome_theme_manager_LDFLAGS = -export-dynamic
-
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gtk-theme-selector.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = theme-properties.glade theme-install.glade
-
-INCLUDES = \
- -I$(top_srcdir) \
- $(METACITY_CFLAGS) \
- $(GNOMECC_CAPPLETS_CFLAGS) \
- -DGLADEDIR=\""$(gladedir)"\"
-
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA) gnome-theme-save-data.c $(pixmap_DATA)
diff --git a/capplets/theme-switcher/TODO b/capplets/theme-switcher/TODO
deleted file mode 100644
index cbc040167..000000000
--- a/capplets/theme-switcher/TODO
+++ /dev/null
@@ -1,17 +0,0 @@
-Left TODO:
-
- * Change custom theme text to indicate what themes are being used.
- - requires breaking string freeze
-
- * Sanity check saving. In particular, \n needs escaping.
-
- * Fix the collation of the Details dialog. Seems to be going on theme
- name, not readable name.
-
- * When saving a theme that started as an initial custom theme, kill
- that from the list.
-
- * Have the 'set Background' button do something.
-
- * make sure that installing themes go to the right place.
-
diff --git a/capplets/theme-switcher/gnome-ccthemes.png b/capplets/theme-switcher/gnome-ccthemes.png
deleted file mode 100644
index e722d1a3a..000000000
--- a/capplets/theme-switcher/gnome-ccthemes.png
+++ /dev/null
Binary files differ
diff --git a/capplets/theme-switcher/gnome-theme-details.c b/capplets/theme-switcher/gnome-theme-details.c
deleted file mode 100644
index 6dd4732a3..000000000
--- a/capplets/theme-switcher/gnome-theme-details.c
+++ /dev/null
@@ -1,568 +0,0 @@
-#include <config.h>
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-async-ops.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-
-#include <libwindow-settings/gnome-wm-manager.h>
-
-#include "capplet-util.h"
-#include "gnome-theme-manager.h"
-#include "gnome-theme-details.h"
-#include "gnome-theme-installer.h"
-#include "gnome-theme-info.h"
-
-#define MAX_ELEMENTS_BEFORE_SCROLLING 12
-
-static gboolean theme_details_initted = FALSE;
-static gboolean setting_model = FALSE;
-
-/* Function Prototypes */
-static void cb_dialog_response (GtkDialog *dialog,
- gint response_id);
-static void setup_tree_view (GtkTreeView *tree_view,
- GCallback changed_callback,
- GladeXML *dialog);
-static void gtk_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data);
-static void window_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data);
-static void icon_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data);
-static void update_gconf_key_from_selection (GtkTreeSelection *selection,
- const gchar *gconf_key);
-static void load_theme_names (GtkTreeView *tree_view,
- GList *theme_list,
- const gchar *default_theme);
-static char *path_to_theme_id (const char *path);
-
-
-static char *
-path_to_theme_id (const char *path)
-{
- char *dirname;
- char *result;
-
- dirname = g_path_get_dirname(path);
- result = g_path_get_basename(dirname);
- g_free(dirname);
-
- return result;
-}
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog), "user-guide.xml", "goscustdesk-12");
- else
- gtk_widget_hide (GTK_WIDGET (dialog));
-}
-
-static gint
-details_tree_sort_func (GtkTreeModel *model,
- GtkTreeIter *a,
- GtkTreeIter *b,
- gpointer user_data)
-{
- gchar *a_name = NULL;
- gchar *b_name = NULL;
- guint a_flag = FALSE;
- guint b_flag = FALSE;
- gint retval;
-
- gtk_tree_model_get (model, a,
- THEME_NAME_COLUMN, &a_name,
- THEME_FLAG_COLUMN, &a_flag,
- -1);
- gtk_tree_model_get (model, b,
- THEME_NAME_COLUMN, &b_name,
- THEME_FLAG_COLUMN, &b_flag,
- -1);
-
- retval = gnome_theme_manager_sort_func (a_name, b_name, a_flag, b_flag);
-
- g_free (a_name);
- g_free (b_name);
-
- return retval;
-}
-
-static void
-setup_tree_view (GtkTreeView *tree_view,
- GCallback changed_callback,
- GladeXML *dialog)
-{
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
-
- model = (GtkTreeModel *) gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_UINT);
- gtk_tree_sortable_set_sort_func (GTK_TREE_SORTABLE (model), 0, details_tree_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", changed_callback, dialog);
-
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (tree_view,
- -1, NULL,
- renderer,
- "text", THEME_NAME_COLUMN,
- NULL);
-}
-
-
-static void
-gtk_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- update_gconf_key_from_selection (selection, GTK_THEME_KEY);
-}
-
-static void
-window_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
- GtkTreeIter iter;
- gchar *window_theme_name;
- GtkTreeModel *model;
-
- if (setting_model)
- return;
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- {
- gtk_tree_model_get (model, &iter,
- THEME_ID_COLUMN, &window_theme_name,
- -1);
- }
- else
- {
- return;
- }
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- if (window_manager != NULL) {
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- wm_settings.theme = window_theme_name;
- gnome_window_manager_change_settings (window_manager, &wm_settings);
- }
- g_free (window_theme_name);
-}
-
-static void
-icon_theme_selection_changed (GtkTreeSelection *selection,
- gpointer data)
-{
- update_gconf_key_from_selection (selection, ICON_THEME_KEY);
-}
-
-static void
-load_theme_names (GtkTreeView *tree_view,
- GList *theme_list,
- const gchar *default_theme)
-{
- GList *list;
- GtkTreeModel *model;
- GtkWidget *swindow;
- gint i = 0;
-
- swindow = GTK_WIDGET (tree_view)->parent;
- model = gtk_tree_view_get_model (tree_view);
- g_assert (model);
-
- setting_model = TRUE;
- gtk_list_store_clear (GTK_LIST_STORE (model));
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
- GTK_POLICY_NEVER, GTK_POLICY_NEVER);
- gtk_widget_set_usize (swindow, -1, -1);
-
- for (list = theme_list; list; list = list->next->next)
- {
- const char *name = list->data;
- const char *id = list->next->data;
- GtkTreeIter iter;
- gboolean is_default;
-
- gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
-
- if (default_theme && strcmp (default_theme, name) == 0)
- is_default = TRUE;
- else
- is_default = FALSE;
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- THEME_NAME_COLUMN, name,
- THEME_ID_COLUMN, id,
- THEME_FLAG_COLUMN, is_default,
- -1);
-
- if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
- {
- GtkRequisition rectangle;
- gtk_widget_size_request (GTK_WIDGET (tree_view), &rectangle);
- gtk_widget_set_usize (swindow, -1, rectangle.height);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- }
- i++;
- }
- setting_model = FALSE;
-}
-
-/* Shared by icons and gtk+ */
-static void
-update_gconf_key_from_selection (GtkTreeSelection *selection,
- const gchar *gconf_key)
-{
- 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_ID_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, gconf_key, NULL);
- if (old_key && strcmp (old_key, new_key))
- {
- gconf_client_set_string (client, gconf_key, new_key, NULL);
- }
- g_free (old_key);
- }
- else
- {
- gconf_client_unset (client, gconf_key, NULL);
- }
- g_free (new_key);
- g_object_unref (client);
-}
-
-void
-gnome_theme_details_init (void)
-{
- GtkWidget *parent, *widget;
- GnomeWindowManager *window_manager;
- GladeXML *dialog;
-
- if (theme_details_initted)
- return;
- theme_details_initted = TRUE;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- parent = WID ("theme_details_dialog");
-
- setup_tree_view (GTK_TREE_VIEW (WID ("control_theme_treeview")),
- (GCallback) gtk_theme_selection_changed,
- dialog);
- setup_tree_view (GTK_TREE_VIEW (WID ("window_theme_treeview")),
- (GCallback) window_theme_selection_changed,
- dialog);
- setup_tree_view (GTK_TREE_VIEW (WID ("icon_theme_treeview")),
- (GCallback) icon_theme_selection_changed,
- dialog);
-
- /* gtk themes */
- widget = WID ("control_manage_button");
- g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (gnome_theme_manager_show_manage_themes), dialog);
-
- /* window manager themes */
- widget = WID ("window_manage_button");
- g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (gnome_theme_manager_window_show_manage_themes), dialog);
-
- /* icon themes */
- widget = WID ("icon_manage_button");
- g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (gnome_theme_manager_icon_show_manage_themes), dialog);
-
-
- g_signal_connect (G_OBJECT (parent), "response", G_CALLBACK (cb_dialog_response), NULL);
- g_signal_connect (G_OBJECT (parent), "delete-event", G_CALLBACK (gtk_true), NULL);
-
- gtk_drag_dest_set (parent, GTK_DEST_DEFAULT_ALL,
- drop_types, n_drop_types,
- GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_MOVE);
- g_signal_connect (G_OBJECT (parent), "drag-motion", G_CALLBACK (gnome_theme_manager_drag_motion_cb), NULL);
- g_signal_connect (G_OBJECT (parent), "drag-leave", G_CALLBACK (gnome_theme_manager_drag_leave_cb), NULL);
- g_signal_connect (G_OBJECT (parent), "drag-data-received", G_CALLBACK (gnome_theme_manager_drag_data_received_cb), NULL);
-
- capplet_set_icon (parent, "gnome-settings-theme");
-
- gnome_theme_details_reread_themes_from_disk ();
-}
-
-void
-gnome_theme_details_show (void)
-{
- GladeXML *dialog;
- GtkWidget *parent;
-
- gnome_theme_details_init ();
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- parent = WID ("theme_details_dialog");
- gtk_widget_show (parent);
- gtk_window_present (GTK_WINDOW (parent));
-}
-
-static void
-warn_about_no_themes (void)
-{
- static GtkWidget *dialog;
-
- if (dialog == NULL)
- {
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("No themes could be found on your system. This probably means that your \"Theme Preferences\" dialog was improperly installed, or you haven't installed the \"gnome-themes\" package."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- exit (0);
- }
-}
-
-void
-gnome_theme_details_reread_themes_from_disk (void)
-{
- GladeXML *dialog;
- GList *theme_list;
- GList *string_list;
- GList *list;
- GnomeWindowManager *window_manager;
- GtkWidget *notebook;
-
- gboolean have_gtk_theme;
- gboolean have_window_theme;
- gboolean have_icon_theme;
-
-
- gnome_theme_details_init ();
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- notebook = WID ("theme_notebook");
-
- /* First, we update the GTK+ themes page */
- theme_list = gnome_theme_info_find_by_type (GNOME_THEME_GTK_2);
- string_list = NULL;
- for (list = theme_list; list; list = list->next)
- {
- GnomeThemeInfo *info = list->data;
- /* Use same string for ID as for name with GTK themes */
- string_list = g_list_prepend (string_list, info->name);
- string_list = g_list_prepend (string_list, info->name);
- }
-
- if (string_list == NULL)
- {
- have_gtk_theme = FALSE;
- gtk_widget_hide (WID ("control_theme_vbox"));
- }
- else
- {
- have_gtk_theme = TRUE;
- gtk_widget_show (WID ("control_theme_vbox"));
- load_theme_names (GTK_TREE_VIEW (WID ("control_theme_treeview")), string_list, gtk_theme_default_name);
- g_list_free (string_list);
- }
- g_list_free (theme_list);
-
- /* Next, we do the window managers */
- theme_list = window_manager ? gnome_window_manager_get_theme_list (window_manager) : NULL;
- string_list = NULL;
- for (list = theme_list; list; list = list->next)
- {
- /* Use same string for ID as for name with Window themes */
- string_list = g_list_prepend (string_list, list->data);
- string_list = g_list_prepend (string_list, list->data);
- }
- if (string_list == NULL)
- {
- have_window_theme = FALSE;
- gtk_widget_hide (WID ("window_theme_vbox"));
- }
- else
- {
- have_window_theme = TRUE;
- gtk_widget_show (WID ("window_theme_vbox"));
- load_theme_names (GTK_TREE_VIEW (WID ("window_theme_treeview")), string_list, window_theme_default_name);
- g_list_free (string_list);
- }
- g_list_free (theme_list);
-
- /* Third, we do the icon theme */
- theme_list = gnome_theme_icon_info_find_all ();
- string_list = NULL;
-
- for (list = theme_list; list; list = list->next)
- {
- GnomeThemeIconInfo *info = list->data;
- string_list = g_list_prepend (string_list, path_to_theme_id(info->path));
- string_list = g_list_prepend (string_list, info->name);
- }
-
- if (string_list == NULL)
- {
- have_icon_theme = FALSE;
- gtk_widget_hide (WID ("icon_theme_vbox"));
- }
- else
- {
- have_icon_theme = TRUE;
- gtk_widget_show (WID ("icon_theme_vbox"));
- load_theme_names (GTK_TREE_VIEW (WID ("icon_theme_treeview")), string_list, icon_theme_default_name);
- g_list_free (string_list);
- }
- g_list_free (theme_list);
-
- if (! have_gtk_theme && ! have_window_theme && ! have_icon_theme)
- warn_about_no_themes ();
-
- gnome_theme_details_update_from_gconf ();
-
-}
-
-static void
-update_list_something (GtkWidget *tree_view, const gchar *theme)
-{
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkTreeIter next_iter;
- gboolean valid;
- gboolean theme_found;
-
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
- g_assert (model);
-
- valid = gtk_tree_model_get_iter_first (model, &iter);
- theme_found = FALSE;
-
- while (valid)
- {
- gchar *theme_id;
- guint flags = 0;
-
- next_iter = iter;
- valid = gtk_tree_model_iter_next (model, &next_iter);
-
- gtk_tree_model_get (model, &iter,
- THEME_ID_COLUMN, &theme_id,
- THEME_FLAG_COLUMN, &flags,
- -1);
-
- if (! strcmp (theme, theme_id))
- {
- GtkTreePath *path;
- GtkTreePath *cursor_path;
- gboolean cursor_same = FALSE;
-
- gtk_tree_view_get_cursor (GTK_TREE_VIEW (tree_view), &cursor_path, NULL);
- path = gtk_tree_model_get_path (model, &iter);
- if (cursor_path && gtk_tree_path_compare (path, cursor_path) == 0)
- cursor_same = TRUE;
-
- gtk_tree_path_free (cursor_path);
-
- if (!cursor_same)
- {
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
- }
- gtk_tree_path_free (path);
- theme_found = TRUE;
- }
- else
- {
- if (flags & THEME_FLAG_CUSTOM)
- {
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- }
- }
- g_free (theme_id);
- iter = next_iter;
- if (theme_found)
- break;
- }
-
- if (theme_found == FALSE)
- /* Never found the theme. */
- {
- GtkTreePath *path;
-
- gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- THEME_NAME_COLUMN, theme,
- THEME_ID_COLUMN, theme,
- THEME_FLAG_COLUMN, THEME_FLAG_CUSTOM,
- -1);
- path = gtk_tree_model_get_path (model, &iter);
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
- gtk_tree_path_free (path);
- }
-}
-
-void
-gnome_theme_details_update_from_gconf (void)
-{
- GConfClient *client;
- GladeXML *dialog;
- GtkWidget *tree_view;
- gchar *theme;
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
-
- gnome_theme_details_init ();
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
-
- client = gconf_client_get_default ();
- dialog = gnome_theme_manager_get_theme_dialog ();
-
- /* FIXME: What do we really do when there is no theme? Ask Havoc here. */
- tree_view = WID ("control_theme_treeview");
- theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
- update_list_something (tree_view, theme);
- g_free (theme);
-
- tree_view = WID ("window_theme_treeview");
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- if (window_manager) {
- gnome_window_manager_get_settings (window_manager, &wm_settings);
- update_list_something (tree_view, wm_settings.theme);
- }
-
- tree_view = WID ("icon_theme_treeview");
- theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
- update_list_something (tree_view, theme);
- g_object_unref (client);
- g_free (theme);
-}
diff --git a/capplets/theme-switcher/gnome-theme-details.h b/capplets/theme-switcher/gnome-theme-details.h
deleted file mode 100644
index 84369df0b..000000000
--- a/capplets/theme-switcher/gnome-theme-details.h
+++ /dev/null
@@ -1,9 +0,0 @@
-#ifndef __GNOME_THEME_DETAILS_H__
-#define __GNOME_THEME_DETAILS_H__
-
-void gnome_theme_details_init (void);
-void gnome_theme_details_show (void);
-void gnome_theme_details_reread_themes_from_disk (void);
-void gnome_theme_details_update_from_gconf (void);
-
-#endif /* __GNOME_THEME_DETAILS_H__ */
diff --git a/capplets/theme-switcher/gnome-theme-installer.c b/capplets/theme-switcher/gnome-theme-installer.c
deleted file mode 100644
index cb7899951..000000000
--- a/capplets/theme-switcher/gnome-theme-installer.c
+++ /dev/null
@@ -1,631 +0,0 @@
-
-#include <config.h>
-
-#include <string.h>
-#include <libwindow-settings/gnome-wm-manager.h>
-#include "gnome-theme-installer.h"
-#include "gnome-theme-details.h"
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-async-ops.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-
-#include "gnome-theme-info.h"
-#include "capplet-util.h"
-#include "activate-settings-daemon.h"
-#include "gconf-property-editor.h"
-#include "file-transfer-dialog.h"
-#include "gnome-theme-installer.h"
-
-enum {
- THEME_INVALID,
- THEME_ICON,
- THEME_GNOME,
- THEME_GTK,
- THEME_ENGINE,
- THEME_METACITY
-};
-
-enum {
- TARGZ,
- TARBZ
-};
-
-typedef struct {
- gint theme_type;
- gint filetype;
- gchar *filename;
- gchar *target_dir;
- gchar *theme_tmp_dir;
- gchar *target_tmp_dir;
- gchar *user_message;
-} theme_properties;
-
-
-static void
-cleanup_tmp_dir(theme_properties *theme_props)
-{
- GList *list;
-
- if (gnome_vfs_remove_directory (theme_props->target_tmp_dir) == GNOME_VFS_ERROR_DIRECTORY_NOT_EMPTY) {
- list = g_list_prepend (NULL, gnome_vfs_uri_new (theme_props->target_tmp_dir));
- gnome_vfs_xfer_delete_list (list, GNOME_VFS_XFER_RECURSIVE,
- GNOME_VFS_XFER_ERROR_MODE_ABORT, NULL, NULL);
- gnome_vfs_uri_list_free(list);
- }
-}
-
-static int
-file_theme_type(gchar *dir)
-{
- gchar *file_contents;
- gchar *filename = NULL;
- gint file_size;
- GPatternSpec *pattern;
- char *uri;
- GnomeVFSURI *src_uri;
-
- filename = g_strdup_printf ("%s/index.theme",dir);
- src_uri = gnome_vfs_uri_new (filename);
- if (gnome_vfs_uri_exists(src_uri)) {
- uri = gnome_vfs_get_uri_from_local_path (filename);
- gnome_vfs_read_entire_file (uri,&file_size,&file_contents);
-
- pattern = g_pattern_spec_new ("*[Icon Theme]*");
- if (g_pattern_match_string(pattern,file_contents)) {
- g_free (filename);
- gnome_vfs_uri_unref (src_uri);
- return THEME_ICON;
- }
-
- pattern = g_pattern_spec_new ("*[X-GNOME-Metatheme]*");
- if (g_pattern_match_string(pattern,file_contents)) {
- g_free (filename);
- gnome_vfs_uri_unref (src_uri);
- return THEME_GNOME;
- }
- }
- g_free (filename);
- gnome_vfs_uri_unref (src_uri);
-
- filename = g_strdup_printf ("%s/gtk-2.0/gtkrc",dir);
- src_uri = gnome_vfs_uri_new (filename);
- g_free (filename);
- if (gnome_vfs_uri_exists(src_uri)) {
- gnome_vfs_uri_unref (src_uri);
- return THEME_GTK;
- }
-
- filename = g_strdup_printf ("%s/metacity-1/metacity-theme-1.xml",dir);
- src_uri = gnome_vfs_uri_new (filename);
- g_free (filename);
- if (gnome_vfs_uri_exists (src_uri)) {
- gnome_vfs_uri_unref (src_uri);
- return THEME_METACITY;
- }
-
-
- filename = g_strdup_printf ("%s/configure.in",dir);
- src_uri = gnome_vfs_uri_new (filename);
- g_free (filename);
- if (gnome_vfs_uri_exists (src_uri)) {
- gnome_vfs_uri_unref (src_uri);
- return THEME_ENGINE;
- }
-
- return THEME_INVALID;
-}
-
-static void
-transfer_cancel_cb (GtkWidget *dlg, gchar *path)
-{
- gnome_vfs_unlink (path);
- g_free (path);
- gtk_widget_destroy (dlg);
-}
-
-/* this works around problems when doing fork/exec in a threaded app
- * with some locks being held/waited on in different threads.
- *
- * we do the idle callback so that the async xfer has finished and
- * cleaned up its vfs job. otherwise it seems the slave thread gets
- * woken up and it removes itself from the job queue before it is
- * supposed to. very strange.
- *
- * see bugzilla.gnome.org #86141 for details
- */
-static gboolean
-transfer_done_targz_idle_cb (gpointer data)
-{
- int status;
- gchar *command, *filename;
- theme_properties *theme_props = data;
-
- /* this should be something more clever and nonblocking */
- filename = g_shell_quote(theme_props->filename);
- command = g_strdup_printf ("sh -c 'cd \"%s\"; /bin/gzip -d -c < \"%s\" | /bin/tar xf - '",
- theme_props->target_tmp_dir, filename);
- g_free(filename);
- if (g_spawn_command_line_sync (command, NULL, NULL, &status, NULL) && status == 0) {
- g_free (command);
- return TRUE;
- } else {
- g_free (command);
- return FALSE;
- }
-}
-
-
-/* this works around problems when doing fork/exec in a threaded app
- * with some locks being held/waited on in different threads.
- *
- * we do the idle callback so that the async xfer has finished and
- * cleaned up its vfs job. otherwise it seems the slave thread gets
- * woken up and it removes itself from the job queue before it is
- * supposed to. very strange.
- *
- * see bugzilla.gnome.org #86141 for details
- */
-static gboolean
-transfer_done_tarbz2_idle_cb (gpointer data)
-{
- int status;
- gchar *command, *filename;
- theme_properties *theme_props = data;
-
- filename = g_shell_quote(theme_props->filename);
- /* this should be something more clever and nonblocking */
- command = g_strdup_printf ("sh -c 'cd \"%s\"; /usr/bin/bzip2 -d -c < \"%s\" | /bin/tar xf - '",
- theme_props->target_tmp_dir, filename);
- g_free (filename);
- if (g_spawn_command_line_sync (command, NULL, NULL, &status, NULL) && status == 0) {
- g_free (command);
- return TRUE;
- } else {
- g_free (command);
- return FALSE;
- }
-}
-
-static void
-transfer_done_cb (GtkWidget *dlg, gchar *path)
-{
- GtkWidget *dialog;
- int len = strlen (path);
- gchar *command,**dir, *first_line, *filename;
- int status,theme_type;
- theme_properties *theme_props;
- GnomeVFSURI *theme_source_dir, *theme_dest_dir;
-
- gtk_widget_destroy (dlg);
-
- theme_props = g_new(theme_properties,1);
-
- theme_props->target_tmp_dir = g_strdup_printf ("%s/.themes/.theme-%u",
- g_get_home_dir(),
- g_random_int());
-
-
- if (path && len > 7 && ( (!strcmp (path + len - 7, ".tar.gz")) || (!strcmp (path + len - 4, ".tgz")) )) {
- filename = g_shell_quote (path);
- command = g_strdup_printf ("sh -c '/bin/gzip -d -c < \"%s\" | /bin/tar ft - | head -1'",
- filename);
- theme_props->filetype=TARGZ;
- g_free (filename);
- } else if (path && len > 8 && !strcmp (path + len - 8, ".tar.bz2")) {
- filename = g_shell_quote (path);
- command = g_strdup_printf ("sh -c '/usr/bin/bzip2 -d -c < \"%s\" | /bin/tar ft - | head -1'",
- filename);
- theme_props->filetype=TARBZ;
- g_free (filename);
- } else {
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("This theme is not in a supported format."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- gnome_vfs_unlink(path);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props);
- return;
- }
-
-
- if ((gnome_vfs_make_directory(theme_props->target_tmp_dir,0700)) != GNOME_VFS_OK) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Failed to create temporary directory"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (command);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props);
- return;
- }
-
- /* Uncompress the file in the temp directory */
- theme_props->filename=g_strdup(path);
-
- if (theme_props->filetype == TARBZ ) {
- if (!g_file_test ("/usr/bin/bzip2", G_FILE_TEST_EXISTS)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Can not install theme. \nThe bzip2 utility is not installed."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- gnome_vfs_unlink(path);
- g_free (command);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props);
- return;
- }
-
- if (!transfer_done_tarbz2_idle_cb(theme_props)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Installation Failed"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- cleanup_tmp_dir (theme_props);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props);
- g_free (command);
- return;
- }
- }
-
- if (theme_props->filetype == TARGZ ) {
- if (!g_file_test ("/bin/gzip", G_FILE_TEST_EXISTS)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Can not install themes. \nThe gzip utility is not installed."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- gnome_vfs_unlink(path);
- g_free (command);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props);
- return;
- }
- if (!transfer_done_targz_idle_cb(theme_props)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Installation Failed"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- cleanup_tmp_dir (theme_props);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props);
- g_free (command);
- return;
- }
- }
-
- /* What type of theme it is ? */
- if (g_spawn_command_line_sync (command, &first_line, NULL, &status, NULL) && status == 0) {
- dir = g_strsplit(g_strchomp(first_line),"/",0);
- theme_props->theme_tmp_dir=g_build_filename(theme_props->target_tmp_dir,dir[0],NULL);
-
- theme_type = file_theme_type(theme_props->theme_tmp_dir);
- gnome_vfs_unlink (theme_props->filename);
- if (theme_type == THEME_ICON) {
- theme_props->target_dir=g_strdup_printf("%s/.icons/%s",g_get_home_dir(),dir[0]);
- theme_props->user_message=g_strdup_printf(_("Icon Theme %s correctly installed.\nYou can select it in the theme details."),dir[0]);
- } else if (theme_type == THEME_GNOME) {
- theme_props->target_dir = g_strdup_printf("%s/.themes/%s",g_get_home_dir(),dir[0]);
- theme_props->user_message=g_strdup_printf(_("Gnome Theme %s correctly installed"),dir[0]);
- } else if (theme_type == THEME_METACITY) {
- theme_props->target_dir = g_strdup_printf("%s/.themes/%s",g_get_home_dir(),dir[0]);
- theme_props->user_message=g_strdup_printf(_("Windows Border Theme %s correctly installed.\nYou can select it in the theme details."),dir[0]);
- } else if (theme_type == THEME_GTK) {
- theme_props->target_dir = g_strdup_printf("%s/.themes/%s",g_get_home_dir(),dir[0]);
- theme_props->user_message=g_strdup_printf(_("Controls Theme %s correctly installed.\nYou can select it in the theme details."),dir[0]);
- } else if (theme_type == THEME_ENGINE) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The theme is an engine. You need to compile the theme."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- cleanup_tmp_dir(theme_props);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props->theme_tmp_dir);
- g_free (theme_props);
- g_free (command);
- return;
- } else {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The file format is invalid"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props->theme_tmp_dir);
- g_free (theme_props);
- g_free (command);
- return;
- }
- /* Move the Dir to the target dir */
- theme_source_dir = gnome_vfs_uri_new (theme_props->theme_tmp_dir);
- theme_dest_dir = gnome_vfs_uri_new (theme_props->target_dir);
-
- if (gnome_vfs_xfer_uri (theme_source_dir,theme_dest_dir,
- GNOME_VFS_XFER_DELETE_ITEMS | GNOME_VFS_XFER_RECURSIVE | GNOME_VFS_XFER_REMOVESOURCE,
- GNOME_VFS_XFER_ERROR_MODE_ABORT,
- GNOME_VFS_XFER_OVERWRITE_MODE_REPLACE,
- NULL,NULL) != GNOME_VFS_OK) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Installation Failed"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- cleanup_tmp_dir(theme_props);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props->theme_tmp_dir);
- g_free (theme_props->target_dir);
- g_free (theme_props->user_message);
- g_free (theme_props);
- g_free (command);
- return;
- } else {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_INFO,
- GTK_BUTTONS_OK,
- theme_props->user_message );
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- cleanup_tmp_dir (theme_props);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props->theme_tmp_dir);
- g_free (theme_props->target_dir);
- g_free (theme_props->user_message);
- g_free (theme_props);
- g_free (command);
- return;
- }
-
- }
- g_free (command);
- g_free (theme_props->target_tmp_dir);
- g_free (theme_props->filename);
- g_free (theme_props);
-}
-
-static void
-install_dialog_response (GtkWidget *widget, int response_id, gpointer data)
-{
- GladeXML *dialog = data;
- GtkWidget *dlg;
- gchar *filename, *path, *base;
- GList *src, *target;
- GnomeVFSURI *src_uri;
- const gchar *raw;
- gboolean icon_theme;
- gchar *temppath;
-
- if (response_id == GTK_RESPONSE_HELP) {
- capplet_help (GTK_WINDOW (widget),
- "user-guide.xml",
- "goscustdesk-12");
- return;
- }
-
- if (response_id == 0) {
- icon_theme = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget), "icon_theme"));
- raw = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry (GNOME_FILE_ENTRY (WID ("install_theme_picker")))));
- if (raw == NULL || strlen (raw) <= 0) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("No theme file location specified to install"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- return;
- }
-
- if (strncmp (raw, "http://", 7) && strncmp (raw, "ftp://", 6) && *raw != '/')
- filename = gnome_file_entry_get_full_path (GNOME_FILE_ENTRY (WID ("install_theme_picker")), TRUE);
- else
- filename = g_strdup (raw);
- if (filename == NULL) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The theme file location specified to install is invalid"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- return;
- }
-
- src_uri = gnome_vfs_uri_new (filename);
- base = gnome_vfs_uri_extract_short_name (src_uri);
- src = g_list_append (NULL, src_uri);
- if (icon_theme)
- path = g_build_filename (g_get_home_dir (), ".icons", NULL);
- else
- path = g_build_filename (g_get_home_dir (), ".themes", NULL);
-
- if (access (path, X_OK | W_OK) != 0) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Insufficient permissions to install the theme in:\n%s"), path);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (path);
- return;
- }
-
- while(TRUE) {
- gchar *file_tmp;
- GtkWidget *dialog;
- int len = strlen (base);
-
- if (base && len > 7 && ( (!strcmp (base + len - 7, ".tar.gz")) || (!strcmp (base + len - 4, ".tgz")) ))
- file_tmp = g_strdup_printf("gnome-theme-%d.tar.gz", rand ());
- else if (base && len > 8 && !strcmp (base + len - 8, ".tar.bz2"))
- file_tmp = g_strdup_printf("gnome-theme-%d.tar.bz2", rand ());
- else {
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The file format is invalid."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- g_free (path);
- return;
- }
-
- path = g_build_filename (g_get_home_dir (), ".themes", file_tmp, NULL);
-
- g_free(file_tmp);
- if (!gnome_vfs_uri_exists (gnome_vfs_uri_new (path)))
- break;
- }
-
- /* To avoid the copy of /root/.themes to /root/.themes/.themes
- * which causes an infinite loop. The user asks to transfer the all
- * contents of a folder, to a folder under itseld. So ignore the
- * situation.
- */
- temppath = g_build_filename (filename, ".themes", NULL);
- if (!strcmp(temppath, path)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("%s is the path where the theme files will be installed. This can not be selected as the source location"), filename);
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
-
- g_free (base);
- g_free (filename);
- g_free(temppath);
- g_free (path);
- return;
- }
- g_free(temppath);
-
-
-
- target = g_list_append (NULL, gnome_vfs_uri_new (path));
-
- dlg = file_transfer_dialog_new ();
- file_transfer_dialog_wrap_async_xfer (FILE_TRANSFER_DIALOG (dlg),
- src, target,
- GNOME_VFS_XFER_RECURSIVE,
- GNOME_VFS_XFER_ERROR_MODE_QUERY,
- GNOME_VFS_XFER_OVERWRITE_MODE_QUERY,
- GNOME_VFS_PRIORITY_DEFAULT);
- gnome_vfs_uri_list_unref (src);
- gnome_vfs_uri_list_unref (target);
- g_free (base);
- g_free (filename);
- g_signal_connect (G_OBJECT (dlg), "cancel",
- G_CALLBACK (transfer_cancel_cb), path);
- g_signal_connect (G_OBJECT (dlg), "done",
- G_CALLBACK (transfer_done_cb), path);
- gtk_widget_show (dlg);
- }
-}
-
-void
-gnome_theme_installer_run (GtkWidget *parent, gchar *filename)
-{
- static gboolean running_theme_install = FALSE;
- GladeXML *dialog;
- GtkWidget *widget;
-
- if (running_theme_install)
- return;
-
- running_theme_install = TRUE;
-
- if (!g_file_test ("/bin/tar", G_FILE_TEST_EXISTS)) {
- GtkWidget *dialog;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("Cannot install theme.\nThe tar program is not installed on your system."));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- return;
- }
-
- dialog = glade_xml_new (GLADEDIR "/theme-install.glade", NULL, NULL);
- widget = WID ("install_dialog");
-
- g_signal_connect (G_OBJECT (widget), "response", G_CALLBACK (install_dialog_response), dialog);
- gtk_window_set_transient_for (GTK_WINDOW (widget), GTK_WINDOW (parent));
- gtk_window_set_position (GTK_WINDOW (widget), GTK_WIN_POS_CENTER_ON_PARENT);
- if (filename)
- gnome_file_entry_set_filename (GNOME_FILE_ENTRY (WID ("install_theme_picker")), filename);
-
- while (gtk_dialog_run (GTK_DIALOG (widget)) == GTK_RESPONSE_HELP)
- ;
-
- gnome_theme_details_reread_themes_from_disk();
-
- gtk_widget_destroy (widget);
- g_object_unref (G_OBJECT (dialog));
-
- running_theme_install = FALSE;
-}
diff --git a/capplets/theme-switcher/gnome-theme-installer.h b/capplets/theme-switcher/gnome-theme-installer.h
deleted file mode 100644
index b23ff2557..000000000
--- a/capplets/theme-switcher/gnome-theme-installer.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* gnome-theme-installer.h
- * Copyright (C) 2002 Jonathan Blandford
- *
- * Written by: Jonathan Blandford <jrb@gnome.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef GNOME_THEME_INSTALLER_H
-#define GNOME_THEME_INSTALLER_H
-
-#include <gtk/gtk.h>
-
-void gnome_theme_installer_run (GtkWidget *parent, gchar *filename);
-
-#endif /* GNOME_THEME_INSTALLER_H */
diff --git a/capplets/theme-switcher/gnome-theme-manager.c b/capplets/theme-switcher/gnome-theme-manager.c
deleted file mode 100644
index 5a747cfa1..000000000
--- a/capplets/theme-switcher/gnome-theme-manager.c
+++ /dev/null
@@ -1,1494 +0,0 @@
-/* This program was written under the GPL by Jonathan Blandford <jrb@gnome.org>
- */
-
-#include <config.h>
-
-#include <string.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-#include <libgnomevfs/gnome-vfs-async-ops.h>
-#include <libgnomevfs/gnome-vfs-ops.h>
-#include <libgnomevfs/gnome-vfs-utils.h>
-
-#include <libwindow-settings/gnome-wm-manager.h>
-
-#include "gnome-theme-info.h"
-#include "gnome-theme-save.h"
-#include "capplet-util.h"
-#include "activate-settings-daemon.h"
-#include "gconf-property-editor.h"
-#include "file-transfer-dialog.h"
-#include "gnome-theme-manager.h"
-#include "gnome-theme-details.h"
-#include "gnome-theme-installer.h"
-#include <theme-thumbnail.h>
-#include <gnome-theme-apply.h>
-
-
-#define MAX_ELEMENTS_BEFORE_SCROLLING 3
-
-/* Events: There are two types of change events we worry about. The first is
- * when the theme settings change. In this case, we can quickly update the UI
- * to reflect. The other is when the themes themselves change.
- *
- * The code in gnome-theme-manager.c will update the main dialog and proxy the
- * update notifications for the details dialog.
- */
-
-enum
-{
- META_THEME_NAME_COLUMN = THEME_NAME_COLUMN,
- META_THEME_ID_COLUMN = THEME_ID_COLUMN,
- META_THEME_FLAG_COLUMN = THEME_FLAG_COLUMN,
- META_THEME_PIXBUF_COLUMN,
- META_N_COLUMNS
-};
-
-GtkTargetEntry drop_types[] =
-{
- {"text/uri-list", 0, TARGET_URI_LIST},
- {"_NETSCAPE_URL", 0, TARGET_NS_URL}
-};
-
-gint n_drop_types = sizeof (drop_types) / sizeof (GtkTargetEntry);
-
-static gboolean setting_model = FALSE;
-static guint update_settings_from_gconf_idle_id = 0;
-static guint theme_changed_idle_id = 0;
-static guint pixbuf_idle_id = 0;
-static gboolean loading_themes;
-static gboolean reload_themes;
-static gboolean initial_meta_theme_set = FALSE;
-static GdkPixbuf *default_image = NULL;
-static GdkPixbuf *broken_image = NULL;
-static gboolean themes_loaded = FALSE;
-static gboolean reverted = FALSE;
-
-static GnomeThemeMetaInfo custom_meta_theme_info;
-static GnomeThemeMetaInfo initial_meta_theme_info;
-
-const char *meta_theme_default_name = NULL;
-const char *gtk_theme_default_name = NULL;
-const char *window_theme_default_name = NULL;
-const char *icon_theme_default_name = NULL;
-
-
-/* Function Prototypes */
-static void add_pixbuf_idle (void);
-static void load_meta_themes (GtkTreeView *tree_view,
- GList *meta_theme_list);
-static void meta_theme_setup_info (GnomeThemeMetaInfo *meta_theme_info,
- GladeXML *dialog);
-static void meta_theme_selection_changed (GtkTreeSelection *selection,
- GladeXML *dialog);
-static void update_themes_from_disk (GladeXML *dialog);
-static void update_settings_from_gconf (void);
-static void gtk_theme_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-static void window_settings_changed (GnomeWindowManager *window_manager,
- GladeXML *dialog);
-static void icon_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-static void font_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data);
-static void theme_changed_func (gpointer uri,
- gpointer user_data);
-static void cb_dialog_response (GtkDialog *dialog,
- gint response_id);
-static void setup_meta_tree_view (GtkTreeView *tree_view,
- GCallback changed_callback,
- GladeXML *dialog);
-static void setup_dialog (GladeXML *dialog);
-
-
-typedef struct {
- gchar *theme_id;
- GtkTreeModel *model;
- gboolean cancelled;
-} PixbufAsyncData;
-
-static void
-pixbuf_async_func (GdkPixbuf *pixbuf,
- gpointer data)
-{
- PixbufAsyncData *pixbuf_async_data = data;
- gchar *theme_id;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid;
-
- theme_id = pixbuf_async_data->theme_id;
- model = pixbuf_async_data->model;
-
- for (valid = gtk_tree_model_get_iter_first (model, &iter);
- valid;
- valid = gtk_tree_model_iter_next (model, &iter))
- {
- gchar *test_theme_id;
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &test_theme_id,
- -1);
- if (theme_id && test_theme_id && !strcmp (theme_id, test_theme_id))
- {
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- META_THEME_PIXBUF_COLUMN, pixbuf ? pixbuf : broken_image,
- -1);
- g_free (test_theme_id);
- break;
- }
- g_free (test_theme_id);
- }
-
- add_pixbuf_idle ();
-}
-
-static void
-pixbuf_async_data_free (gpointer data)
-{
- PixbufAsyncData *pixbuf_async_data = data;
-
- g_object_unref (pixbuf_async_data->model);
- g_free (pixbuf_async_data->theme_id);
- g_free (pixbuf_async_data);
-}
-
-static gboolean
-pixbuf_idle_func (gpointer data)
-{
- GladeXML *dialog;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- gboolean valid;
-
- pixbuf_idle_id = 0;
-
- if (reload_themes) {
- GladeXML *dialog;
-
- reload_themes = FALSE;
- loading_themes = FALSE;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- update_themes_from_disk (dialog);
- return FALSE;
- }
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- tree_view = WID ("meta_theme_treeview");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- for (valid = gtk_tree_model_get_iter_first (model, &iter);
- valid;
- valid = gtk_tree_model_iter_next (model, &iter))
- {
- GdkPixbuf *pixbuf = NULL;
- gchar *theme_id = NULL;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_PIXBUF_COLUMN, &pixbuf,
- -1);
- if (pixbuf == default_image)
- {
- PixbufAsyncData *pixbuf_async_data;
- GnomeThemeMetaInfo *meta_theme_info;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &theme_id,
- -1);
- if (theme_id == NULL)
- {
- meta_theme_info = &custom_meta_theme_info;
- }
- else
- {
- meta_theme_info = gnome_theme_meta_info_find (theme_id);
- }
-
- /* We should always have a metatheme file */
- g_assert (meta_theme_info);
-
- pixbuf_async_data = g_new (PixbufAsyncData, 1);
- pixbuf_async_data->theme_id = theme_id;
- pixbuf_async_data->model = model;
- pixbuf_async_data->cancelled = FALSE;
- g_object_ref (model);
- generate_theme_thumbnail_async (meta_theme_info,
- pixbuf_async_func,
- pixbuf_async_data,
- pixbuf_async_data_free);
-
- return FALSE;
- }
- }
-
- /* If we're done loading all the main themes, lets initialize the details
- * dialog if it hasn't been done yet. If it has, then this call is harmless.
- */
- gnome_theme_details_init ();
- loading_themes = FALSE;
-
- if (reload_themes) {
- GladeXML *dialog;
-
- reload_themes = FALSE;
- loading_themes = FALSE;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- update_themes_from_disk (dialog);
- }
-
- return FALSE;
-}
-
-/* FIXME: we need a way to cancel the pixbuf loading if we get a theme updating
- * during the pixbuf generation.
- */
-static void
-add_pixbuf_idle (void)
-{
- if (pixbuf_idle_id)
- return;
-
- pixbuf_idle_id = g_idle_add_full (G_PRIORITY_LOW,
- pixbuf_idle_func,
- NULL, NULL);
-}
-
-static gint
-sort_meta_theme_list_func (gconstpointer a,
- gconstpointer b)
-{
- const GnomeThemeMetaInfo *a_meta_theme_info = a;
- const GnomeThemeMetaInfo *b_meta_theme_info = b;
- guint a_flag = 0;
- guint b_flag = 0;
-
- g_assert (a_meta_theme_info->name);
- g_assert (b_meta_theme_info->name);
-
- if (meta_theme_default_name && strcmp (meta_theme_default_name, a_meta_theme_info->name) == 0)
- a_flag |= THEME_FLAG_DEFAULT;
- if (meta_theme_default_name && strcmp (meta_theme_default_name, b_meta_theme_info->name) == 0)
- b_flag |= THEME_FLAG_DEFAULT;
-
- return gnome_theme_manager_sort_func (a_meta_theme_info->readable_name,
- b_meta_theme_info->readable_name,
- a_flag,
- b_flag);
-}
-
-
-/* Loads up a list of GnomeThemeMetaInfo.
- */
-static void
-load_meta_themes (GtkTreeView *tree_view,
- GList *meta_theme_list)
-{
- GList *list;
- GtkTreeModel *model;
- GtkWidget *swindow;
- GtkTreeIter iter;
- gchar *name;
- gboolean valid;
- guint flag;
- gint i = 0;
- GConfClient *client;
- gchar *current_gtk_theme;
- gchar *current_window_theme;
- gchar *current_icon_theme;
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
- static gboolean first_time = TRUE;
-
- swindow = GTK_WIDGET (tree_view)->parent;
- model = gtk_tree_view_get_model (tree_view);
- g_assert (model);
-
- setting_model = TRUE;
-
- client = gconf_client_get_default ();
-
- current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
- current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
- g_object_unref (client);
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- wm_settings.flags = GNOME_WM_SETTING_THEME;
-
- if (window_manager)
- {
- gnome_window_manager_get_settings (window_manager, &wm_settings);
- current_window_theme = g_strdup (wm_settings.theme);
- }
- else
- current_window_theme = g_strdup (window_theme_default_name);
-
- /* FIXME: What do we really do when there is no theme? */
- if (current_icon_theme == NULL)
- current_icon_theme = g_strdup (icon_theme_default_name);
- if (current_gtk_theme == NULL)
- current_gtk_theme = g_strdup (gtk_theme_default_name);
-
- /* handle first time */
- if (first_time)
- {
- for (list = meta_theme_list; list; list = list->next)
- {
- GnomeThemeMetaInfo *theme_info = list->data;
-
- if ((theme_info->gtk_theme_name && !strcmp (theme_info->gtk_theme_name, gtk_theme_default_name)) &&
- (theme_info->metacity_theme_name && !strcmp (theme_info->metacity_theme_name, window_theme_default_name)) &&
- (theme_info->icon_theme_name && !strcmp (theme_info->icon_theme_name, icon_theme_default_name)))
- {
- meta_theme_default_name = g_strdup (theme_info->name);
- break;
- }
- }
- }
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
- GTK_POLICY_NEVER, GTK_POLICY_NEVER);
- gtk_widget_set_usize (swindow, -1, -1);
-
- /* Sort meta_theme_list to be in the same order of the current data. This way
- * we can walk through them together. */
- meta_theme_list = g_list_sort (meta_theme_list, sort_meta_theme_list_func);
- list = meta_theme_list;
- valid = gtk_tree_model_get_iter_first (model, &iter);
-
- while (valid || list != NULL)
- {
- GnomeThemeMetaInfo *list_meta_theme_info = NULL;
- GnomeThemeMetaInfo *model_meta_theme_info = NULL;
- gchar *blurb;
- gboolean list_is_default = FALSE;
- GdkPixbuf *pixbuf = NULL;
- gboolean delete_it = FALSE;
- gboolean set_it = FALSE;
- GtkTreeIter iter_to_set;
-
- /* Check info on the list */
- if (list)
- {
- list_meta_theme_info = list->data;
- if (meta_theme_default_name && strcmp (meta_theme_default_name, list_meta_theme_info->name) == 0)
- list_is_default = TRUE;
- else
- list_is_default = FALSE;
- }
-
- if (valid)
- {
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &name,
- META_THEME_FLAG_COLUMN, &flag,
- -1);
- if (name)
- {
- model_meta_theme_info = gnome_theme_meta_info_find (name);
- g_free (name);
-
- /* The theme was removed, and we haven't removed it from the list yet. */
- if (model_meta_theme_info == NULL)
- {
- delete_it = TRUE;
- goto end_of_loop;
- }
- }
- }
-
- /* start comparing values */
- if (list && valid)
- {
- gint compare_val;
-
- if (flag & THEME_FLAG_CUSTOM)
- {
- /* We can always skip the custom row, as it's never in the list */
- valid = gtk_tree_model_iter_next (model, &iter);
- i++;
- goto end_of_loop;
- }
-
- compare_val = gnome_theme_manager_sort_func (model_meta_theme_info->readable_name, list_meta_theme_info->readable_name,
- flag, list_is_default ? THEME_FLAG_DEFAULT : 0);
-
- if (compare_val < 0)
- {
- delete_it = TRUE;
- goto end_of_loop;
- }
- else if (compare_val == 0)
- {
- set_it = TRUE;
- iter_to_set = iter;
- valid = gtk_tree_model_iter_next (model, &iter);
- }
- else
- {
- /* we insert a new item */
- set_it = TRUE;
- gtk_list_store_insert_before (GTK_LIST_STORE (model), &iter_to_set, &iter);
- }
- }
- else if (list)
- {
- /* we append a new item */
- set_it = TRUE;
- gtk_list_store_append (GTK_LIST_STORE (model), &iter_to_set);
- }
- else if (valid)
- {
- /* It's a dead item. */
- delete_it = TRUE;
- }
-
- end_of_loop:
- if (delete_it)
- {
- GtkTreeIter iter_to_remove;
- iter_to_remove = iter;
- valid = gtk_tree_model_iter_next (model, &iter);
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter_to_remove);
- }
- if (set_it)
- {
- /* We reset the blurb in case it has changed */
- blurb = g_markup_printf_escaped ("<span size=\"larger\" weight=\"bold\">%s</span>\n%s",
- list_meta_theme_info->readable_name, list_meta_theme_info->comment);
-
- if (i <= MAX_ELEMENTS_BEFORE_SCROLLING) {
- pixbuf = generate_theme_thumbnail (list_meta_theme_info, FALSE);
- if (pixbuf == NULL)
- pixbuf = broken_image;
- } else {
- pixbuf = default_image;
- }
-
- gtk_list_store_set (GTK_LIST_STORE (model), &iter_to_set,
- META_THEME_PIXBUF_COLUMN, pixbuf,
- META_THEME_NAME_COLUMN, blurb,
- META_THEME_ID_COLUMN, list_meta_theme_info->name,
- META_THEME_FLAG_COLUMN, list_is_default ? THEME_FLAG_DEFAULT : 0,
- -1);
- g_free (blurb);
-
- list = list->next;
- i++;
- }
- if (i == MAX_ELEMENTS_BEFORE_SCROLLING)
- {
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (swindow),
- GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
- }
- }
-
- add_pixbuf_idle ();
-
- g_free (current_gtk_theme);
- g_free (current_icon_theme);
- g_free (current_window_theme);
- first_time = FALSE;
- setting_model = FALSE;
-}
-
-static void
-meta_theme_setup_info (GnomeThemeMetaInfo *meta_theme_info,
- GladeXML *dialog)
-{
- GtkWidget *notebook;
-
- notebook = WID ("meta_theme_notebook");
-
- if (meta_theme_info == NULL)
- {
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
- }
- else
- {
- if (meta_theme_info->application_font != NULL)
- {
- if (meta_theme_info->background_image != NULL)
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 3);
- else
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 1);
- }
- else
- {
- if (meta_theme_info->background_image != NULL)
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 2);
- else
- gtk_notebook_set_current_page (GTK_NOTEBOOK (notebook), 0);
- }
- }
-}
-
-static void
-meta_theme_selection_changed (GtkTreeSelection *selection,
- GladeXML *dialog)
-{
- GnomeThemeMetaInfo *meta_theme_info;
- GtkTreeIter iter;
- gchar *meta_theme_name;
- GtkTreeModel *model;
- gchar *current_gtk_theme;
- gchar *current_window_theme;
- gchar *current_icon_theme;
- GConfClient *client;
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- {
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &meta_theme_name,
- -1);
- }
- else
- {
- /* I probably just added a row. */
- return;
- }
-
- if (meta_theme_name)
- {
- meta_theme_info = gnome_theme_meta_info_find (meta_theme_name);
- g_free (meta_theme_name);
- }
- else
- {
- meta_theme_info = &custom_meta_theme_info;
- }
- meta_theme_setup_info (meta_theme_info, dialog);
-
- if (setting_model)
- return;
-
- if (meta_theme_info)
- gnome_meta_theme_set (meta_theme_info);
-
- if (!themes_loaded) {
- client = gconf_client_get_default ();
-
- /* Get the settings */
- current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
- current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
- g_object_unref (client);
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- if (window_manager) {
- gnome_window_manager_get_settings (window_manager, &wm_settings);
- current_window_theme = g_strdup (wm_settings.theme);
- } else
- current_window_theme = g_strdup ("");
-
- initial_meta_theme_info.name = g_strdup ("__Initial Theme__");
- initial_meta_theme_info.gtk_theme_name = g_strdup (current_gtk_theme);
- initial_meta_theme_info.metacity_theme_name = g_strdup (current_window_theme);
- initial_meta_theme_info.icon_theme_name = g_strdup (current_icon_theme);
- themes_loaded = TRUE;
- } else {
- if (!reverted) {
- gtk_widget_set_sensitive(WID("meta_theme_revert_button"),TRUE);
- } else {
- reverted = FALSE;
- }
- }
-}
-
-/* This function will adjust the list to reflect the current theme
- * situation. It is called after the themes change on disk. Currently, it
- * recreates the entire list.
- */
-static void
-update_themes_from_disk (GladeXML *dialog)
-{
- GList *theme_list;
-
- if (loading_themes) {
- reload_themes = TRUE;
- return;
- }
-
- loading_themes = TRUE;
-
- theme_list = gnome_theme_meta_info_find_all ();
- gtk_widget_show (WID ("meta_theme_hbox"));
- load_meta_themes (GTK_TREE_VIEW (WID ("meta_theme_treeview")), theme_list);
- g_list_free (theme_list);
-
- update_settings_from_gconf ();
-}
-
-static void
-add_custom_row_to_meta_theme (const gchar *current_gtk_theme,
- const gchar *current_window_theme,
- const gchar *current_icon_theme,
- gboolean select)
-{
- GladeXML *dialog;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreePath *path;
- GtkTreeIter iter;
- gboolean valid;
- gchar *blurb;
- GdkPixbuf *pixbuf;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- tree_view = WID ("meta_theme_treeview");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- g_free (custom_meta_theme_info.gtk_theme_name);
- custom_meta_theme_info.gtk_theme_name = g_strdup (current_gtk_theme);
- g_free (custom_meta_theme_info.metacity_theme_name);
- custom_meta_theme_info.metacity_theme_name = g_strdup (current_window_theme);
- g_free (custom_meta_theme_info.icon_theme_name);
- custom_meta_theme_info.icon_theme_name = g_strdup (current_icon_theme);
- g_free (custom_meta_theme_info.name);
- custom_meta_theme_info.name = g_strdup ("__Custom Theme__");
-
- for (valid = gtk_tree_model_get_iter_first (model, &iter);
- valid;
- valid = gtk_tree_model_iter_next (model, &iter))
- {
- guint theme_flags = 0;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_FLAG_COLUMN, &theme_flags,
- -1);
- if (theme_flags & THEME_FLAG_CUSTOM)
- break;
-
- }
-
- /* if we found a custom row and broke out of the list above, valid will be
- * TRUE. If we didn't, we need to add a new iter.
- */
- if (!valid)
- gtk_list_store_prepend (GTK_LIST_STORE (model), &iter);
-
- /* set the values of the Custom theme. */
- blurb = g_markup_printf_escaped ("<span size=\"larger\" weight=\"bold\">%s</span>\n%s",
- _("Custom theme"), _("You can save this theme by pressing the Save Theme button."));
-
- /* Invalidate the cache because the custom theme has potentially changed */
- /* Commented out because it does odd things */
- /*theme_thumbnail_invalidate_cache (&custom_meta_theme_info);*/
-
- pixbuf = generate_theme_thumbnail (&custom_meta_theme_info, TRUE);
- if (pixbuf == NULL)
- pixbuf = default_image;
- gtk_list_store_set (GTK_LIST_STORE (model), &iter,
- META_THEME_PIXBUF_COLUMN, pixbuf,
- META_THEME_NAME_COLUMN, blurb,
- META_THEME_FLAG_COLUMN, THEME_FLAG_CUSTOM,
- -1);
-
- gtk_widget_set_sensitive (WID ("meta_theme_save_button"), TRUE);
- path = gtk_tree_model_get_path (model, &iter);
- if (select)
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
- gtk_tree_path_free (path);
- g_free (blurb);
-}
-
-static void
-remove_custom_row_from_meta_theme (void)
-{
- GladeXML *dialog;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- GtkTreeIter next_iter;
- gboolean valid;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- tree_view = WID ("meta_theme_treeview");
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- valid = gtk_tree_model_get_iter_first (model, &iter);
- while (valid)
- {
- guint theme_flags = 0;
-
- next_iter = iter;
- valid = gtk_tree_model_iter_next (model, &next_iter);
-
- gtk_tree_model_get (model, &iter,
- META_THEME_FLAG_COLUMN, &theme_flags,
- -1);
-
- if (theme_flags & THEME_FLAG_CUSTOM)
- {
- gtk_list_store_remove (GTK_LIST_STORE (model), &iter);
- }
- iter = next_iter;
- }
- g_free (custom_meta_theme_info.gtk_theme_name);
- g_free (custom_meta_theme_info.metacity_theme_name);
- g_free (custom_meta_theme_info.icon_theme_name);
- g_free (custom_meta_theme_info.name);
-
- gtk_widget_set_sensitive (WID ("meta_theme_save_button"), FALSE);
-
- custom_meta_theme_info.gtk_theme_name = NULL;
- custom_meta_theme_info.metacity_theme_name = NULL;
- custom_meta_theme_info.icon_theme_name = NULL;
- custom_meta_theme_info.name = NULL;
-}
-
-gboolean
-themes_equal (GnomeThemeMetaInfo *a, GnomeThemeMetaInfo *b)
-{
- if (!a->gtk_theme_name ||
- !b->gtk_theme_name ||
- strcmp (a->gtk_theme_name, b->gtk_theme_name))
- return FALSE;
- if (!a->metacity_theme_name ||
- !b->metacity_theme_name ||
- strcmp (a->metacity_theme_name, b->metacity_theme_name))
- return FALSE;
- if (!a->icon_theme_name ||
- !b->icon_theme_name ||
- strcmp (a->icon_theme_name, b->icon_theme_name))
- return FALSE;
- return TRUE;
-}
-
-
-/* Sets the list to point to the current theme. Also creates the 'Custom Theme'
- * field if needed */
-static gboolean
-update_settings_from_gconf_idle (gpointer data)
-{
- GConfClient *client;
- gchar *current_gtk_theme;
- gchar *current_window_theme;
- gchar *current_icon_theme;
- GnomeWindowManager *window_manager;
- GnomeWMSettings wm_settings;
- GtkWidget *tree_view;
- GtkTreeModel *model;
- GtkTreeIter iter;
- GladeXML *dialog;
- gboolean valid;
- gboolean current_theme_saved;
- gboolean initial_theme_saved;
- static gboolean first_time_run = TRUE;
-
- client = gconf_client_get_default ();
-
- /* Get the settings */
- current_gtk_theme = gconf_client_get_string (client, GTK_THEME_KEY, NULL);
- current_icon_theme = gconf_client_get_string (client, ICON_THEME_KEY, NULL);
- g_object_unref (client);
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- if (window_manager) {
- gnome_window_manager_get_settings (window_manager, &wm_settings);
- current_window_theme = g_strdup (wm_settings.theme);
- } else
- current_window_theme = g_strdup ("");
-
- /* True if the current or initial theme has a meta theme that it matches. */
- current_theme_saved = FALSE;
- initial_theme_saved = FALSE;
-
- /* Walk the tree looking for the current one. */
- dialog = gnome_theme_manager_get_theme_dialog ();
- tree_view = WID ("meta_theme_treeview");
- g_assert (tree_view);
- model = gtk_tree_view_get_model (GTK_TREE_VIEW (tree_view));
-
- for (valid = gtk_tree_model_get_iter_first (model, &iter);
- valid;
- valid = gtk_tree_model_iter_next (model, &iter))
- {
- gchar *row_theme_id = NULL;
- guint row_theme_flags = 0;
- GnomeThemeMetaInfo *meta_theme_info;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &row_theme_id,
- META_THEME_FLAG_COLUMN, &row_theme_flags,
- -1);
-
- if (row_theme_id) {
- meta_theme_info = gnome_theme_meta_info_find (row_theme_id);
- }
- else {
- continue;
- }
- g_free (row_theme_id);
- if (row_theme_flags & THEME_FLAG_CUSTOM) {
- continue;
- }
-
- if (initial_meta_theme_set && themes_equal (&initial_meta_theme_info, meta_theme_info))
- initial_theme_saved = TRUE;
- if (! strcmp (current_gtk_theme, meta_theme_info->gtk_theme_name) &&
- (window_manager == NULL ||
- ! strcmp (current_window_theme, meta_theme_info->metacity_theme_name)) &&
- ! strcmp (current_icon_theme, meta_theme_info->icon_theme_name))
- {
- GtkTreePath *path;
- GtkTreePath *cursor_path;
- gboolean cursor_same = FALSE;
-
- gtk_tree_view_get_cursor (GTK_TREE_VIEW (tree_view), &cursor_path, NULL);
- path = gtk_tree_model_get_path (model, &iter);
- if (cursor_path && gtk_tree_path_compare (path, cursor_path) == 0)
- cursor_same = TRUE;
-
- gtk_tree_path_free (cursor_path);
-
- if (!cursor_same)
- {
- gtk_tree_view_set_cursor (GTK_TREE_VIEW (tree_view), path, NULL, FALSE);
- }
- gtk_tree_path_free (path);
- current_theme_saved = TRUE;
-
- break;
- }
- }
-
- if (!current_theme_saved && first_time_run)
- {
- initial_meta_theme_set = TRUE;
- initial_meta_theme_info.name = g_strdup ("__Initial Theme__");
- initial_meta_theme_info.gtk_theme_name = g_strdup (current_gtk_theme);
- initial_meta_theme_info.metacity_theme_name = g_strdup (current_window_theme);
- initial_meta_theme_info.icon_theme_name = g_strdup (current_icon_theme);
- }
- first_time_run = FALSE;
-
-
- if (!current_theme_saved)
- {
- add_custom_row_to_meta_theme (current_gtk_theme,
- current_window_theme,
- current_icon_theme,
- TRUE);
- }
- else if (initial_meta_theme_set && !initial_theme_saved)
- {
- add_custom_row_to_meta_theme (initial_meta_theme_info.gtk_theme_name,
- initial_meta_theme_info.metacity_theme_name,
- initial_meta_theme_info.icon_theme_name,
- FALSE);
- }
- else
- {
- remove_custom_row_from_meta_theme ();
- }
- g_free (current_gtk_theme);
- g_free (current_window_theme);
- g_free (current_icon_theme);
- update_settings_from_gconf_idle_id = 0;
- return FALSE;
-}
-
-void
-update_settings_from_gconf (void)
-{
- if (update_settings_from_gconf_idle_id != 0)
- return;
- update_settings_from_gconf_idle_id = g_idle_add_full (G_PRIORITY_DEFAULT_IDLE,
- update_settings_from_gconf_idle,
- NULL, NULL);
-}
-
-static void
-gtk_theme_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- if (strcmp (entry->key, GTK_THEME_KEY))
- return;
-
- update_settings_from_gconf ();
- gnome_theme_details_update_from_gconf ();
-}
-
-static void
-window_settings_changed (GnomeWindowManager *window_manager,
- GladeXML *dialog)
-{
- static gchar *window_theme = NULL;
- GnomeWMSettings wm_settings;
-
- wm_settings.flags = GNOME_WM_SETTING_THEME;
- gnome_window_manager_get_settings (window_manager, &wm_settings);
- if (window_theme == NULL || strcmp (wm_settings.theme, window_theme) != 0)
- {
- g_free (window_theme);
- window_theme = g_strdup (wm_settings.theme);
- }
- else
- return;
-
- update_settings_from_gconf ();
- gnome_theme_details_update_from_gconf ();
-}
-
-static void
-update_font_button_state (GladeXML *dialog)
-{
- GConfClient *client = gconf_client_get_default ();
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("meta_theme_treeview")));
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- {
- GnomeThemeMetaInfo *meta_theme_info;
- char *meta_theme_name, *str;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &meta_theme_name,
- -1);
- if (!meta_theme_name)
- return;
-
- meta_theme_info = gnome_theme_meta_info_find (meta_theme_name);
-
- g_assert (meta_theme_info);
- g_free (meta_theme_name);
-
- str = gconf_client_get_string (client, FONT_KEY, NULL);
-
- if (meta_theme_info->application_font != NULL && str != NULL &&
- strcmp (meta_theme_info->application_font, str) == 0)
- {
- gtk_widget_set_sensitive (WID ("meta_theme_font1_button"), FALSE);
- gtk_widget_set_sensitive (WID ("meta_theme_font2_button"), FALSE);
- }
- else
- {
- gtk_widget_set_sensitive (WID ("meta_theme_font1_button"), TRUE);
- gtk_widget_set_sensitive (WID ("meta_theme_font2_button"), TRUE);
- }
-
- g_free (str);
- }
- g_object_unref (client);
-}
-
-static void
-font_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- GladeXML *dialog = user_data;
-
- update_font_button_state (dialog);
-}
-
-static void
-icon_key_changed (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- gpointer user_data)
-{
- if (strcmp (entry->key, ICON_THEME_KEY))
- return;
-
- update_settings_from_gconf ();
- gnome_theme_details_update_from_gconf ();
-}
-
-static gboolean
-theme_changed_idle (gpointer data)
-{
- GladeXML *dialog;
- dialog = gnome_theme_manager_get_theme_dialog ();
-
- update_themes_from_disk (dialog);
- gnome_theme_details_reread_themes_from_disk ();
- gtk_widget_grab_focus (WID ("meta_theme_treeview"));
- theme_changed_idle_id = 0;
- return FALSE;
-}
-
-/* FIXME: We want a more sophisticated theme_changed func sometime */
-static void
-theme_changed_func (gpointer uri,
- gpointer user_data)
-{
- if (theme_changed_idle_id != 0)
- return;
- theme_changed_idle_id =
- g_idle_add_full (G_PRIORITY_HIGH_IDLE,
- theme_changed_idle,
- NULL, NULL);
-}
-
-static void
-cb_dialog_response (GtkDialog *dialog, gint response_id)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog), "user-guide.xml", "goscustdesk-12");
- else
- gtk_main_quit ();
-}
-
-static void
-setup_meta_tree_view (GtkTreeView *tree_view,
- GCallback changed_callback,
- GladeXML *dialog)
-{
- GtkTreeModel *model;
- GtkTreeSelection *selection;
- GtkCellRenderer *renderer;
-
- renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF,
- "xpad", 4,
- "ypad", 4,
- NULL);
-
- gtk_tree_view_insert_column_with_attributes (tree_view,
- -1, NULL,
- renderer,
- "pixbuf", META_THEME_PIXBUF_COLUMN,
- NULL);
- renderer = gtk_cell_renderer_text_new ();
- gtk_tree_view_insert_column_with_attributes (tree_view,
- -1, NULL,
- renderer,
- "markup", META_THEME_NAME_COLUMN,
- NULL);
-
- model = (GtkTreeModel *) gtk_list_store_new (META_N_COLUMNS,
- G_TYPE_STRING, /* META_THEME_NAME_COLUMN */
- G_TYPE_STRING, /* META_THEME_ID_COLUMN */
- G_TYPE_UINT, /* META_THEME_FLAG_COLUMN */
- GDK_TYPE_PIXBUF); /* META_THEME_PIXBUF_COLUMN */
- 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", changed_callback, dialog);
-}
-
-
-static void
-gnome_meta_theme_installer_run_cb (GtkWidget *button,
- GtkWidget *parent_window)
-{
- gnome_theme_installer_run (parent_window, NULL);
-}
-
-
-static void
-gnome_theme_save_clicked (GtkWidget *button,
- gpointer data)
-{
- GladeXML *dialog;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
-
- gnome_theme_save_show_dialog (WID ("theme_dialog"), &custom_meta_theme_info);
-}
-
-static void
-apply_font_clicked (GtkWidget *button,
- gpointer data)
-{
- GladeXML *dialog = data;
- GConfClient *client;
- GtkTreeSelection *selection;
- GtkTreeModel *model;
- GtkTreeIter iter;
-
- client = gconf_client_get_default ();
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (WID ("meta_theme_treeview")));
-
- if (gtk_tree_selection_get_selected (selection, &model, &iter))
- {
- GnomeThemeMetaInfo *meta_theme_info;
- char *meta_theme_name;
-
- gtk_tree_model_get (model, &iter,
- META_THEME_ID_COLUMN, &meta_theme_name,
- -1);
- meta_theme_info = gnome_theme_meta_info_find (meta_theme_name);
-
- g_assert (meta_theme_info);
- g_free (meta_theme_name);
-
- gconf_client_set_string (client, FONT_KEY, meta_theme_info->application_font, NULL);
- }
- g_object_unref (client);
-}
-
-static void
-revert_theme_clicked (GtkWidget *button,
- gpointer data)
-{
- GladeXML *dialog;
-
- gnome_meta_theme_set(&initial_meta_theme_info);
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- gtk_widget_set_sensitive(WID("meta_theme_revert_button"), FALSE);
- reverted = TRUE;
-}
-
-static void
-setup_dialog (GladeXML *dialog)
-{
- GConfClient *client;
- GtkWidget *parent, *widget;
- GnomeWindowManager *window_manager;
- GtkSizeGroup *size_group;
-
- default_image = gdk_pixbuf_new_from_file(GNOMECC_DATA_DIR "/pixmaps/theme-thumbnailing.png", NULL);
- broken_image = gdk_pixbuf_new_from_file(GNOMECC_DATA_DIR "/pixmaps/theme-thumbnailing.png", NULL);
-
- client = gconf_client_get_default ();
-
- window_manager = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
-
- parent = WID ("theme_dialog");
-
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, WID ("meta_theme_details_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_install_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_save_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_font1_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_background1_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_font2_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_background2_button"));
- gtk_size_group_add_widget (size_group, WID ("meta_theme_revert_button"));
- g_object_unref (size_group);
-
- gtk_widget_set_sensitive(WID("meta_theme_revert_button"),FALSE);
-
- g_signal_connect (G_OBJECT (WID ("meta_theme_install_button")), "clicked", G_CALLBACK (gnome_meta_theme_installer_run_cb), parent);
-
- g_signal_connect (G_OBJECT (WID ("meta_theme_details_button")), "clicked", gnome_theme_details_show, NULL);
-
- g_signal_connect (G_OBJECT (WID ("meta_theme_font1_button")), "clicked", G_CALLBACK (apply_font_clicked), dialog);
-
- g_signal_connect (G_OBJECT (WID ("meta_theme_revert_button")), "clicked", G_CALLBACK (revert_theme_clicked),NULL);
-
- setup_meta_tree_view (GTK_TREE_VIEW (WID ("meta_theme_treeview")),
- (GCallback) meta_theme_selection_changed,
- dialog);
-
- gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
-
- gconf_client_notify_add (client,
- GTK_THEME_KEY,
- (GConfClientNotifyFunc) &gtk_theme_key_changed,
- dialog, NULL, NULL);
- gconf_client_notify_add (client,
- ICON_THEME_KEY,
- (GConfClientNotifyFunc) &icon_key_changed,
- dialog, NULL, NULL);
-
- gconf_client_notify_add (client,
- FONT_KEY,
- (GConfClientNotifyFunc) &font_key_changed,
- dialog, NULL, NULL);
- g_object_unref (client);
-
- if (window_manager)
- g_signal_connect (G_OBJECT (window_manager),
- "settings_changed",
- (GCallback) window_settings_changed, dialog);
-
- update_themes_from_disk (dialog);
- gtk_widget_grab_focus (WID ("meta_theme_treeview"));
- gnome_theme_info_register_theme_change (theme_changed_func, dialog);
-
-
-
- widget = WID ("meta_theme_save_button");
- g_signal_connect (G_OBJECT (widget), "clicked", G_CALLBACK (gnome_theme_save_clicked), NULL);
-
-
-/*
- g_signal_connect (G_OBJECT (WID ("install_dialog")), "response",
- G_CALLBACK (install_dialog_response), dialog);
- */
-
- g_signal_connect (G_OBJECT (parent), "response", G_CALLBACK (cb_dialog_response), NULL);
-
- gtk_drag_dest_set (parent, GTK_DEST_DEFAULT_ALL,
- drop_types, n_drop_types,
- GDK_ACTION_COPY | GDK_ACTION_LINK | GDK_ACTION_MOVE);
- g_signal_connect (G_OBJECT (parent), "drag-motion", G_CALLBACK (gnome_theme_manager_drag_motion_cb), NULL);
- g_signal_connect (G_OBJECT (parent), "drag-leave", G_CALLBACK (gnome_theme_manager_drag_leave_cb), NULL);
- g_signal_connect (G_OBJECT (parent), "drag-data-received",G_CALLBACK (gnome_theme_manager_drag_data_received_cb), NULL);
-
- capplet_set_icon (parent, "gnome-settings-theme");
-
- update_font_button_state (dialog);
- gtk_widget_show (parent);
-
-}
-
-/* Non static functions */
-GladeXML *
-gnome_theme_manager_get_theme_dialog (void)
-{
- static GladeXML *dialog = NULL;
-
- if (dialog == NULL)
- dialog = glade_xml_new (GLADEDIR "/theme-properties.glade", NULL, NULL);
-
- return dialog;
-}
-
-gint
-gnome_theme_manager_sort_func (const gchar *a_str,
- const gchar *b_str,
- guint a_flag,
- guint b_flag)
-{
- gint retval;
- gint agreater = FALSE, bgreater = FALSE;
-
- if (a_flag & THEME_FLAG_CUSTOM)
- agreater = TRUE;
- if (b_flag & THEME_FLAG_CUSTOM)
- bgreater = TRUE;
-
- if (agreater && !bgreater)
- return -1;
- if (!agreater && bgreater)
- return 1;
-
- if (a_flag & THEME_FLAG_DEFAULT)
- agreater = TRUE;
- if (b_flag & THEME_FLAG_DEFAULT)
- bgreater = TRUE;
-
- if (agreater && !bgreater)
- return -1;
- if (!agreater && bgreater)
- return 1;
-
- retval = g_utf8_collate (a_str?a_str:"",
- b_str?b_str:"");
-
- return retval;
-}
-
-/* Starts nautilus on the themes directory*/
-void
-gnome_theme_manager_show_manage_themes (GtkWidget *button, gpointer data)
-{
- gchar *path, *command;
- GnomeVFSURI *uri;
-
- path = g_strdup_printf ("%s/.themes", g_get_home_dir ());
- 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);
-}
-
-/* Starts nautilus on the icon themes directory*/
-void
-gnome_theme_manager_icon_show_manage_themes (GtkWidget *button, gpointer data)
-{
- gchar *path, *command;
- GnomeVFSURI *uri;
-
- path = g_strdup_printf ("%s/.icons", g_get_home_dir ());
- 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);
-}
-
-/* Show the nautilus themes window */
-void
-gnome_theme_manager_window_show_manage_themes (GtkWidget *button, gpointer data)
-{
- gchar *path, *command;
- GnomeVFSURI *uri;
- GnomeWindowManager *wm;
-
- wm = gnome_wm_manager_get_current (gdk_display_get_default_screen (gdk_display_get_default ()));
-
- 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);
-}
-
-/* Callback issued during drag movements */
-gboolean
-gnome_theme_manager_drag_motion_cb (GtkWidget *widget, GdkDragContext *context,
- gint x, gint y, guint time, gpointer data)
-{
- return FALSE;
-}
-
-/* Callback issued during drag leaves */
-void
-gnome_theme_manager_drag_leave_cb (GtkWidget *widget, GdkDragContext *context,
- guint time, gpointer data)
-{
- gtk_widget_queue_draw (widget);
-}
-
-/* Callback issued on actual drops. Attempts to load the file dropped. */
-void
-gnome_theme_manager_drag_data_received_cb (GtkWidget *widget, GdkDragContext *context,
- gint x, gint y,
- GtkSelectionData *selection_data,
- guint info, guint time, gpointer data)
-{
- GList *uris;
- gchar *filename = NULL;
-
- if (!(info == TARGET_URI_LIST || info == TARGET_NS_URL))
- return;
-
- uris = gnome_vfs_uri_list_parse ((gchar *) selection_data->data);
- if (uris != NULL && uris->data != NULL) {
- GnomeVFSURI *uri = (GnomeVFSURI *) uris->data;
-
- if (gnome_vfs_uri_is_local (uri))
- filename = gnome_vfs_unescape_string (
- gnome_vfs_uri_get_path (uri),
- G_DIR_SEPARATOR_S);
- else
- filename = gnome_vfs_unescape_string (
- gnome_vfs_uri_to_string (uri, GNOME_VFS_URI_HIDE_NONE),
- G_DIR_SEPARATOR_S);
-
- gnome_vfs_uri_list_unref (uris);
- }
-
- gnome_theme_installer_run (widget, filename);
- g_free (filename);
-}
-
-
-static gchar *
-get_default_string_from_key (const char *key)
-{
- GConfClient *client;
- GConfValue *value;
- GError *error = NULL;
- gchar *str = NULL;
-
- client = gconf_client_get_default ();
- value = gconf_client_get_default_from_schema (client, key, &error);
- g_object_unref (client);
-
- if (error)
- {
- g_clear_error (&error);
- return NULL;
- }
-
- if (value)
- {
- if (value->type == GCONF_VALUE_STRING)
- str = gconf_value_to_string (value);
- gconf_value_free (value);
- }
-
- return str;
-}
-
-int
-main (int argc, char *argv[])
-{
- GladeXML *dialog;
-
- /* We need to do this before we initialize anything else */
- theme_thumbnail_factory_init (argc, argv);
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-theme-manager", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- gtk_theme_default_name = get_default_string_from_key (GTK_THEME_KEY);
- window_theme_default_name = get_default_string_from_key (METACITY_THEME_KEY);
- icon_theme_default_name = get_default_string_from_key (ICON_THEME_KEY);
-
- if (gtk_theme_default_name == NULL ||
- window_theme_default_name == NULL ||
- icon_theme_default_name == NULL)
- {
- GtkWidget *msg_dialog;
-
- msg_dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_OK,
- _("The default theme schemas could not be found on your system. This means that you probably don't have metacity installed, or that your gconf is configured incorrectly."));
- gtk_dialog_run (GTK_DIALOG (msg_dialog));
- gtk_widget_destroy (msg_dialog);
- exit (0);
- }
-
- gnome_theme_init (NULL);
-
- gnome_wm_manager_init ();
- activate_settings_daemon ();
-
- dialog = gnome_theme_manager_get_theme_dialog ();
-
- setup_dialog (dialog);
-
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/theme-switcher/gnome-theme-manager.h b/capplets/theme-switcher/gnome-theme-manager.h
deleted file mode 100644
index db990abfa..000000000
--- a/capplets/theme-switcher/gnome-theme-manager.h
+++ /dev/null
@@ -1,81 +0,0 @@
-#ifndef __GNOME_THEME_MANAGER_H__
-#define __GNOME_THEME_MANAGER_H__
-
-#include <gtk/gtk.h>
-#include <glade/glade.h>
-
-
-#define GTK_THEME_KEY "/desktop/gnome/interface/gtk_theme"
-#define ICON_THEME_KEY "/desktop/gnome/interface/icon_theme"
-#define FONT_KEY "/desktop/gnome/interface/font_name"
-
-#define METACITY_THEME_DIR "/apps/metacity/general"
-#define METACITY_THEME_KEY METACITY_THEME_DIR "/theme"
-
-extern const char *meta_theme_default_name;
-extern const char *gtk_theme_default_name;
-extern const char *window_theme_default_name;
-extern const char *icon_theme_default_name;
-
-
-/* Drag and drop info */
-enum
-{
- TARGET_URI_LIST,
- TARGET_NS_URL
-};
-
-/* model info */
-enum
-{
- THEME_NAME_COLUMN,
- THEME_ID_COLUMN,
- THEME_FLAG_COLUMN,
- N_COLUMNS
-};
-
-enum
-{
- THEME_FLAG_DEFAULT = 1 << 0,
- THEME_FLAG_CUSTOM = 1 << 1
-};
-
-extern GtkTargetEntry drop_types[];
-extern gint n_drop_types;
-
-
-/* Prototypes */
-GladeXML *gnome_theme_manager_get_theme_dialog (void);
-gint gnome_theme_manager_sort_func (const gchar *a_str,
- const gchar *b_str,
- guint a_flag,
- guint b_flag);
-void gnome_theme_manager_show_manage_themes (GtkWidget *button,
- gpointer data);
-void gnome_theme_manager_icon_show_manage_themes (GtkWidget *button,
- gpointer data);
-void gnome_theme_manager_window_show_manage_themes (GtkWidget *button,
- gpointer data);
-gboolean gnome_theme_manager_drag_motion_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- guint time,
- gpointer data);
-void gnome_theme_manager_drag_leave_cb (GtkWidget *widget,
- GdkDragContext *context,
- guint time,
- gpointer data);
-void gnome_theme_manager_drag_data_received_cb (GtkWidget *widget,
- GdkDragContext *context,
- gint x,
- gint y,
- GtkSelectionData *selection_data,
- guint info,
- guint time,
- gpointer data);
-
-
-
-
-#endif /* __GNOME_THEME_MANAGER_H__ */
diff --git a/capplets/theme-switcher/gnome-theme-save-data.c b/capplets/theme-switcher/gnome-theme-save-data.c
deleted file mode 100644
index e487194fc..000000000
--- a/capplets/theme-switcher/gnome-theme-save-data.c
+++ /dev/null
@@ -1,9 +0,0 @@
-static const gchar *theme_header =
-"[Desktop Entry]\n\
-Name=%s\n\
-Type=X-GNOME-Metatheme\n\
-Comment=%s\n\
-Encoding=UTF-8\n\
-\n\
-[X-GNOME-Metatheme]\n\
-";
diff --git a/capplets/theme-switcher/gnome-theme-save.c b/capplets/theme-switcher/gnome-theme-save.c
deleted file mode 100644
index 823752f5c..000000000
--- a/capplets/theme-switcher/gnome-theme-save.c
+++ /dev/null
@@ -1,311 +0,0 @@
-#include "gnome-theme-info.h"
-#include "gnome-theme-save.h"
-#include "gnome-theme-manager.h"
-#include "capplet-util.h"
-#include <libgnomevfs/gnome-vfs-ops.h>
-
-#include "gnome-theme-save-data.c"
-
-static GQuark error_quark;
-enum
-{
- INVALID_THEME_NAME
-};
-
-/* taken from gnome-desktop-item.c */
-static char *
-escape_string_and_dup (const char *s)
-{
- char *return_value, *p;
- const char *q;
- int len = 0;
-
- if (s == NULL)
- return g_strdup("");
-
- q = s;
- while (*q)
- {
- len++;
- if (strchr ("\n\r\t\\", *q) != NULL)
- len++;
- q++;
- }
- return_value = p = (char *) g_malloc (len + 1);
- do
- {
- switch (*s)
- {
- case '\t':
- *p++ = '\\';
- *p++ = 't';
- break;
- case '\n':
- *p++ = '\\';
- *p++ = 'n';
- break;
- case '\r':
- *p++ = '\\';
- *p++ = 'r';
- break;
- case '\\':
- *p++ = '\\';
- *p++ = '\\';
- break;
- default:
- *p++ = *s;
- }
- }
- while (*s++);
- return return_value;
-}
-
-static gboolean
-check_theme_name (const gchar *theme_name,
- GError **error)
-{
- if (theme_name == NULL)
- {
- g_set_error (error,
- error_quark,
- INVALID_THEME_NAME,
- _("Theme name must be present"));
- return FALSE;
- }
- return TRUE;
-}
-
-static gboolean
-setup_directory_structure (const gchar *theme_name,
- GError **error)
-{
- gchar *dir;
- GnomeVFSURI *uri;
-
- dir = g_build_filename (g_get_home_dir (), ".themes", NULL);
- uri = gnome_vfs_uri_new (dir);
- if (!gnome_vfs_uri_exists (uri))
- gnome_vfs_make_directory_for_uri (uri, 0775);
- gnome_vfs_uri_unref (uri);
- g_free (dir);
-
- dir = g_build_filename (g_get_home_dir (), ".themes", theme_name, NULL);
- uri = gnome_vfs_uri_new (dir);
- if (!gnome_vfs_uri_exists (uri))
- gnome_vfs_make_directory_for_uri (uri, 0775);
- else {
- GtkWidget *dialog;
- gint response;
-
- dialog = gtk_message_dialog_new (NULL,
- GTK_DIALOG_MODAL,
- GTK_MESSAGE_QUESTION,
- GTK_BUTTONS_OK_CANCEL,
- _("The theme already exists. Would you like to replace it?"));
- response = gtk_dialog_run(GTK_DIALOG(dialog));
- gtk_widget_destroy(dialog);
- if (response == GTK_RESPONSE_CANCEL)
- return FALSE;
- }
-
- gnome_vfs_uri_unref (uri);
- g_free (dir);
-
- return TRUE;
-}
-
-static gboolean
-write_theme_to_disk (GnomeThemeMetaInfo *meta_theme_info,
- const gchar *theme_name,
- const gchar *theme_description,
- GError **error)
-{
- gchar *dir;
- GnomeVFSURI *uri;
- GnomeVFSURI *target_uri;
- GnomeVFSHandle *handle = NULL;
- GnomeVFSFileSize bytes_written;
- gchar *str;
-
- dir = g_build_filename (g_get_home_dir (), ".themes", theme_name, "index.theme~", NULL);
- uri = gnome_vfs_uri_new (dir);
- dir [strlen (dir) - 1] = '\000';
- target_uri = gnome_vfs_uri_new (dir);
- g_free (dir);
- gnome_vfs_create_uri (&handle, uri, GNOME_VFS_OPEN_READ | GNOME_VFS_OPEN_WRITE, FALSE, 0644);
-
- gnome_vfs_truncate_handle (handle, 0);
-
- /* start making the theme file */
- str = g_strdup_printf (theme_header, theme_name, theme_description);
- gnome_vfs_write (handle, str, strlen (str), &bytes_written);
- g_free (str);
-
- str = g_strdup_printf ("GtkTheme=%s\n", meta_theme_info->gtk_theme_name);
- gnome_vfs_write (handle, str, strlen (str), &bytes_written);
- g_free (str);
-
- str = g_strdup_printf ("MetacityTheme=%s\n", meta_theme_info->metacity_theme_name);
- gnome_vfs_write (handle, str, strlen (str), &bytes_written);
- g_free (str);
-
- str = g_strdup_printf ("IconTheme=%s\n", meta_theme_info->icon_theme_name);
- gnome_vfs_write (handle, str, strlen (str), &bytes_written);
- g_free (str);
-
- gnome_vfs_close (handle);
-
-
- gnome_vfs_move_uri (uri, target_uri, TRUE);
- gnome_vfs_uri_unref (uri);
- gnome_vfs_uri_unref (target_uri);
-
- return TRUE;
-}
-
-static gboolean
-save_theme_to_disk (GnomeThemeMetaInfo *meta_theme_info,
- const gchar *theme_name,
- const gchar *theme_description,
- GError **error)
-{
- if (! check_theme_name (theme_name, error))
- return FALSE;
-
- if (! setup_directory_structure (theme_name, error))
- return FALSE;
-
- if (! write_theme_to_disk (meta_theme_info, theme_name, theme_description, error))
- return FALSE;
-
- return TRUE;
-}
-
-static void
-save_dialog_response (GtkWidget *save_dialog,
- gint response_id,
- gpointer data)
-{
- GnomeThemeMetaInfo *meta_theme_info;
- char *theme_description = NULL;
- char *theme_name = NULL;
- GError *error = NULL;
-
- if (response_id == GTK_RESPONSE_OK)
- {
- GladeXML *dialog;
- GtkWidget *entry;
- GtkWidget *text_view;
- GtkTextBuffer *buffer;
- GtkTextIter start_iter;
- GtkTextIter end_iter;
- gchar *buffer_text;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- entry = WID ("save_dialog_entry");
- theme_name = escape_string_and_dup (gtk_entry_get_text (GTK_ENTRY (entry)));
-
- text_view = WID ("save_dialog_textview");
- buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
- gtk_text_buffer_get_start_iter (buffer, &start_iter);
- gtk_text_buffer_get_end_iter (buffer, &end_iter);
- buffer_text = gtk_text_buffer_get_text (buffer, &start_iter, &end_iter, FALSE);
- theme_description = escape_string_and_dup (buffer_text);
- g_free (buffer_text);
- meta_theme_info = (GnomeThemeMetaInfo *) g_object_get_data (G_OBJECT (save_dialog), "meta-theme-info");
- if (! save_theme_to_disk (meta_theme_info, theme_name, theme_description, &error))
- {
- goto out;
- }
- }
-
- out:
- g_clear_error (&error);
- gtk_widget_hide (save_dialog);
- g_free (theme_name);
- g_free (theme_description);
-}
-
-static inline gboolean
-is_valid_theme_char (char c)
-{
- static const gchar *invalid_chars = "/?'\"\\|*.";
- const char *p;
-
- for (p = invalid_chars; *p != '\000'; p++)
- if (c == *p) return FALSE;
- return TRUE;
-}
-
-static void
-entry_text_filter (GtkEditable *editable,
- const gchar *text,
- gint length,
- gint *position,
- gpointer data)
-{
- gint i;
-
- for (i = 0; i < length; i ++)
- {
- if (! is_valid_theme_char (text[i]))
- {
- g_signal_stop_emission_by_name (editable, "insert_text");
- return;
- }
- }
-}
-
-static void
-entry_text_changed (GtkEditable *editable,
- gpointer data)
-{
- GladeXML *dialog = (GladeXML *) data;
- const gchar *text;
-
- text = gtk_entry_get_text (GTK_ENTRY (editable));
- if (text != NULL && text[0] != '\000')
- gtk_widget_set_sensitive (WID ("save_dialog_save_button"), TRUE);
- else
- gtk_widget_set_sensitive (WID ("save_dialog_save_button"), FALSE);
-}
-
-
-void
-gnome_theme_save_show_dialog (GtkWidget *parent,
- GnomeThemeMetaInfo *meta_theme_info)
-{
- static GtkWidget *save_dialog = NULL;
- GladeXML *dialog;
- GtkWidget *entry;
- GtkWidget *text_view;
- GtkTextBuffer *text_buffer;
-
- dialog = gnome_theme_manager_get_theme_dialog ();
- entry = WID ("save_dialog_entry");
- text_view = WID ("save_dialog_textview");
-
- if (save_dialog == NULL)
- {
- save_dialog = WID ("save_dialog");
- g_assert (save_dialog);
-
- g_signal_connect (G_OBJECT (save_dialog), "response", G_CALLBACK (save_dialog_response), NULL);
- g_signal_connect (G_OBJECT (save_dialog), "delete-event", G_CALLBACK (gtk_true), NULL);
- g_signal_connect (G_OBJECT (entry), "insert_text", G_CALLBACK (entry_text_filter), NULL);
- g_signal_connect (G_OBJECT (entry), "changed", G_CALLBACK (entry_text_changed), dialog);
-
- error_quark = g_quark_from_string ("gnome-theme-save");
- gtk_widget_set_size_request (text_view, 300, 100);
- }
-
- gtk_entry_set_text (GTK_ENTRY (entry), "");
- entry_text_changed (GTK_EDITABLE (entry), dialog);
- gtk_widget_grab_focus (entry);
-
- text_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (text_view));
- gtk_text_buffer_set_text (text_buffer, "", strlen (""));
- g_object_set_data (G_OBJECT (save_dialog), "meta-theme-info", meta_theme_info);
- gtk_window_set_transient_for (GTK_WINDOW (save_dialog), GTK_WINDOW (parent));
- gtk_widget_show (save_dialog);
-}
diff --git a/capplets/theme-switcher/gnome-theme-save.h b/capplets/theme-switcher/gnome-theme-save.h
deleted file mode 100644
index 7ef427e86..000000000
--- a/capplets/theme-switcher/gnome-theme-save.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __GNOME_THEME_SAVE_H__
-#define __GNOME_THEME_SAVE_H__
-
-
-#include <gtk/gtk.h>
-#include "gnome-theme-info.h"
-
-void gnome_theme_save_show_dialog (GtkWidget *parent,
- GnomeThemeMetaInfo *meta_theme_info);
-
-
-#endif /* __GNOME_THEME_SAVE_H__ */
diff --git a/capplets/theme-switcher/gtk-theme-selector-capplet.png b/capplets/theme-switcher/gtk-theme-selector-capplet.png
deleted file mode 100644
index 4ceb86de6..000000000
--- a/capplets/theme-switcher/gtk-theme-selector-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/theme-switcher/gtk-theme-selector.desktop.in.in b/capplets/theme-switcher/gtk-theme-selector.desktop.in.in
deleted file mode 100644
index 9ef0ee603..000000000
--- a/capplets/theme-switcher/gtk-theme-selector.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Theme
-_Comment=Select themes for various parts of the desktop
-Exec=gnome-theme-manager
-Icon=gnome-settings-theme
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=theme-manager
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/theme-switcher/gtk-theme-switcher.schemas b/capplets/theme-switcher/gtk-theme-switcher.schemas
deleted file mode 100644
index ef314d7fe..000000000
--- a/capplets/theme-switcher/gtk-theme-switcher.schemas
+++ /dev/null
@@ -1,47 +0,0 @@
-<gconfschemafile>
- <schemalist>
- <schema>
- <key>/schemas/apps/gtk-theme-switcher/auto</key>
- <applyto>/apps/gtk-theme-switcher/auto</applyto>
- <owner>gtk-theme-switcher</owner>
- <type>bool</type>
- <default>true</default>
- <locale name="C">
- <short>Auto-preview</short>
- <long>Whether to automatically preview selected themes</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/gtk-theme-switcher/theme</key>
- <applyto>/apps/gtk-theme-switcher/theme</applyto>
- <owner>gtk-theme-switcher</owner>
- <type>string</type>
- <default>Default</default>
- <locale name="C">
- <short>Current theme</short>
- <long>The last set theme</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/gtk-theme-switcher/font</key>
- <applyto>/apps/gtk-theme-switcher/font</applyto>
- <owner>gtk-theme-switcher</owner>
- <type>string</type>
- <locale name="C">
- <short>Current theme</short>
- <long>The last set theme</long>
- </locale>
- </schema>
- <schema>
- <key>/schemas/apps/gtk-theme-switcher/use_theme_font</key>
- <applyto>/apps/gtk-theme-switcher/use_theme_font</applyto>
- <owner>gtk-theme-switcher</owner>
- <type>bool</type>
- <default>false</default>
- <locale name="C">
- <short>Use custom font</short>
- <long>Whether to use the custom specified font</long>
- </locale>
- </schema>
- </schemalist>
-</gconfschemafile>
diff --git a/capplets/theme-switcher/theme-install.glade b/capplets/theme-switcher/theme-install.glade
deleted file mode 100644
index e2bf0ce29..000000000
--- a/capplets/theme-switcher/theme-install.glade
+++ /dev/null
@@ -1,261 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="install_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Theme Installation</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">False</property>
- <property name="destroy_with_parent">False</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton2">
- <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="button3">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="button4">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="response_id">0</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment1">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <property name="visible">True</property>
- <property name="stock">gtk-ok</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Install</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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="GtkHBox" id="hbox6">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-question</property>
- <property name="icon_size">6</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0</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="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span size=&quot;larger&quot; weight=&quot;bold&quot;&gt;Install a Theme&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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">install_theme_combo_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Location:</property>
- <property name="use_underline">True</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>
- <property name="mnemonic_widget">install_theme_combo_entry</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GnomeFileEntry" id="install_theme_picker">
- <property name="visible">True</property>
- <property name="max_saved">10</property>
- <property name="directory_entry">False</property>
- <property name="modal">True</property>
- <property name="use_filechooser">True</property>
-
- <child internal-child="entry">
- <widget class="GtkEntry" id="install_theme_combo_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="has_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">False</property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </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">True</property>
- <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>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/theme-switcher/theme-properties.glade b/capplets/theme-switcher/theme-properties.glade
deleted file mode 100644
index fdce961ff..000000000
--- a/capplets/theme-switcher/theme-properties.glade
+++ /dev/null
@@ -1,1686 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!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="border_width">5</property>
- <property name="title" translatable="yes">Theme Preferences</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="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="closebutton1">
- <property name="visible">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="focus_on_click">True</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="content_vbox">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkHBox" id="meta_theme_hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="theme_swindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="meta_theme_treeview">
- <property name="height_request">350</property>
- <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>
- <accessibility>
- <atkproperty name="AtkObject::accessible_name" translatable="yes">theme selection tree</atkproperty>
- <atkproperty name="AtkObject::accessible_description" translatable="yes">Select theme for the desktop</atkproperty>
- </accessibility>
- </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="button_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="meta_theme_install_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment8">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image7">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label42">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Install Theme...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="meta_theme_details_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="stock">gtk-preferences</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label41">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Theme _Details</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="meta_theme_save_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment9">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox16">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image8">
- <property name="visible">True</property>
- <property name="stock">gtk-save</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label43">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Save Theme...</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="meta_theme_revert_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment16">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox26">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image15">
- <property name="visible">True</property>
- <property name="stock">gtk-undo</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label50">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Revert</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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">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="GtkNotebook" id="meta_theme_notebook">
- <property name="visible">True</property>
- <property name="show_tabs">False</property>
- <property name="show_border">False</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
-
- <child>
- <widget class="GtkLabel" id="label28">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This theme does not suggest any particular font or background.</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label27">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label27</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>
-
- <child>
- <widget class="GtkHBox" id="hbox23">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label24">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This theme suggests a font:</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</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>
-
- <child>
- <widget class="GtkButton" id="meta_theme_font1_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply _Font</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</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="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label19</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>
-
- <child>
- <widget class="GtkHBox" id="hbox24">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label25">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This theme suggests a background:</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</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>
-
- <child>
- <widget class="GtkButton" id="meta_theme_background1_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply _Background</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</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="label20">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label20</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</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>
-
- <child>
- <widget class="GtkHBox" id="hbox25">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label26">
- <property name="visible">True</property>
- <property name="label" translatable="yes">This theme suggests a font and a background:</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</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>
-
- <child>
- <widget class="GtkButton" id="meta_theme_font2_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply _Font</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkButton" id="meta_theme_background2_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Apply _Background</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </widget>
- <packing>
- <property name="padding">0</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="label21">
- <property name="visible">True</property>
- <property name="label" translatable="yes">label21</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">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="theme_details_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Theme Details</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="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton2">
- <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="focus_on_click">True</property>
- <property name="response_id">-11</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="closebutton2">
- <property name="visible">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="focus_on_click">True</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="GtkNotebook" id="theme_notebook">
- <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="enable_popup">False</property>
-
- <child>
- <widget class="GtkVBox" id="control_theme_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="control_theme_swindow">
- <property name="visible">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="control_theme_treeview">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="has_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>
- <accessibility>
- <atkproperty name="AtkObject::accessible_name" translatable="yes">theme selection tree</atkproperty>
- </accessibility>
- </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="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="control_manage_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment14">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox21">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image13">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label48">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Go To Theme Folder</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox5">
- <property name="visible">True</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New themes can also be installed by dragging them into the window.</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">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="label11">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Controls</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>
-
- <child>
- <widget class="GtkVBox" id="window_theme_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkHBox" id="hbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</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_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</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>
- <accessibility>
- <atkproperty name="AtkObject::accessible_name" translatable="yes">theme selection tree</atkproperty>
- </accessibility>
- </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">6</property>
-
- <child>
- <widget class="GtkButton" id="window_manage_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment11">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox18">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image10">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label45">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Go To Theme Folder</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkImage" id="image2">
- <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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New themes can also be installed by dragging them into the window.</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">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="label12">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Window Border</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>
-
- <child>
- <widget class="GtkVBox" id="icon_theme_vbox">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkScrolledWindow" id="icon_theme_swindow">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTreeView" id="icon_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>
- <accessibility>
- <atkproperty name="AtkObject::accessible_name" translatable="yes">theme selection tree</atkproperty>
- </accessibility>
- </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="vbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkButton" id="icon_manage_button">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
-
- <child>
- <widget class="GtkAlignment" id="alignment13">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHBox" id="hbox20">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child>
- <widget class="GtkImage" id="image12">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label47">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Go To Theme Folder</property>
- <property name="use_underline">True</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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkImage" id="image4">
- <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">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">New themes can also be installed by dragging them into the window.</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">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="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Icons</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>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-<widget class="GtkDialog" id="save_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Save Theme</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="has_separator">False</property>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area3">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
-
- <child>
- <widget class="GtkButton" id="save_dialog_cancel_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-6</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkButton" id="save_dialog_save_button">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-save</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="response_id">-5</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="GtkHBox" id="hbox13">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-dialog-question</property>
- <property name="icon_size">6</property>
- <property name="xalign">0</property>
- <property name="yalign">0</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="GtkVBox" id="vbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label38">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;span size=&quot;larger&quot; weight=&quot;bold&quot;&gt;Save Theme to Disk&lt;/span&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkTable" id="table2">
- <property name="visible">True</property>
- <property name="n_rows">2</property>
- <property name="n_columns">2</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">6</property>
- <property name="column_spacing">12</property>
-
- <child>
- <widget class="GtkEntry" id="save_dialog_entry">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"></property>
- <property name="has_frame">True</property>
- <property name="invisible_char" translatable="yes">*</property>
- <property name="activates_default">True</property>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="y_options"></property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label39">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Theme name:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">save_dialog_entry</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
-
- <child>
- <widget class="GtkTextView" id="save_dialog_textview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_WORD</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- <property name="text" translatable="yes"></property>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label40">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Short _description:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">scrolledwindow1</property>
- </widget>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options">fill</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/theme-switcher/theme-switcher-capplet.png b/capplets/theme-switcher/theme-switcher-capplet.png
deleted file mode 100644
index 4ceb86de6..000000000
--- a/capplets/theme-switcher/theme-switcher-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/theme-switcher/theme-thumbnailing.png b/capplets/theme-switcher/theme-thumbnailing.png
deleted file mode 100644
index b4a3f754e..000000000
--- a/capplets/theme-switcher/theme-thumbnailing.png
+++ /dev/null
Binary files differ
diff --git a/capplets/ui-properties/.cvsignore b/capplets/ui-properties/.cvsignore
deleted file mode 100644
index 1a8142b44..000000000
--- a/capplets/ui-properties/.cvsignore
+++ /dev/null
@@ -1,11 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.lo
-*.la
-*.o
-gnome-ui-properties
-gnome-ui-properties.desktop
-gnome-ui-properties.desktop.in
-behavior.desktop
diff --git a/capplets/ui-properties/ChangeLog b/capplets/ui-properties/ChangeLog
deleted file mode 100644
index f9b680a26..000000000
--- a/capplets/ui-properties/ChangeLog
+++ /dev/null
@@ -1,342 +0,0 @@
-2005-01-13 Sebastien Bacher <seb128@debian.org>
-
- * gnome-ui-properties.c: (setup_dialog):
- * gnome-ui-properties.glade:
- patch from Christian - Manny Calavera - Neumair <chris@gnome-de.org>,
- add an option in the UI to activate menus accelators changes
- (Closes: #148013).
-
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-ui-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * gnome-ui-properties.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-ui-properties.c: (setup_dialog):
- Use themed icon for window hint.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-12 Mark McLoughlin <mark@skynet.ie>
-
- * gnome-ui-properties.c: (dialog_button_clicked_cb): Update help link
- to point to user-guide.xml
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Rodney Dawes <dobey@ximian.com>
-
- * gnome-ui-properties.glade: Fix border width of example toolbar,
- fixes #130064
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-ui-properties.glade: Patch to fix spacing between action
- area and vbox of preferences dialog.
-
-2003-07-18 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-ui-properties.c, gnome-ui-properties.glade:
- Apply patch from Christian - Manny Calavera - Neumair
- <chris@gnome-de.org> for ui-review bug # 99537.
-
-2003-07-11 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-ui-properties.glade: UI-Review fixes for bug
- report #99537.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-05-05 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-ui-properties.c: Fix for both-horiz property
- with eggtoolbar and bonobo. Fixes bug #104979.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.glade : avoid conflicting mnemonics
- * gnome-ui-properties.c (set_have_icons) : the menus no longer have
- images, silence the warnings.
-
-2002-09-10 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=76419
- * gnome-ui-properties.glade : tweak layout slightly
-
-2002-08-23 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.glade : Priority text was a bonobo-ism.
- This is really 'text beside icon'
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * behavior.desktop.in: Fix the desktop file so that it validates.
-
-2002-07-17 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.glade : Use stock names
- and a 2nd menu item, as per ui-review
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2002-05-29 Jody Goldberg <jody@gnome.org>
-
- http://bugzilla.gnome.org/show_bug.cgi?id=82802
- * gnome-ui-properties.c (setup_dialog) : disable resize.
-
-2002-05-28 Satyajit Kanungo <satyajit.kanungo@wipro.com>
-
- * gnome-ui-properties.c : Changed the help file link
- to get the help document from user-guide.
-
-2002-05-26 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.c (dialog_button_clicked_cb) : Improve handling
- of help failures.
-
-Sun May 26 11:37:08 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-ui-properties.c (main): use APPID instead of argv[0]
-
-2002-05-14 Michael Meeks <michael@ximian.com>
-
- * gnome-ui-properties.c
- (toolbar_to_widget, set_toolbar_style): tolerate
- bogus values sanely.
- Update string to describe bonobo priority text
-
-2002-05-09 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.glade : add a help button.
- * gnome-ui-properties.c (dialog_button_clicked_cb) : ditto.
-
-2002-05-06 jacob berkman <jacob@ximian.com>
-
- * ui-properties.glade.h: remove unused file
-
-2002-05-06 Anders Carlsson <andersca@gnu.org>
-
- * gnome-ui-properties.c: (create_dialog):
- Fix the support for both_horiz as the toolbar style.
-
- * gnome-ui-properties.glade:
- Re-add all option menu items; Somehow they got lost.
-
-2002-04-29 Kjartan Maraas <kmaraas@gnome.org>
-
- * ui-properties.glade: Remove translatable="yes" for a wrong case.
-
-2002-04-25 Seth Nickell <snickell@stanford.edu>
-
- * behavior.desktop.in:
-
- Move out of advanced, add nicer tooltip (still crummy, but better).
-
-2002-04-25 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.c (set_toolbar_style) : Add GTK_TOOLBAR_BOTH_HORIZ
-
-2002-04-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-ui-properties.glade:
-
- Change "Menu items have icons" to "Menu items can have icons"
-
-2002-04-02 Jody Goldberg <jody@gnome.org>
-
- * gnome-ui-properties.c (setup_dialog) : suppress warnings.
-
-2002-04-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-ui-properties.c: (create_dialog):
- * gnome-ui-properties.glade:
- * ui-properties.glade:
-
- Somebody started rennaming the glade file but didn't follow
- through. Fixing the build by finishing the change.
-
-2002-03-21 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-ui-properties.c (toolbar_to_widget): Check GConf value type
-
-2002-03-21 Dave Camp <dave@ximian.com>
-
- * gnome-ui-properties.c: (show_handlebar), (set_toolbar_style),
- (toolbar_style_cb), (set_have_icons): New functions.
- (toolbar_detachable_cb): Call show_handlebar.
- (menus_have_icons_cb): Call set_have_icons.
- (setup_dialog): Connect to the style peditor's value_changed signal,
- and set the initial states of the example widgets.
-
-2002-03-19 Richard Hestilow <hestilow@ximian.com>
-
- * gnome-ui-properties.c (*_to/from_widget): Convert to new signature.
-
-2002-02-27 Kjartan Maraas <kmaraas@gnome.org>
-
- * main.c: s/PACKAGE/GETTEXT_PACKAGE/g
- * gnome-ui-properties.c: Same here.
-
-2002-02-10 Richard Hestilow <hestilow@ximian.com>
-
- * gnome-ui-properties.c (main): Create changeset.
-
-2002-02-10 Richard Hestilow <hestilow@ximian.com>
-
- * Make dialog Apply/Close.
-
-2002-02-04 Lauris Kaplinski <lauris@ximian.com>
-
- * gnome-ui-properties.c (dialog_button_clicked_cb): Use GtkDialog
-
-2002-02-01 Seth Nickell <snickell@stanford.edu>
-
- * behavior-capplet.png:
-
- Change to Jimmac's alternate behavior icon.
-
-Mon Jan 28 22:18:34 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-ui-properties.c (create_dialog): install globally
-
-Mon Jan 28 22:09:30 2002 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-ui-properties.c: completely rethink this dialog
-
-2002-01-27 Seth Nickell <snickell@stanford.edu>
-
- * behavior.desktop.in:
-
- Add Categories field.
-
-2002-01-14 Bradford Hovinen <hovinen@ximian.com>
-
- * Makefile.am: Update
-
- * main.c (main): Remove Ximian archiver stuff
-
-2002-01-14 Richard Hestilow <hestilow@ximian.com>
-
- * Gnome 2 port. (Settings only halfway work right now.)
-
-2001-09-29 Richard Hestilow <hestilow@ximian.com>
-
- * prefs-widget.c (prefs_widget_set_arg): Register
- callbacks after loading the preferences; otherwise they will
- get triggered unnecessarily.
- (selected_cb): Only trigger a change if there really was one.
- Fixes bug #9161.
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Chema Celorio <chema@celorio.com>
-
- * Makefile.am (cappletname): distcheck fixes
-
diff --git a/capplets/ui-properties/Makefile.am b/capplets/ui-properties/Makefile.am
deleted file mode 100644
index 306ba9bae..000000000
--- a/capplets/ui-properties/Makefile.am
+++ /dev/null
@@ -1,18 +0,0 @@
-bin_PROGRAMS = gnome-ui-properties
-
-gnome_ui_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-gnome_ui_properties_SOURCES = \
- gnome-ui-properties.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = gnome-ui-properties.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-Gladedir = $(GNOMECC_GLADE_DIR)
-Glade_DATA = gnome-ui-properties.glade
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(Glade_DATA)
diff --git a/capplets/ui-properties/gnome-ui-properties.c b/capplets/ui-properties/gnome-ui-properties.c
deleted file mode 100644
index 14091475a..000000000
--- a/capplets/ui-properties/gnome-ui-properties.c
+++ /dev/null
@@ -1,310 +0,0 @@
-/* gnome-ui-properties.c
- * Copyright (C) 2002 Jonathan Blandford
- *
- * Written by: Jonathan Blandford <jrb@gnome.org>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-#include <glade/glade.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-
-enum
-{
- RESPONSE_APPLY = 1,
- RESPONSE_CLOSE
-};
-
-static GConfEnumStringPair toolbar_style_enums[] = {
- { 0, "both" },
- { 1, "both-horiz" },
- { 2, "icons" },
- { 3, "text" },
- { -1, NULL }
-};
-
-static GConfValue *
-toolbar_from_widget (GConfPropertyEditor *peditor, GConfValue *value)
-{
- GConfValue *new_value;
-
- new_value = gconf_value_new (GCONF_VALUE_STRING);
- gconf_value_set_string (new_value,
- gconf_enum_to_string (toolbar_style_enums, gconf_value_get_int (value)));
-
- return new_value;
-}
-
-static GConfValue *
-toolbar_to_widget (GConfPropertyEditor *peditor, GConfValue *value)
-{
- GConfValue *new_value;
- const gchar *str;
- gint val = 2;
-
- str = (value && (value->type == GCONF_VALUE_STRING)) ? gconf_value_get_string (value) : NULL;
- new_value = gconf_value_new (GCONF_VALUE_INT);
- if (!gconf_string_to_enum (toolbar_style_enums, str, &val))
- val = 0;
- gconf_value_set_int (new_value, val);
-
- return new_value;
-}
-
-
-static void
-dialog_button_clicked_cb (GtkDialog *dialog, gint response_id, GConfChangeSet *changeset)
-{
- if (response_id == GTK_RESPONSE_HELP)
- capplet_help (GTK_WINDOW (dialog),
- "user-guide.xml",
- "goscustuserinter-2");
- else
- gtk_main_quit ();
-}
-
-static GladeXML *
-create_dialog (void)
-{
- GladeXML *dialog;
-
- dialog = glade_xml_new (GNOMECC_DATA_DIR "/interfaces/gnome-ui-properties.glade", "gnome_ui_properties_dialog", NULL);
- return dialog;
-}
-
-static void
-show_handlebar (GladeXML *dialog, gboolean show)
-{
- GtkWidget *handlebox;
- GtkWidget *toolbar;
- GtkWidget *align;
-
- handlebox = WID ("toolbar_handlebox");
- toolbar = WID ("toolbar_toolbar");
- align = WID ("toolbar_align");
-
- g_object_ref (handlebox);
- g_object_ref (toolbar);
-
- if (GTK_BIN (align)->child)
- gtk_container_remove (GTK_CONTAINER (align), GTK_BIN (align)->child);
- if (GTK_BIN (handlebox)->child)
- gtk_container_remove (GTK_CONTAINER (handlebox), GTK_BIN (handlebox)->child);
- if (show)
- {
- gtk_container_add (GTK_CONTAINER (align), handlebox);
- gtk_container_add (GTK_CONTAINER (handlebox), toolbar);
- g_object_unref (handlebox);
- }
- else
- {
- gtk_container_add (GTK_CONTAINER (align), toolbar);
- }
- g_object_unref (toolbar);
-
-
-}
-
-static void
-set_toolbar_style (GladeXML *dialog, const char *value)
-{
- static const GtkToolbarStyle gtk_toolbar_styles[] =
- { GTK_TOOLBAR_BOTH, GTK_TOOLBAR_BOTH_HORIZ, GTK_TOOLBAR_ICONS, GTK_TOOLBAR_TEXT };
-
- int enum_val;
-
- if (!gconf_string_to_enum (toolbar_style_enums, value, &enum_val))
- enum_val = 0;
-
- gtk_toolbar_set_style (GTK_TOOLBAR (WID("toolbar_toolbar")),
- gtk_toolbar_styles[enum_val]);
-}
-
-static void
-toolbar_detachable_cb (GConfPropertyEditor *peditor,
- gchar *key,
- GConfValue *value,
- GladeXML *dialog)
-{
- show_handlebar (dialog, gconf_value_get_bool (value));
-}
-
-static void
-toolbar_style_cb (GConfPropertyEditor *peditor,
- gchar *key,
- GConfValue *value,
- GladeXML *dialog)
-{
- set_toolbar_style (dialog, gconf_value_get_string (value));
-}
-
-static void
-set_have_icons (GladeXML *dialog, gboolean value)
-{
- static char *menu_item_names[] =
- {
- "menu_item_1",
- "menu_item_2",
- "menu_item_3",
- "menu_item_4",
- "menu_item_5",
- "cut1",
- "copy1",
- "paste1",
- NULL
- };
-
- char **name;
-
- for (name = menu_item_names; *name != NULL; name++)
- {
- GtkImageMenuItem *item = GTK_IMAGE_MENU_ITEM (WID (*name));
- GtkWidget *image;
- if (value)
- {
- image = g_object_get_data (G_OBJECT (item), "image");
- if (image)
- {
- gtk_image_menu_item_set_image (item, image);
- g_object_unref (image);
- }
- }
- else
- {
- image = gtk_image_menu_item_get_image (item);
- g_object_set_data (G_OBJECT (item), "image", image);
- g_object_ref (image);
- gtk_image_menu_item_set_image (item, NULL);
- }
- }
-}
-
-static void
-menus_have_icons_cb (GConfPropertyEditor *peditor,
- gchar *key,
- GConfValue *value,
- GladeXML *dialog)
-{
- set_have_icons (dialog, gconf_value_get_bool (value));
-}
-
-static gint
-button_press_blocker (GtkWidget *toolbar,
- GdkEvent *event,
- gpointer data)
-{
- return TRUE;
-}
-
-static void
-setup_dialog (GladeXML *dialog, GConfChangeSet *changeset)
-{
- GtkWidget *widget;
- GObject *peditor;
- char *toolbar_style;
- GConfClient *client = gconf_client_get_default ();
-
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/interface/toolbar_detachable", WID ("detachable_toolbars_toggle"), NULL);
- g_signal_connect (peditor,
- "value_changed",
- G_CALLBACK (toolbar_detachable_cb), dialog);
-
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/interface/can_change_accels", WID ("menu_accel_toggle"), NULL);
-
- peditor = gconf_peditor_new_boolean
- (changeset, "/desktop/gnome/interface/menus_have_icons", WID ("menu_icons_toggle"), NULL);
- g_signal_connect (peditor,
- "value_changed",
- G_CALLBACK (menus_have_icons_cb), dialog);
-
- set_have_icons (dialog,
- gconf_client_get_bool (client,
- "/desktop/gnome/interface/menus_have_icons",
- NULL));
-
- peditor = gconf_peditor_new_select_menu
- (changeset, "/desktop/gnome/interface/toolbar_style", WID ("toolbar_style_omenu"),
- "conv-to-widget-cb", toolbar_to_widget,
- "conv-from-widget-cb", toolbar_from_widget,
- NULL);
- g_signal_connect (peditor,
- "value_changed",
- G_CALLBACK (toolbar_style_cb), dialog);
-
- widget = WID ("toolbar_handlebox");
- g_signal_connect (G_OBJECT (widget),
- "button_press_event",
- G_CALLBACK (button_press_blocker), NULL);
-
- widget = WID ("gnome_ui_properties_dialog");
- g_signal_connect (G_OBJECT (widget),
- "response",
- G_CALLBACK (dialog_button_clicked_cb), changeset);
-
- show_handlebar (dialog,
- gconf_client_get_bool (client,
- "/desktop/gnome/interface/toolbar_detachable",
- NULL));
-
- toolbar_style = gconf_client_get_string (client,
- "/desktop/gnome/interface/toolbar_style",
- NULL);
- g_object_unref (client);
-
- set_toolbar_style (dialog, toolbar_style);
-
- g_free (toolbar_style);
-
- gtk_window_set_resizable (GTK_WINDOW (widget), FALSE);
- capplet_set_icon (widget, "gnome-settings-ui-behavior");
- gtk_widget_show_all (widget);
-}
-
-int
-main (int argc, char **argv)
-{
- GConfClient *client;
- GConfChangeSet *changeset = NULL;
- GladeXML *dialog;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-ui-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_APP_DATADIR, GNOMECC_DATA_DIR,
- NULL);
-
- client = gconf_client_get_default ();
- gconf_client_add_dir (client, "/desktop/gnome/interface", GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
- g_object_unref (client);
- dialog = create_dialog ();
- setup_dialog (dialog, changeset);
- gtk_main ();
-
- return 0;
-}
diff --git a/capplets/ui-properties/gnome-ui-properties.desktop.in.in b/capplets/ui-properties/gnome-ui-properties.desktop.in.in
deleted file mode 100644
index ce9d9681a..000000000
--- a/capplets/ui-properties/gnome-ui-properties.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Menus & Toolbars
-_Comment=Customize the appearance of toolbars and menubars in applications
-Exec=gnome-ui-properties
-Icon=gnome-settings-ui-behavior
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=other-capplets
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/ui-properties/gnome-ui-properties.glade b/capplets/ui-properties/gnome-ui-properties.glade
deleted file mode 100644
index ee1a7db8a..000000000
--- a/capplets/ui-properties/gnome-ui-properties.glade
+++ /dev/null
@@ -1,678 +0,0 @@
-<?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="gnome_ui_properties_dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Menu and Toolbar Preferences</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="default_width">400</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-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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">2</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="vbox2">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">18</property>
-
- <child>
- <widget class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label8">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Behavior and Appearance&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label10">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkCheckButton" id="menu_icons_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Show _icons in menus</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="menu_accel_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Editable menu accelerators</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkCheckButton" id="detachable_toolbars_toggle">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Detachable toolbars</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="active">True</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Toolbar _button labels:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</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="mnemonic_widget">toolbar_style_omenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="toolbar_style_omenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">0</property>
-
- <child internal-child="menu">
- <widget class="GtkMenu" id="convertwidget1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Text below icons</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Text beside icons</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="convertwidget4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Icons only</property>
- <property name="use_underline">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="text_only1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Text only</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_text_only1_activate" last_modification_time="Mon, 06 May 2002 07:03:54 GMT"/>
- </widget>
- </child>
- </widget>
- </child>
- </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>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="label7">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Preview&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkLabel" id="label9">
- <property name="visible">True</property>
- <property name="label" translatable="yes"> </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="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkMenuBar" id="menubar1">
- <property name="visible">True</property>
-
- <child>
- <widget class="GtkMenuItem" id="File Menu">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_File</property>
- <property name="use_underline">True</property>
-
- <child>
- <widget class="GtkMenu" id="File Menu_menu">
-
- <child>
- <widget class="GtkImageMenuItem" id="menu_item_1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_New</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_menu_item_1_activate"/>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image59">
- <property name="visible">True</property>
- <property name="stock">gtk-new</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="menu_item_2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Open</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_menu_item_2_activate"/>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image60">
- <property name="visible">True</property>
- <property name="stock">gtk-open</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="menu_item_3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Save</property>
- <property name="use_underline">True</property>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image61">
- <property name="visible">True</property>
- <property name="stock">gtk-save</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="separator3">
- <property name="visible">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="menu_item_4">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Print</property>
- <property name="use_underline">True</property>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image62">
- <property name="visible">True</property>
- <property name="stock">gtk-print</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="separator4">
- <property name="visible">True</property>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="menu_item_5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Quit</property>
- <property name="use_underline">True</property>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image63">
- <property name="visible">True</property>
- <property name="stock">gtk-quit</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkMenuItem" id="edit1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Edit</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_edit1_activate" last_modification_time="Thu, 18 Jul 2002 03:49:33 GMT"/>
-
- <child>
- <widget class="GtkMenu" id="edit1_menu">
-
- <child>
- <widget class="GtkImageMenuItem" id="cut1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_ut</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_cut1_activate" last_modification_time="Thu, 18 Jul 2002 03:49:33 GMT"/>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image64">
- <property name="visible">True</property>
- <property name="stock">gtk-cut</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="copy1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Copy</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_copy1_activate" last_modification_time="Thu, 18 Jul 2002 03:49:33 GMT"/>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image65">
- <property name="visible">True</property>
- <property name="stock">gtk-copy</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
-
- <child>
- <widget class="GtkImageMenuItem" id="paste1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Paste</property>
- <property name="use_underline">True</property>
- <signal name="activate" handler="on_paste1_activate" last_modification_time="Thu, 18 Jul 2002 03:49:33 GMT"/>
-
- <child internal-child="image">
- <widget class="GtkImage" id="image66">
- <property name="visible">True</property>
- <property name="stock">gtk-paste</property>
- <property name="icon_size">1</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkAlignment" id="toolbar_align">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
-
- <child>
- <widget class="GtkHandleBox" id="toolbar_handlebox">
- <property name="visible">True</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <property name="handle_position">GTK_POS_LEFT</property>
- <property name="snap_edge">GTK_POS_TOP</property>
-
- <child>
- <widget class="GtkToolbar" id="toolbar_toolbar">
- <property name="visible">True</property>
- <property name="orientation">GTK_ORIENTATION_HORIZONTAL</property>
- <property name="toolbar_style">GTK_TOOLBAR_BOTH</property>
- <property name="tooltips">True</property>
- <property name="show_arrow">True</property>
-
- <child>
- <widget class="GtkToolButton" id="button7">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">New File</property>
- <property name="stock_id">gtk-new</property>
- <property name="visible_horizontal">True</property>
- <property name="visible_vertical">True</property>
- <property name="is_important">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkToolButton" id="button8">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Open File</property>
- <property name="stock_id">gtk-open</property>
- <property name="visible_horizontal">True</property>
- <property name="visible_vertical">True</property>
- <property name="is_important">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkToolButton" id="save_button">
- <property name="visible">True</property>
- <property name="tooltip" translatable="yes">Save File</property>
- <property name="stock_id">gtk-save</property>
- <property name="visible_horizontal">True</property>
- <property name="visible_vertical">True</property>
- <property name="is_important">False</property>
- </widget>
- <packing>
- <property name="expand">False</property>
- <property name="homogeneous">True</property>
- </packing>
- </child>
- </widget>
- </child>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/ui-properties/gnome-warning.png b/capplets/ui-properties/gnome-warning.png
deleted file mode 100644
index 5c533b249..000000000
--- a/capplets/ui-properties/gnome-warning.png
+++ /dev/null
Binary files differ
diff --git a/capplets/ui-properties/preferences.h b/capplets/ui-properties/preferences.h
deleted file mode 100644
index 98645ff7d..000000000
--- a/capplets/ui-properties/preferences.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* -*- mode: c; style: linux -*- */
-
-/* preferences.h
- * Copyright (C) 2000 Helix Code, Inc.
- *
- * Written by Bradford Hovinen <hovinen@helixcode.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifndef __PREFERENCES_H
-#define __PREFERENCES_H
-
-#include <gtk/gtk.h>
-#include <gnome.h>
-
-#define PREFERENCES(obj) GTK_CHECK_CAST (obj, preferences_get_type (), Preferences)
-#define PREFERENCES_CLASS(klass) GTK_CHECK_CLASS_CAST (klass, preferences_get_type (), PreferencesClass)
-#define IS_PREFERENCES(obj) GTK_CHECK_TYPE (obj, preferences_get_type ())
-
-typedef struct _Preferences Preferences;
-typedef struct _PreferencesClass PreferencesClass;
-
-struct _Preferences
-{
- GtkObject object;
-
- gint frozen;
- guint timeout_id;
-
- struct {
- enum { DEFAULT, SPREAD, EDGE, START, END } dialog_buttons_style;
- gboolean dialog_icons;
- gboolean dialog_centered;
- GtkWindowPosition dialog_position;
- GtkWindowType dialog_type;
- gboolean menus_show_icons;
- gboolean menus_have_tearoff;
- gboolean toolbar_labels;
- gboolean toolbar_detachable;
- gboolean toolbar_relief;
- gboolean toolbar_separator;
- gboolean toolbar_popup;
- gboolean menubar_detachable;
- gboolean menubar_relief;
- gboolean statusbar_meter_on_right;
- gboolean statusbar_is_interactive;
- GnomeMDIMode mdi_mode;
- GtkPositionType mdi_tab_pos;
- } gnome_prefs;
-};
-
-struct _PreferencesClass
-{
- GtkObjectClass klass;
-};
-
-GType preferences_get_type (void);
-
-GtkObject *preferences_new (void);
-GtkObject *preferences_clone (Preferences *prefs);
-void preferences_destroy (GtkObject *object);
-
-void preferences_load (Preferences *prefs);
-void preferences_save (Preferences *prefs);
-void preferences_changed (Preferences *prefs);
-void preferences_apply_now (Preferences *prefs);
-
-void preferences_freeze (Preferences *prefs);
-void preferences_thaw (Preferences *prefs);
-
-/* get/set functions. It's really stupid that we need these */
-
-int preferences_get_menubar_detachable (Preferences *prefs);
-int preferences_get_menubar_relief (Preferences *prefs);
-int preferences_get_menus_have_tearoff (Preferences *prefs);
-int preferences_get_menus_have_icons (Preferences *prefs);
-
-int preferences_get_statusbar_is_interactive (Preferences *prefs);
-int preferences_get_statusbar_meter_on_left (Preferences *prefs);
-int preferences_get_statusbar_meter_on_right (Preferences *prefs);
-
-int preferences_get_toolbar_detachable (Preferences *prefs);
-int preferences_get_toolbar_relief (Preferences *prefs);
-int preferences_get_toolbar_icons_only (Preferences *prefs);
-int preferences_get_toolbar_text_below (Preferences *prefs);
-
-int preferences_get_dialog_icons (Preferences *prefs);
-int preferences_get_dialog_centered (Preferences *prefs);
-
-GtkWindowPosition preferences_get_dialog_position (Preferences *prefs);
-GtkWindowType preferences_get_dialog_type (Preferences *prefs);
-int preferences_get_dialog_buttons_style (Preferences *prefs);
-
-GnomeMDIMode preferences_get_mdi_mode (Preferences *prefs);
-GtkPositionType preferences_get_mdi_tab_pos (Preferences *prefs);
-
-#if 0
-int preferences_get_property_box_buttons_ok (Preferences *prefs);
-int preferences_get_property_box_buttons_apply (Preferences *prefs);
-int preferences_get_property_box_buttons_close (Preferences *prefs);
-int preferences_get_property_box_buttons_help (Preferences *prefs);
-int preferences_get_disable_imlib_cache (Preferences *prefs);
-#endif
-
-
-
-
-
-
-void preferences_set_menubar_detachable (Preferences *prefs, int i);
-void preferences_set_menubar_relief (Preferences *prefs, int i);
-void preferences_set_menus_have_tearoff (Preferences *prefs, int i);
-void preferences_set_menus_have_icons (Preferences *prefs, int i);
-
-void preferences_set_statusbar_is_interactive (Preferences *prefs, int i);
-void preferences_set_statusbar_meter_on_left (Preferences *prefs, int i);
-void preferences_set_statusbar_meter_on_right (Preferences *prefs, int i);
-
-void preferences_set_toolbar_detachable (Preferences *prefs, int i);
-void preferences_set_toolbar_relief (Preferences *prefs, int i);
-void preferences_set_toolbar_icons_only (Preferences *prefs, int i);
-void preferences_set_toolbar_text_below (Preferences *prefs, int i);
-
-void preferences_set_dialog_icons (Preferences *prefs, int i);
-void preferences_set_dialog_centered (Preferences *prefs, int i);
-
-void preferences_set_dialog_position (Preferences *prefs, int i);
-void preferences_set_dialog_type (Preferences *prefs, int i);
-void preferences_set_dialog_buttons_style (Preferences *prefs, int i);
-
-void preferences_set_mdi_mode (Preferences *prefs, int i);
-void preferences_set_mdi_tab_pos (Preferences *prefs, int i);
-
-#if 0
-void preferences_set_property_box_buttons_ok (Preferences *prefs, int i);
-void preferences_set_property_box_buttons_apply (Preferences *prefs, int i);
-void preferences_set_property_box_buttons_close (Preferences *prefs, int i);
-void preferences_set_property_box_buttons_help (Preferences *prefs, int i);
-void preferences_set_disable_imlib_cache (Preferences *prefs, int i);
-#endif
-
-#endif /* __PREFERENCES_H */
diff --git a/capplets/url-properties/ChangeLog b/capplets/url-properties/ChangeLog
deleted file mode 100644
index 46b684cb8..000000000
--- a/capplets/url-properties/ChangeLog
+++ /dev/null
@@ -1,163 +0,0 @@
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-02-08 Kjartan Maraas <kmaraas@gnome.org>
-
- * url-properties.c: Replace deprecated call to g_basename.
- (#133174, Kjartan Maraas)
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * url-properties.c: Port to GConf.
-
-2001-10-17 Bradford Hovinen <hovinen@ximian.com>
-
- * url-properties.c: Make sure the row is unselected before trying
- to remove it
-
-2001-10-16 Jakub Steiner <jimmac@ximian.com>
-
- * url-capplet.png: changed the icon based on usability@ notes
-
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-24 Chema Celorio <chema@celorio.com>
-
- * url-properties.c: set the usize of the window
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-1999-06-11 Ettore Perazzoli <ettore@comm2000.it>
-
- * url-properties.c (main): Exit with an error if
- `gnome_capplet_init()' returns an error. Bug reported by Nicola
- Pero <n.pero@mi.flashnet.it>.
-
-1999-05-16 Jacob Berkman <jberk+@cmu.edu>
-
- * url-properties.c (url_capplet_commit): added a
- gnome_config_sync() so the changes actually get saved.
- (gnome bug #169)
-
-1998-12-12 Nuno Ferreira <nmrf@rnl.ist.utl.pt>
-
- * url-properties.c: Change included "config.h" to <config.h>.
-
- * url-properties.desktop: Added Portuguese translation.
-
-1998-12-11 Nuno Ferreira <nmrf@rnl.ist.utl.pt>
-
- * .cvsignore: Added this file.
-
-1998-12-08 James Henstridge <james@daa.com.au>
- * url-properties.c: forgot the copyright message at the top of the
- file.
-
-1998-12-08 James Henstridge <james@daa.com.au>
-
- * url-properties.c, url-properties.desktop, Makefile.am: A new capplet
- that can be used to configure the behaviour of the gnome_url_show
- function.
-
-
diff --git a/capplets/url-properties/Makefile.am b/capplets/url-properties/Makefile.am
deleted file mode 100644
index ad13a5088..000000000
--- a/capplets/url-properties/Makefile.am
+++ /dev/null
@@ -1,25 +0,0 @@
-cappletname = url
-cappletgroup = "Advanced/"
-bin_PROGRAMS = url-properties
-
-url_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-url_properties_SOURCES = url-properties.c
-
-pixmap_DATA =
-
-##
-## You should not need to modify anything below this line
-##
-@INTLTOOL_DESKTOP_RULE@
-@GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST)
-iconsdir = $(GNOMECC_ICONS_DIR)
-Gladedir = $(GNOMECC_GLADE_DIR)
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-Glade_DATA = $(cappletname)-properties.glade
-icons_DATA = $(cappletname)-capplet.png
-desktop = $(cappletname).desktop
-all-local: $(desktop)
diff --git a/capplets/url-properties/url-capplet.png b/capplets/url-properties/url-capplet.png
deleted file mode 100644
index 461526625..000000000
--- a/capplets/url-properties/url-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/url-properties/url-properties.c b/capplets/url-properties/url-properties.c
deleted file mode 100644
index 2827a75af..000000000
--- a/capplets/url-properties/url-properties.c
+++ /dev/null
@@ -1,309 +0,0 @@
-/* url-properties -- a capplet to configure the behaviour of gnome_url_show
- * Copyright (C) 1998 James Henstridge <james@daa.com.au>
- *
- * 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 License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <string.h>
-#include <gtk/gtk.h>
-#include <gnome.h>
-#include <gconf/gconf-client.h>
-
-GtkWidget *capplet, *protocol, *combo, *clist;
-GSList *handlers_removed = NULL;
-
-void url_capplet_refill_clist (void);
-void url_capplet_commit(void);
-
-void build_capplet(void);
-void state_changed (void);
-void response_cb (GtkDialog *dialog, GtkResponseType response, gpointer data);
-void set_handler(GtkEntry *entry);
-void remove_handler(GtkButton *button);
-void select_clist_row(GtkCList *clist, gint row, gint column);
-
-int
-main(int argc, char *argv[]) {
- gint init_ret;
-
- bindtextdomain(PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (PACKAGE, "UTF-8");
- textdomain(PACKAGE);
-
- gnome_program_init ("url-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv, NULL);
-
- build_capplet();
- url_capplet_refill_clist (); /* this will refill the clist */
-
- gtk_signal_connect(GTK_OBJECT(capplet), "response",
- GTK_SIGNAL_FUNC(response_cb), NULL);
-
- gtk_main();
- return 0;
-}
-
-void build_capplet(void) {
- GtkWidget *vbox, *hbox, *item, *button;
- gchar *titles[] = { N_("Protocol"), N_("Command") };
-
- capplet = gtk_dialog_new_with_buttons (_("URL Handlers"), NULL,
- -1,
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
- GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- NULL);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (capplet), GTK_RESPONSE_APPLY,
- FALSE);
-
- vbox = gtk_vbox_new(FALSE, 5);
- gtk_widget_set_usize (vbox, 400, 250);
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (capplet)->vbox), vbox, TRUE, TRUE, 0);
- gtk_widget_show(vbox);
-
- hbox = gtk_hbox_new(FALSE, 5);
- gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, TRUE, 0);
- gtk_widget_show(hbox);
-
- protocol = gtk_entry_new();
- gtk_widget_set_usize(protocol, 80, -1);
- gtk_box_pack_start(GTK_BOX(hbox), protocol, FALSE, TRUE, 0);
- gtk_widget_show(protocol);
-
- item = gtk_label_new(_("handler:"));
- gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, TRUE, 0);
- gtk_widget_show(item);
-
- combo = gtk_combo_new();
- gtk_combo_set_use_arrows(GTK_COMBO(combo), FALSE);
- gtk_combo_set_value_in_list(GTK_COMBO(combo), FALSE, FALSE);
- gtk_combo_disable_activate(GTK_COMBO(combo));
-
- /* set some commonly used handlers */
- item = gtk_list_item_new_with_label(_("Netscape"));
- gtk_combo_set_item_string(GTK_COMBO(combo), GTK_ITEM(item),
- "gnome-moz-remote '%s'");
- gtk_container_add(GTK_CONTAINER(GTK_COMBO(combo)->list), item);
- gtk_widget_show(item);
- item = gtk_list_item_new_with_label(_("Netscape (new window)"));
- gtk_combo_set_item_string(GTK_COMBO(combo), GTK_ITEM(item),
- "gnome-moz-remote --newwin '%s'");
- gtk_container_add(GTK_CONTAINER(GTK_COMBO(combo)->list), item);
- gtk_widget_show(item);
-
- item = gtk_list_item_new_with_label(_("Help browser"));
- gtk_combo_set_item_string(GTK_COMBO(combo), GTK_ITEM(item),
- "gnome-help-browser '#%s'");
- gtk_container_add(GTK_CONTAINER(GTK_COMBO(combo)->list), item);
- gtk_widget_show(item);
- item = gtk_list_item_new_with_label(_("Help browser (new window)"));
- gtk_combo_set_item_string(GTK_COMBO(combo), GTK_ITEM(item),
- "gnome-help-browser '%s'");
- gtk_container_add(GTK_CONTAINER(GTK_COMBO(combo)->list), item);
- gtk_widget_show(item);
-
- gtk_box_pack_start(GTK_BOX(hbox), combo, TRUE, TRUE, 0);
- gtk_widget_show(combo);
-
- gtk_signal_connect(GTK_OBJECT(GTK_COMBO(combo)->entry), "activate",
- GTK_SIGNAL_FUNC(set_handler), NULL);
-
- button = gtk_button_new_with_label(_("Set"));
- gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, TRUE, 0);
- gtk_widget_show(button);
-
- gtk_signal_connect_object(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(set_handler),
- GTK_OBJECT(GTK_COMBO(combo)->entry));
-
- button = gtk_button_new_with_label(_("Remove"));
- gtk_box_pack_start(GTK_BOX(hbox), button, FALSE, TRUE, 0);
- gtk_widget_show(button);
-
- gtk_signal_connect(GTK_OBJECT(button), "clicked",
- GTK_SIGNAL_FUNC(remove_handler), NULL);
-
- item = gtk_scrolled_window_new(NULL, NULL);
- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(item),
- GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
- gtk_box_pack_start(GTK_BOX(vbox), item, TRUE, TRUE, 0);
- gtk_widget_show(item);
-
- titles[0] = _(titles[0]);
- titles[1] = _(titles[1]);
- clist = gtk_clist_new_with_titles(2, titles);
- gtk_container_add(GTK_CONTAINER(item), clist);
- gtk_widget_show(clist);
-
- gtk_clist_set_column_width(GTK_CLIST(clist), 0, 50);
- gtk_clist_set_selection_mode(GTK_CLIST(clist), GTK_SELECTION_BROWSE);
- gtk_clist_set_sort_type(GTK_CLIST(clist), GTK_SORT_ASCENDING);
- gtk_clist_set_sort_column(GTK_CLIST(clist), 0);
- gtk_clist_set_auto_sort(GTK_CLIST(clist), TRUE);
-
- gtk_signal_connect(GTK_OBJECT(clist), "select_row",
- GTK_SIGNAL_FUNC(select_clist_row), NULL);
-
- gtk_widget_show(capplet);
-}
-
-void url_capplet_refill_clist(void) {
- GSList *l;
- GConfClient *client;
-
- gtk_clist_freeze(GTK_CLIST(clist));
- gtk_clist_clear(GTK_CLIST(clist));
-
- client = gconf_client_get_default ();
- l = gconf_client_all_entries (client, "/desktop/gnome/url-handlers", NULL);
- for (; l != NULL; l = l->next)
- {
- GConfEntry *e = l->data;
- gchar *key = g_strdup (e->key);
- gchar *value = g_strdup (gconf_value_get_string (gconf_entry_get_value (e)));
- gchar *filename = g_path_get_basename (key);
- int len = strlen(key);
-
- if (len > 5 && !strcmp(&key[len-5], "-show")) {
- gchar *row[2];
- gint id;
- /* it is a *-show key */
- key[len-5] = '\0';
- row[0] = filename;
- row[1] = value;
-
- id = gtk_clist_append(GTK_CLIST(clist), row);
- if (!g_strcasecmp(key, "default"))
- gtk_clist_select_row(GTK_CLIST(clist), id, 0);
- }
- g_free(key);
- g_free(value);
- g_free(filename);
- gconf_entry_free (e);
- }
- gtk_clist_thaw(GTK_CLIST(clist));
-
- g_slist_free (l);
- g_object_unref (G_OBJECT (client));
-}
-
-void url_capplet_commit(void) {
- gint num_rows, row;
- gchar *col1, *col2, *key;
- gchar *prefix = "/desktop/gnome/url-handlers/";
- GConfClient *client = gconf_client_get_default ();
- GSList *l;
-
- for (l = handlers_removed; l != NULL; l = l->next)
- {
- key = g_strconcat (prefix, l->data, "-show", NULL);
- gconf_client_unset (client, key, NULL);
- g_free (key);
- g_free (l->data);
- }
-
- g_slist_free (handlers_removed);
- handlers_removed = NULL;
-
- num_rows = GTK_CLIST(clist)->rows;
- for (row = 0; row < num_rows; row++) {
- gtk_clist_get_text(GTK_CLIST(clist), row, 0, &col1);
- gtk_clist_get_text(GTK_CLIST(clist), row, 1, &col2);
- key = g_strconcat (prefix, col1, "-show", NULL);
- gconf_client_set_string (client, key, col2, NULL);
- g_free(key);
- }
-
- g_object_unref (G_OBJECT (client));
-}
-
-void set_handler(GtkEntry *entry) {
- gint row, num_rows;
- gchar *col1, *prot, *cols[2];
-
- num_rows = GTK_CLIST(clist)->rows;
- prot = gtk_entry_get_text(GTK_ENTRY(protocol));
- for (row = 0; row < num_rows; row++) {
- gtk_clist_get_text(GTK_CLIST(clist), row, 0, &col1);
- if (!g_strcasecmp(prot, col1)) {
- gtk_clist_set_text(GTK_CLIST(clist), row, 1, gtk_entry_get_text(entry));
- state_changed ();
- return;
- }
- }
- /* prot not in clist */
- cols[0] = prot;
- cols[1] = gtk_entry_get_text(entry);
- gtk_clist_append(GTK_CLIST(clist), cols);
- state_changed ();
-}
-
-void remove_handler(GtkButton *button) {
- gint row, num_rows;
- gchar *col1, *prot;
-
- num_rows = GTK_CLIST(clist)->rows;
- prot = gtk_entry_get_text(GTK_ENTRY(protocol));
- for (row = 0; row < num_rows; row++) {
- gtk_clist_get_text(GTK_CLIST(clist), row, 0, &col1);
- if (!g_strcasecmp(prot, col1)) {
- handlers_removed = g_slist_prepend (handlers_removed, g_strdup (col1));
- gtk_clist_unselect_row(GTK_CLIST(clist), row, 0);
- gtk_clist_remove(GTK_CLIST(clist), row);
- state_changed ();
- gtk_entry_set_text(GTK_ENTRY(protocol), "");
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), "");
- if (num_rows > 1)
- gtk_clist_select_row(GTK_CLIST(clist), 0, 0);
- return;
- }
- }
-}
-
-void select_clist_row(GtkCList *clist, gint row, gint column) {
- gchar *col1, *col2;
-
- /* get column values */
- gtk_clist_get_text(GTK_CLIST(clist), row, 0, &col1);
- gtk_clist_get_text(GTK_CLIST(clist), row, 1, &col2);
-
- gtk_entry_set_text(GTK_ENTRY(protocol), col1);
-
- gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(combo)->entry), col2);
-}
-
-void state_changed (void)
-{
- gtk_dialog_set_response_sensitive (GTK_DIALOG (capplet), GTK_RESPONSE_APPLY,
- TRUE);
-}
-
-void response_cb (GtkDialog *dialog, GtkResponseType response, gpointer data)
-{
- switch (response)
- {
- case GTK_RESPONSE_NONE:
- case GTK_RESPONSE_CLOSE:
- gtk_main_quit ();
- break;
- case GTK_RESPONSE_APPLY:
- url_capplet_commit ();
- break;
- }
-}
diff --git a/capplets/url-properties/url-properties.desktop.in.in b/capplets/url-properties/url-properties.desktop.in.in
deleted file mode 100644
index 56d016931..000000000
--- a/capplets/url-properties/url-properties.desktop.in.in
+++ /dev/null
@@ -1,12 +0,0 @@
-[Desktop Entry]
-_Name=URL Handlers
-_Comment=Configure which programs are used to display URLs
-Exec=url-properties
-Icon=gnome-html.png
-Terminal=0
-Type=Application
-StartupNotify=true
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=other-capplets
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/url-properties/url-properties.glade b/capplets/url-properties/url-properties.glade
deleted file mode 100644
index e69de29bb..000000000
--- a/capplets/url-properties/url-properties.glade
+++ /dev/null
diff --git a/capplets/url-properties/url-properties_WITH_TRANSLATIONS b/capplets/url-properties/url-properties_WITH_TRANSLATIONS
deleted file mode 100644
index dfa336363..000000000
--- a/capplets/url-properties/url-properties_WITH_TRANSLATIONS
+++ /dev/null
@@ -1,57 +0,0 @@
-[Desktop Entry]
-Name=URL Handlers
-Name[pt_BR]=Manipuladores de URL
-Name[cs]=Obsluha URL
-Name[ca]=Gestors d'URLs
-Name[da]=Url-håndterer
-Name[de]=Öffnen von URLs
-Name[el]=ÖõëëïìÝôñçóç URL
-Name[es]=Navegador de URLs
-Name[et]=URL käsitlejad
-Name[fi]=URL-käsittely
-Name[fr]=Gestionnaires d'URLs
-Name[gl]=Xestores de URL
-Name[hu]=URL kezelõk
-Name[it]=Gestori URL
-Name[ja]=URL¥Ï¥ó¥É¥é
-Name[ko]=URL ó¸®
-Name[no]=URL-håndtering
-Name[pl]=Obs³uga URL
-Name[pt]=URL Handlers
-Name[ro]=Tratare URL-uri
-Name[ru]=ïÂÒÁÂÏÔÞÉËÉ URL
-Name[sl]=URL Upravniki
-Name[sv]=URL-hantering
-Name[tr]=URL yöneticileri
-Name[uk]=ïÂÒÏÂÎÉËÉ URL
-Name[wa]=Naivieu di hårdeyes (URLs)
-Comment=Configure which programs are used to display URLs
-Comment[pt_BR]=Configurar que programas são usados para mostrar URLs.
-Comment[cs]=Nastavení programù pro zobrazení URL
-Comment[ca]=Seleccionar quins programes usar per mostrar URLs.
-Comment[da]=Vælg hvilke programmer der skal bruges til at åbne url'er
-Comment[de]=Konfigurieren, womit URLs geöffnet werden
-Comment[el]=Ñõèìßæåé ðïéÜ ðñïãñÜììáôá èá äåß÷íïõí ôá URL
-Comment[es]=Configura cual programa usar para navegar por las URLs
-Comment[et]=Määrab, millised programmid käsitlevad milliseid URL protokolle
-Comment[fi]=Aseta, mitä ohjelmia käytetään URL:ien näyttämiseen
-Comment[fr]=Configuration des applications utilisées pour afficher les URLs
-Comment[gl]=Configura os programas que se van usar para amosar as URL
-Comment[hu]=A külömbözõ webhelyek-dokumentumok kezelésének beállítása
-Comment[it]=Impostazione dei programmi necessari per visualizzare le URL
-Comment[ja]=URL¤òɽ¼¨¤¹¤ë¥×¥í¥°¥é¥à¤ÎÀßÄê
-Comment[ko]=URLÀ» Ç¥½ÃÇÒ ¶§ »ç¿ëÇÒ ÇÁ·Î±×·¥ ¼±ÅÃ
-Comment[no]=Konfigurer hvilke programmer som brukes til å vise URL'er
-Comment[pl]=Konfiguracja programów do obs³ugi URL-i
-Comment[pt]=Permite configurar quais os programas usados para mostrar URLs
-Comment[ro]=Configuraþi ce programe sunt folosite pentru URL-uri
-Comment[ru]=ïÐÒÅÄÅÌÉÔØ ÐÒÏÇÒÁÍÍÕ ÄÌÑ ÐÏËÁÚÁ URL.
-Comment[sl]=Nastavi kateri programi naj se uporabijo za prikazovanje URLjev
-Comment[sv]=Konfigurera vilka program som används för att visa URL:er
-Comment[tr]=URL'leri gösterecek uygulamalarý belirtir
-Comment[uk]=÷ÉÚÎÁÞÅÎÎÑ ÐÒÏÇÒÁÍÉ ÄÌÑ ×¦ÄÏÂÒÁÖÅÎÎÑ URL
-Comment[wa]=Tchwezixhoz li programe ki vos voloz po naivyî sol rantoele daegnrece et po vey les hårdeyes
-Exec=url-properties
-Icon=gnome-html.png
-Terminal=0
-Type=Application
diff --git a/capplets/url-properties/url.desktop.in.in b/capplets/url-properties/url.desktop.in.in
deleted file mode 100644
index 41d585fc8..000000000
--- a/capplets/url-properties/url.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=URL Handlers
-_Comment=Configure which programs are used to display URLs
-Exec=url-properties
-Icon=gnome-html.png
-Terminal=0
-Type=Application
diff --git a/capplets/windows/.cvsignore b/capplets/windows/.cvsignore
deleted file mode 100644
index 366b1e5c7..000000000
--- a/capplets/windows/.cvsignore
+++ /dev/null
@@ -1,12 +0,0 @@
-Makefile
-Makefile.in
-.deps
-.libs
-*.o
-*.lo
-*.la
-gnome-window-properties
-window-properties.desktop
-window-properties.desktop.in
-*.oaf
-*.gladep
diff --git a/capplets/windows/ChangeLog b/capplets/windows/ChangeLog
deleted file mode 100644
index fc336f4cf..000000000
--- a/capplets/windows/ChangeLog
+++ /dev/null
@@ -1,392 +0,0 @@
-2005-01-02 Sebastien Bacher <seb128@debian.org>
-
- * gnome-window-properties.glade:
- patch from Heikki Paajanen <hepaajan@iki.fi> (based on the patch
- from Andrew Johnson <acjgenius@earthlink.net>)
- to not set "close" as the default button (Closes: #98202).
-
-2004-12-15 Sebastien Bacher <seb128@debian.org>
-
- * window-properties.desktop.in.in: changed the tooltip to respect
- the HIG.
-
-2004-11-09 Mark McLoughlin <mark@skynet.ie>
-
- * Makefile.am: install .desktop file in $(datadir)/applications
-
- * window-properties.desktop.in: add OnlyShowIn=GNOME;
-
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-08-20 Frederic Crozat <fcrozat@mandrakesoft.com>
-
- * gnome-window-properties.c: (main):
- Use themed icon for window hint.
-
-2004-07-06 Padraig O'Briain <padraig.obriain@sun.com>
-
- * gnome-window-properties.glade: Add mnemnoic widget for
- "Interval before raising" and add some label-for/labelled-by
- relations. Fixes bug #144586.
-
-Mon Jun 21 15:52:57 2004 Jonathan Blandford <jrb@gnome.org>
-
- * gnome-window-properties.c (set_alt_click_value): Set the radio
- group to be inconsistent if no matching modifier is found.
-
- * gnome-window-properties.c (reload_settings): Check for NULL,
- 141453
-
-2004-06-07 Kaushal Kumar <kaushal.kumar@wipro.com>
-
- * gnome-window-properties.c (response_cb): Associate the help
- button response with the appropriate callback.
- Fixes bug #141391.
-
-2004-05-30 Ole Laursen <olau@hardworking.dk>
-
- * gnome-window-properties.glade: Revamped the internal design and
- inserted headings to make the layout cleaner.
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-08-01 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-window-properties.glade: Patch to fix spacing between
- action area and vbox of preferences dialog.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-window-properties.glade: Make close the default
- button.
-
-2003-07-17 Dennis Cranston <dennis_cranston at yahoo com>
-
- * gnome-window-properties.glade: Minor HIG widget padding
- adjustments.
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-2003-04-30 Alex Duggan <aldug@astrolinux.com>
-
- * gnome-window-properties.c: use appropriate
- window border icon.
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-12-01 Havoc Pennington <hp@pobox.com>
-
- * gnome-window-properties.c: modify to use slider/radio instead of
- spinbutton/optionmenu.
-
- * gnome-window-properties.glade: make UI review changes
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-26 Havoc Pennington <hp@pobox.com>
-
- * gnome-window-properties.c: rewrite
-
- * Makefile.am (bin_PROGRAMS): remove metacity module, move to
- libwindow-settings
- (gnome_window_properties_LDADD): properly link to .la file for
- libgnome-window-settings, not the installed copy
-
-2002-10-21 Seth Nickell <snickell@stanford.edu>
-
- * gnome-window-properties.c: (setup_appearance_option_menu):
-
- Fix potential segfault.
-
-2002-10-21 Seth Nickell <snickell@stanford.edu>
-
- * gnome-window-properties.c: (update_gui):
-
- Fix segfault caused by a WM where the settings module
- wasn't found.
-
-2002-10-21 Seth Nickell <snickell@stanford.edu>
-
- Patch from sylvain_pasche@yahoo.fr
-
- * gnome-window-properties.c: (setup_appearance_option_menu):
-
- Fix bug that caused a segfault when the GConf theme key
- was missing.
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-31 Jacob Berkman <jacob@ximian.com>
-
- * metacity-window-manager.c: include sys/types.h before dirent.h
- and string.h
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-08-19 Ross Burton <ross@burtonini.com>
-
- * window-properties.desktop.in: Fix the desktop file so it
- validates.
-
-2002-08-08 jacob berkman <jacob@ximian.com>
-
- * metacity-window-manager.c (_MetacityWindowManagerPrivate): add
- padding so that it builds on non-gcc
-
-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
-
-2002-06-04 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
-
- Remove unused CFLAGS;
-
- * gnome-window-properties.c: (wm_widget_add_wm),
- (setup_appearance_option_menu):
-
- Improve handling of option menus, set the default item.
-
- * metacity-window-manager.c: (metacity_set_theme),
- (add_themes_from_dir), (metacity_get_theme_list),
- (metacity_set_font), (metacity_set_focus_follows_mouse),
- (metacity_window_manager_class_init):
-
- Actually do things when the "set" calls are made, improve
- intelligence of loading the theme list. Eventually we should
- probably do validation on the XML files.
-
-2002-06-04 Seth Nickell <snickell@stanford.edu>
-
- * gnome-window-properties.c: (set_wm_change_pending),
- (wm_selection_changed), (wm_widget_add_wm), (apply_wm),
- (setup_appearance_option_menu), (appearance_changed),
- (setup_dialog), (main):
- * gnome-window-properties.glade:
- * metacity-window-manager.c: (metacity_get_theme_list):
-
- Handle setting the currently running window manager properly.
-
- Get the theme list, and make changes based on it to the GConf setting.
-
-2002-06-02 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * gnome-window-properties.c: (wm_selection_changed),
- (wm_widget_add_wm), (update_gui), (apply_wm), (create_dialog),
- (main):
-
- Split code for changing window managers into libgnome-window-settings.
- This is so in the future we can potentially move this into gnome-settings-daemon,
- though for now its not robust enough that we really want to do that.
-
- * metacity-window-manager.c: (window_manager_new),
- (metacity_window_manager_init), (metacity_window_manager_finalize),
- (metacity_window_manager_class_init),
- (metacity_window_manager_get_type):
- * metacity-window-manager.h:
-
- Update to match changes to gnome-window-manager.h
-
- * wm-exec.c:
- * wm-list.c:
- * wm-properties.h:
-
- Move these into libgnome-window-settings.
-
- (Jacob, I did make dist, and then built the resulting tarball, hope I
- don't cause problems this time :-/)
-
-2002-05-30 Kjartan Maraas <kmaraas@gnome.org>
-
- * gnome-window-properties.c (main): Use GETTEXT_PACKAGE, not PACKAGE.
- Also add bind_textdomain_codeset() call.
- * gnome-window-properties.c: Fix some compiler warnings.
-
-2002-05-15 jacob berkman <jacob@ximian.com>
-
- * Makefile.am (libmetacity_la_SOURCES): remove
- gnome-window-manager.h
-
-2002-05-14 Seth Nickell <snickell@stanford.edu>
-
- * Makefile.am:
- * gnome-window-manager.c:
- * gnome-window-manager.h:
-
- Move into a seperate library so the settings daemon
- can avail of this code.
-
-2002-05-11 Seth Nickell <snickell@stanford.edu>
-
- * .cvsignore:
-
- Ignore gladep (grrr) files.
-
- * Makefile.am:
- * gnome-window-manager.c: (gnome_window_manager_new):
- * gnome-window-manager.h:
- * metacity-window-manager.c: (window_manager_new),
- (metacity_set_theme), (metacity_get_theme_list),
- (metacity_set_font), (metacity_get_focus_follows_mouse),
- (metacity_set_focus_follows_mouse), (finalize), (class_init),
- (init), (metacity_window_manager_get_type):
- * metacity-window-manager.h:
-
- First pass at adding settings modules.
-
- * window-capplet.png:
-
- Use the wm-properties icon.
-
- * wm-list.c: (wm_list_find), (wm_list_find_exec):
-
- Nix some warnings caused by non-use of const.
-
- * gnome-window-properties.c: (setup_dialog):
- * gnome-window-properties.glade:
-
- Tweak appearance some more.
-
-2002-05-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-window-properties.c: (setup_dialog), (main):
-
- Hook titlebar font into GConf key.
-
- * window-properties.desktop.in:
-
- Set title in .desktop file.
-
-2002-05-10 Seth Nickell <snickell@stanford.edu>
-
- * gnome-window-properties.c: (set_wm_change_pending),
- (state_changed), (create_dialog):
- * gnome-window-properties.glade:
-
- Make the glade file look a little bit better, hide the property widgets when
- there is a window manager change pending.
-
-2002-05-10 Seth Nickell <snickell@stanford.edu>
-
- * .cvsignore:
- * Makefile.am:
- * gnome-window-properties.c: (wm_selection_changed),
- (wm_widget_clear), (wm_widget_new), (wm_widget_add_wm),
- (response_cb), (state_changed), (restart_label_update),
- (restart_dialog_raise), (restart_dialog_destroyed),
- (show_restart_dialog), (hide_restart_dialog), (update_session),
- (init_session), (update_gui), (init_callback), (restart_finalize),
- (restart_failure), (show_restart_info), (restart_finish),
- (restart_callback), (restart), (revert_callback),
- (cancel_callback), (apply_wm), (create_dialog), (main):
- * gnome-window-properties.glade:
- * window-capplet.png:
- * window-properties.desktop.in:
- * wm-exec.c: (wm_is_running), (find_gnome_wm_window),
- (find_wm_window_from_client), (window_has_wm_state),
- (descendent_has_wm_state), (find_wm_window_from_hunt),
- (find_wm_window), (start_timeout), (start_do), (kill_timeout),
- (wm_restart), (wm_guess_current):
- * wm-list.c: (is_blank), (wm_compare), (wm_free),
- (wm_check_present), (wm_copy), (wm_list_find), (wm_list_find_exec),
- (wm_list_find_files), (wm_list_read_dir), (wm_list_init),
- (wm_list_save), (wm_list_revert), (wm_list_add), (wm_list_delete),
- (wm_list_set_current), (wm_list_get_current), (wm_list_get_revert),
- (wm_read_from_xml), (wm_list_read_from_xml), (wm_write_to_xml),
- (wm_list_write_to_xml), (xml_read_bool), (xml_write_bool):
- * wm-properties.h:
diff --git a/capplets/windows/Makefile.am b/capplets/windows/Makefile.am
deleted file mode 100644
index 1f9fa9271..000000000
--- a/capplets/windows/Makefile.am
+++ /dev/null
@@ -1,26 +0,0 @@
-bin_PROGRAMS = gnome-window-properties
-
-gnome_window_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) \
- $(top_builddir)/libwindow-settings/libgnome-window-settings.la
-
-gnome_window_properties_SOURCES = \
- gnome-window-properties.c
-
-@INTLTOOL_DESKTOP_RULE@
-
-gladedir = $(GNOMECC_GLADE_DIR)
-glade_DATA = gnome-window-properties.glade
-
-desktopdir = $(datadir)/applications
-Desktop_in_files = window-properties.desktop.in
-desktop_DATA = $(Desktop_in_files:.desktop.in=.desktop)
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS) \
- -I$(top_srcdir)/libwindow-settings \
- -DGNOME_WINDOW_MANAGER_MODULE_PATH=\""$(libdir)/window-manager-settings"\" \
- -DGLADEDIR=\""$(gladedir)"\" \
- -DPIXMAPDIR=\""$(pixmapdir)"\"
-
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES) $(Desktop_in_files) $(desktop_DATA)
-EXTRA_DIST = $(glade_DATA)
-
diff --git a/capplets/windows/gnome-window-properties.c b/capplets/windows/gnome-window-properties.c
deleted file mode 100644
index 9f3725f55..000000000
--- a/capplets/windows/gnome-window-properties.c
+++ /dev/null
@@ -1,706 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-
-/* gnome-window-properties.c
- * Copyright (C) 2002 Seth Nickell
- * Copyright (C) 2002 Red Hat, Inc.
- *
- * Written by: Seth Nickell <snickell@stanford.edu>
- * Havoc Pennington <hp@redhat.com>
- *
- * 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, or (at your option)
- * any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
- * 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glade/glade.h>
-#include <gnome-wm-manager.h>
-
-#include "capplet-util.h"
-#include "gconf-property-editor.h"
-
-typedef struct
-{
- int number;
- char *name;
- const char *value; /* machine-readable name for storing config */
- GtkWidget *radio;
-} MouseClickModifier;
-
-static GladeXML *dialog;
-static GnomeWindowManager *current_wm; /* may be NULL */
-static GtkWidget *dialog_win;
-static GtkWidget *focus_mode_checkbutton;
-static GtkWidget *autoraise_checkbutton;
-static GtkWidget *autoraise_delay_slider;
-static GtkWidget *autoraise_delay_hbox;
-static GtkWidget *double_click_titlebar_optionmenu;
-static GtkWidget *double_click_titlebar_hbox;
-static GtkWidget *alt_click_hbox;
-
-static GnomeWMSettings *settings;
-static const GnomeWMDoubleClickAction *double_click_actions = NULL;
-static int n_double_click_actions = 0;
-
-static MouseClickModifier *mouse_modifiers = NULL;
-static int n_mouse_modifiers = 0;
-
-static void reload_mouse_modifiers (void);
-
-static void
-mouse_focus_toggled_callback (GtkWidget *button,
- void *data)
-{
- GnomeWMSettings new_settings;
-
- new_settings.flags = GNOME_WM_SETTING_MOUSE_FOCUS;
- new_settings.focus_follows_mouse =
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
-
- if (current_wm != NULL && new_settings.focus_follows_mouse != settings->focus_follows_mouse)
- gnome_window_manager_change_settings (current_wm, &new_settings);
-}
-
-static void
-autoraise_toggled_callback (GtkWidget *button,
- void *data)
-{
- GnomeWMSettings new_settings;
-
- new_settings.flags = GNOME_WM_SETTING_AUTORAISE;
- new_settings.autoraise =
- gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (button));
-
- if (current_wm != NULL && new_settings.autoraise != settings->autoraise)
- gnome_window_manager_change_settings (current_wm, &new_settings);
-
-}
-
-static void
-autoraise_delay_value_changed_callback (GtkWidget *slider,
- void *data)
-{
- GnomeWMSettings new_settings;
-
- new_settings.flags = GNOME_WM_SETTING_AUTORAISE_DELAY;
- new_settings.autoraise_delay =
- gtk_range_get_value (GTK_RANGE (slider)) * 1000;
-
- if (current_wm != NULL && new_settings.autoraise_delay != settings->autoraise_delay)
- gnome_window_manager_change_settings (current_wm, &new_settings);
-}
-
-static void
-double_click_titlebar_changed_callback (GtkWidget *optionmenu,
- void *data)
-{
- GnomeWMSettings new_settings;
-
- new_settings.flags = GNOME_WM_SETTING_DOUBLE_CLICK_ACTION;
- new_settings.double_click_action =
- gtk_option_menu_get_history (GTK_OPTION_MENU (optionmenu));
-
- if (current_wm != NULL && new_settings.double_click_action != settings->double_click_action)
- gnome_window_manager_change_settings (current_wm, &new_settings);
-}
-
-#if 0
-/* This was for option menu */
-static void
-alt_click_modifier_changed_callback (GtkWidget *optionmenu,
- void *data)
-{
- GnomeWMSettings new_settings;
- int history;
-
- new_settings.flags = GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER;
- history = gtk_option_menu_get_history (GTK_OPTION_MENU (optionmenu));
-
- if (history >= n_mouse_modifiers) /* paranoia */
- return;
-
- new_settings.mouse_move_modifier = mouse_modifiers[history].value;
-
- if (current_wm != NULL &&
- strcmp (new_settings.mouse_move_modifier,
- settings.mouse_move_modifier) != 0)
- gnome_window_manager_change_settings (current_wm, &new_settings);
-}
-#else
-static void
-alt_click_radio_toggled_callback (GtkWidget *radio,
- void *data)
-{
- GnomeWMSettings new_settings;
- gboolean active;
- MouseClickModifier *modifier = data;
-
- new_settings.flags = GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER;
- active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (radio));
-
- if (active && current_wm != NULL) {
- new_settings.mouse_move_modifier = modifier->value;
-
- if ((settings->mouse_move_modifier == NULL) ||
- (strcmp (new_settings.mouse_move_modifier,
- settings->mouse_move_modifier) != 0))
- gnome_window_manager_change_settings (current_wm, &new_settings);
- }
-}
-#endif
-
-static void
-update_sensitivity (void)
-{
- gtk_widget_set_sensitive (autoraise_checkbutton,
- settings->focus_follows_mouse);
-
- gtk_widget_set_sensitive (autoraise_delay_hbox,
- settings->focus_follows_mouse && settings->autoraise);
-
- gtk_widget_set_sensitive (double_click_titlebar_optionmenu,
- n_double_click_actions > 1);
-
- /* disable the whole dialog while no WM is running, or
- * a WM we don't understand is running. We should probably do
- * something better. I don't want to just launch the config tool
- * as we would on startup though, because then you'd get weirdness
- * in the gap time between old and new WM.
- */
- gtk_widget_set_sensitive (dialog_win, current_wm != NULL);
-}
-
-static void
-init_settings_struct (GnomeWMSettings *settings)
-{
- /* Init fields that weren't initialized */
- if ((settings->flags & GNOME_WM_SETTING_MOUSE_FOCUS) == 0)
- settings->focus_follows_mouse = FALSE;
-
- if ((settings->flags & GNOME_WM_SETTING_AUTORAISE) == 0)
- settings->autoraise = FALSE;
-
- if ((settings->flags & GNOME_WM_SETTING_AUTORAISE_DELAY) == 0)
- settings->autoraise_delay = 1000;
-
- if ((settings->flags & GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER) == 0)
- settings->mouse_move_modifier = "Super";
-
- if ((settings->flags & GNOME_WM_SETTING_DOUBLE_CLICK_ACTION) == 0)
- settings->double_click_action = 0;
-}
-
-static void
-set_alt_click_value (const GnomeWMSettings *settings)
-{
- gboolean match_found = FALSE;
- int i;
-
- /* We look for a matching modifier and set it. */
- if (settings->mouse_move_modifier != NULL) {
- for (i = 0; i < n_mouse_modifiers; i ++)
- if (strcmp (mouse_modifiers[i].value,
- settings->mouse_move_modifier) == 0) {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (mouse_modifiers[i].radio),
- TRUE);
- match_found = TRUE;
- break;
- }
- }
-
- /* No matching modifier was found; we set all the toggle buttons to be
- * insensitive. */
- for (i = 0; i < n_mouse_modifiers; i++) {
- gtk_toggle_button_set_inconsistent (GTK_TOGGLE_BUTTON (mouse_modifiers[i].radio),
- ! match_found);
- }
-}
-
-static void
-rebuild_double_click_actions_menu (void)
-{
- int i;
- GtkWidget *menu;
-
- menu = gtk_menu_new ();
- i = 0;
- while (i < n_double_click_actions) {
- GtkWidget *mi;
-
- mi = gtk_menu_item_new_with_label (double_click_actions[i].human_readable_name);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- mi);
-
- gtk_widget_show (mi);
-
- ++i;
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
- menu);
-}
-
-static void
-reload_settings (void)
-{
- GnomeWMSettings new_settings;
-
- g_assert (n_mouse_modifiers > 0);
-
- if (current_wm != NULL) {
- new_settings.flags = GNOME_WM_SETTING_MOUSE_FOCUS |
- GNOME_WM_SETTING_AUTORAISE |
- GNOME_WM_SETTING_AUTORAISE_DELAY |
- GNOME_WM_SETTING_MOUSE_MOVE_MODIFIER |
- GNOME_WM_SETTING_DOUBLE_CLICK_ACTION;
-
- /* this will clear any flags that don't get filled in */
- gnome_window_manager_get_settings (current_wm, &new_settings);
- } else {
- new_settings.flags = 0;
- }
-
- init_settings_struct (&new_settings);
-
- if (new_settings.focus_follows_mouse != settings->focus_follows_mouse)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (focus_mode_checkbutton),
- new_settings.focus_follows_mouse);
-
- if (new_settings.autoraise != settings->autoraise)
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autoraise_checkbutton),
- new_settings.autoraise);
-
- if (new_settings.autoraise_delay != settings->autoraise_delay)
- gtk_range_set_value (GTK_RANGE (autoraise_delay_slider),
- new_settings.autoraise_delay / 1000.0);
-
- if (n_double_click_actions > 0 &&
- new_settings.double_click_action != settings->double_click_action) {
- gtk_option_menu_set_history (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
- new_settings.double_click_action);
- }
-
- if (settings->mouse_move_modifier == NULL ||
- new_settings.mouse_move_modifier == NULL ||
- strcmp (settings->mouse_move_modifier,
- new_settings.mouse_move_modifier) != 0) {
- set_alt_click_value (&new_settings);
- }
-
- gnome_wm_settings_free (settings);
- settings = gnome_wm_settings_copy (&new_settings);
-
- update_sensitivity ();
-}
-
-static void
-wm_settings_changed_callback (GnomeWindowManager *wm,
- void *data)
-{
- reload_settings ();
-}
-
-static void
-update_wm (GdkScreen *screen,
- gboolean load_settings)
-{
- g_assert (n_mouse_modifiers > 0);
-
- if (current_wm != NULL) {
- g_signal_handlers_disconnect_by_func (G_OBJECT (current_wm),
- G_CALLBACK (wm_settings_changed_callback),
- NULL);
- current_wm = NULL;
- double_click_actions = NULL;
- n_double_click_actions = 0;
- }
-
- current_wm = gnome_wm_manager_get_current (screen);
-
- if (current_wm != NULL) {
- g_signal_connect (G_OBJECT (current_wm), "settings_changed",
- G_CALLBACK (wm_settings_changed_callback), NULL);
-
- gnome_window_manager_get_double_click_actions (current_wm,
- &double_click_actions,
- &n_double_click_actions);
-
- }
-
- rebuild_double_click_actions_menu ();
- if (load_settings)
- reload_settings ();
-}
-
-static void
-wm_changed_callback (GdkScreen *screen,
- void *data)
-{
- update_wm (screen, TRUE);
-}
-
-static void
-response_cb (GtkWidget *dialog_win,
- int response_id,
- void *data)
-{
-
- if (response_id == GTK_RESPONSE_HELP) {
- capplet_help (GTK_WINDOW (dialog_win),
- "user-guide.xml",
- "goscustdesk-58");
- } else {
- gtk_widget_destroy (dialog_win);
- }
-}
-
-static void
-try_spawn_config_tool (GdkScreen *screen)
-{
- GError *error;
-
- error = NULL;
- gnome_wm_manager_spawn_config_tool_for_current (screen, &error);
-
- if (error != NULL) {
- GtkWidget *no_tool_dialog;
- char *str;
- char *escaped;
-
- escaped = g_markup_escape_text (error->message, -1);
-
- str = g_strdup_printf (_("<b>Cannot start the preferences application for your window manager</b>\n\n%s"),
- escaped);
- g_free (escaped);
-
- no_tool_dialog =
- gtk_message_dialog_new (NULL,
- GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_MESSAGE_ERROR,
- GTK_BUTTONS_CLOSE,
- " ");
- gtk_window_set_title (GTK_WINDOW (no_tool_dialog), "");
- gtk_window_set_resizable (GTK_WINDOW (no_tool_dialog), FALSE);
-
- gtk_label_set_markup (GTK_LABEL (GTK_MESSAGE_DIALOG (no_tool_dialog)->label),
- str);
-
- g_free (str);
-
- gtk_dialog_run (GTK_DIALOG (no_tool_dialog));
-
- gtk_widget_destroy (no_tool_dialog);
- g_error_free (error);
-
- exit (1);
- }
-
- /* exit, let the config tool handle it */
- exit (0);
-}
-
-int
-main (int argc, char **argv)
-{
- GdkScreen *screen;
- GnomeWMSettings new_settings;
- int i;
-
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gnome_program_init ("gnome-window-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- NULL);
-
- gnome_wm_manager_init ();
-
- screen = gdk_display_get_default_screen (gdk_display_get_default ());
-
- current_wm = gnome_wm_manager_get_current (screen);
-
- if (current_wm == NULL) {
- try_spawn_config_tool (screen);
- return 0;
- }
-
- dialog = glade_xml_new (GLADEDIR "/gnome-window-properties.glade",
- "main-dialog", GETTEXT_PACKAGE);
-
- if (dialog == NULL) {
- g_warning ("Missing glade file for gnome-window-properties");
- exit (1);
- }
-
- dialog_win = WID ("main-dialog");
- focus_mode_checkbutton = WID ("focus-mode-checkbutton");
- autoraise_checkbutton = WID ("autoraise-checkbutton");
- autoraise_delay_slider = WID ("autoraise-delay-slider");
- autoraise_delay_hbox = WID ("autoraise-delay-hbox");
- double_click_titlebar_optionmenu = WID ("double-click-titlebar-optionmenu");
- double_click_titlebar_hbox = WID ("double-click-titlebar-hbox");
- alt_click_hbox = WID ("alt-click-box");
-
- gtk_range_set_range (GTK_RANGE (autoraise_delay_slider),
- 0, 10);
-
- gtk_range_set_increments (GTK_RANGE (autoraise_delay_slider),
- 0.2, 1.0);
-
-#if 0
- size_group = gtk_size_group_new (GTK_SIZE_GROUP_HORIZONTAL);
- gtk_size_group_add_widget (size_group, double_click_titlebar_optionmenu);
- gtk_size_group_add_widget (size_group, alt_click_optionmenu);
- g_object_unref (G_OBJECT (size_group));
-#endif
-
- new_settings.flags = 0;
- init_settings_struct (&new_settings);
- settings = gnome_wm_settings_copy (&new_settings);
-
- reload_mouse_modifiers ();
- update_wm (screen, FALSE);
-
- set_alt_click_value (&new_settings);
- gtk_range_set_value (GTK_RANGE (autoraise_delay_slider),
- new_settings.autoraise_delay / 1000.0);
- gtk_option_menu_set_history (GTK_OPTION_MENU (double_click_titlebar_optionmenu),
- new_settings.double_click_action);
-
- reload_settings (); /* must come before below signal connections */
-
- g_signal_connect (G_OBJECT (dialog_win), "response",
- G_CALLBACK (response_cb), NULL);
-
- g_signal_connect (G_OBJECT (dialog_win), "destroy",
- G_CALLBACK (gtk_main_quit), NULL);
-
-
- g_signal_connect (G_OBJECT (focus_mode_checkbutton), "toggled",
- G_CALLBACK (mouse_focus_toggled_callback), NULL);
-
- g_signal_connect (G_OBJECT (autoraise_checkbutton), "toggled",
- G_CALLBACK (autoraise_toggled_callback), NULL);
-
- g_signal_connect (G_OBJECT (autoraise_delay_slider), "value_changed",
- G_CALLBACK (autoraise_delay_value_changed_callback), NULL);
-
- g_signal_connect (G_OBJECT (double_click_titlebar_optionmenu), "changed",
- G_CALLBACK (double_click_titlebar_changed_callback), NULL);
-
- g_signal_connect (G_OBJECT (screen), "window_manager_changed",
- G_CALLBACK (wm_changed_callback), NULL);
-
- i = 0;
- while (i < n_mouse_modifiers) {
- g_signal_connect (G_OBJECT (mouse_modifiers[i].radio), "toggled",
- G_CALLBACK (alt_click_radio_toggled_callback),
- &mouse_modifiers[i]);
- ++i;
- }
-
- capplet_set_icon (dialog_win, "gnome-window-manager");
- gtk_widget_show (dialog_win);
-
- gtk_main ();
-
- return 0;
-}
-
-#include <X11/Xlib.h>
-#include <X11/keysym.h>
-#include <gdk/gdkx.h>
-
-static void
-fill_radio (GtkRadioButton *group,
- MouseClickModifier *modifier)
-{
- modifier->radio =
- gtk_radio_button_new_with_label_from_widget (group,
- modifier->name);
- gtk_box_pack_start (GTK_BOX (alt_click_hbox),
- modifier->radio, FALSE, FALSE, 0);
-
- gtk_widget_show (modifier->radio);
-}
-
-static void
-reload_mouse_modifiers (void)
-{
- XModifierKeymap *modmap;
- KeySym *keymap;
- int keysyms_per_keycode;
- int map_size;
- int i;
- gboolean have_meta;
- gboolean have_hyper;
- gboolean have_super;
- int min_keycode, max_keycode;
- int mod_meta, mod_super, mod_hyper;
-
- XDisplayKeycodes (gdk_display,
- &min_keycode,
- &max_keycode);
-
- keymap = XGetKeyboardMapping (gdk_display,
- min_keycode,
- max_keycode - min_keycode,
- &keysyms_per_keycode);
-
- modmap = XGetModifierMapping (gdk_display);
-
- have_super = FALSE;
- have_meta = FALSE;
- have_hyper = FALSE;
-
- /* there are 8 modifiers, and the first 3 are shift, shift lock,
- * and control
- */
- map_size = 8 * modmap->max_keypermod;
- i = 3 * modmap->max_keypermod;
- mod_meta = mod_super = mod_hyper = 0;
- while (i < map_size) {
- /* get the key code at this point in the map,
- * see if its keysym is one we're interested in
- */
- int keycode = modmap->modifiermap[i];
-
- if (keycode >= min_keycode &&
- keycode <= max_keycode) {
- int j = 0;
- KeySym *syms = keymap + (keycode - min_keycode) * keysyms_per_keycode;
-
- while (j < keysyms_per_keycode) {
- if (syms[j] == XK_Super_L ||
- syms[j] == XK_Super_R)
- mod_super = i / modmap->max_keypermod;
- else if (syms[j] == XK_Hyper_L ||
- syms[j] == XK_Hyper_R)
- mod_hyper = i / modmap->max_keypermod;
- else if ((syms[j] == XK_Meta_L ||
- syms[j] == XK_Meta_R))
- mod_meta = i / modmap->max_keypermod;
- ++j;
- }
- }
-
- ++i;
- }
-
- if ((1 << mod_meta) != Mod1Mask)
- have_meta = TRUE;
- if (mod_super != 0 &&
- mod_super != mod_meta)
- have_super = TRUE;
- if (mod_hyper != 0 &&
- mod_hyper != mod_meta &&
- mod_hyper != mod_super)
- have_hyper = TRUE;
-
- XFreeModifiermap (modmap);
- XFree (keymap);
-
- i = 0;
- while (i < n_mouse_modifiers) {
- g_free (mouse_modifiers[i].name);
- if (mouse_modifiers[i].radio)
- gtk_widget_destroy (mouse_modifiers[i].radio);
- ++i;
- }
- g_free (mouse_modifiers);
- mouse_modifiers = NULL;
-
-
- n_mouse_modifiers = 2; /* control, alt */
- if (have_super)
- ++n_mouse_modifiers;
- if (have_hyper)
- ++n_mouse_modifiers;
- if (have_meta)
- ++n_mouse_modifiers;
-
- g_free (mouse_modifiers);
-
- mouse_modifiers = g_new0 (MouseClickModifier, n_mouse_modifiers);
-
- i = 0;
-
- mouse_modifiers[i].number = i;
- mouse_modifiers[i].name = g_strdup (_("Control"));
- mouse_modifiers[i].value = "Control";
- ++i;
-
- mouse_modifiers[i].number = i;
- mouse_modifiers[i].name = g_strdup (_("Alt"));
- mouse_modifiers[i].value = "Alt";
- ++i;
-
- if (have_hyper) {
- mouse_modifiers[i].number = i;
- mouse_modifiers[i].name = g_strdup (_("Hyper"));
- mouse_modifiers[i].value = "Hyper";
- ++i;
- }
-
- if (have_super) {
- mouse_modifiers[i].number = i;
- mouse_modifiers[i].name = g_strdup (_("Super (or \"Windows logo\")"));
- mouse_modifiers[i].value = "Super";
- ++i;
- }
-
- if (have_meta) {
- mouse_modifiers[i].number = i;
- mouse_modifiers[i].name = g_strdup (_("Meta"));
- mouse_modifiers[i].value = "Meta";
- ++i;
- }
-
- g_assert (i == n_mouse_modifiers);
-
- i = 0;
- while (i < n_mouse_modifiers) {
- fill_radio (i == 0 ? NULL : GTK_RADIO_BUTTON (mouse_modifiers[i-1].radio),
- &mouse_modifiers[i]);
- ++i;
- }
-
-#if 0
- /* Build modifier option menu */
- {
- GtkWidget *menu;
-
- menu = gtk_menu_new ();
- i = 0;
- while (i < n_mouse_modifiers) {
- GtkWidget *mi;
-
- mi = gtk_menu_item_new_with_label (mouse_modifiers[i].name);
- gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- mi);
-
- gtk_widget_show (mi);
-
- ++i;
- }
-
- gtk_option_menu_set_menu (GTK_OPTION_MENU (alt_click_optionmenu),
- menu);
- }
-#endif
-}
diff --git a/capplets/windows/gnome-window-properties.glade b/capplets/windows/gnome-window-properties.glade
deleted file mode 100644
index e5af2b47d..000000000
--- a/capplets/windows/gnome-window-properties.glade
+++ /dev/null
@@ -1,507 +0,0 @@
-<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
-<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
-
-<glade-interface>
-<requires lib="gnome"/>
-
-<widget class="GtkDialog" id="main-dialog">
- <property name="border_width">5</property>
- <property name="title" translatable="yes">Window Preferences</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">False</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="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</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">5</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">24</property>
-
- <child>
- <widget class="GtkVBox" id="vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Window Selection&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox3">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkCheckButton" id="focus-mode-checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Select windows when the mouse moves over them</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox9">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox4">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkCheckButton" id="autoraise-checkbutton">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Raise selected windows after an interval</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="autoraise-delay-hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="autoraise-delay-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Interval before raising:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">autoraise-delay-slider</property>
- <accessibility>
- <atkrelation target="autoraise-delay-slider" type="label-for"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox10">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHScale" id="autoraise-delay-slider">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="draw_value">True</property>
- <property name="value_pos">GTK_POS_RIGHT</property>
- <property name="digits">1</property>
- <property name="update_policy">GTK_UPDATE_CONTINUOUS</property>
- <property name="inverted">False</property>
- <property name="adjustment">7.7 0 10 0.2 1 0</property>
- <accessibility>
- <atkrelation target="autoraise-delay-label" type="labelled-by"/>
- <atkrelation target="label1" type="labelled-by"/>
- </accessibility>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property name="label" translatable="yes">seconds</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">4</property>
- <property name="ypad">0</property>
- <accessibility>
- <atkrelation target="autoraise-delay-slider" type="label-for"/>
- </accessibility>
- </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">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">18</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">18</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="label3">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Titlebar Action&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox11">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkHBox" id="double-click-titlebar-hbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
-
- <child>
- <widget class="GtkLabel" id="double-click-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Double-click titlebar to perform this action:</property>
- <property name="use_underline">True</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</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="mnemonic_widget">double-click-titlebar-optionmenu</property>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkOptionMenu" id="double-click-titlebar-optionmenu">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="history">-1</property>
-
- <child>
- <widget class="GtkMenu" id="menu1">
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">18</property>
- <property name="expand">True</property>
- <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>
- </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">12</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Movement Key&lt;/b&gt;</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkHBox" id="hbox14">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
-
- <child>
- <widget class="GtkLabel" id="alt-click-label">
- <property name="visible">True</property>
- <property name="label" translatable="yes">To _move a window, press-and-hold this key then grab the window:</property>
- <property name="use_underline">True</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</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>
-
- <child>
- <widget class="GtkHBox" id="hbox15">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <widget class="GtkVBox" id="alt-click-box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="padding">18</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </widget>
- <packing>
- <property name="padding">18</property>
- <property name="expand">True</property>
- <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>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <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>
- </widget>
- </child>
-</widget>
-
-</glade-interface>
diff --git a/capplets/windows/window-properties.desktop.in.in b/capplets/windows/window-properties.desktop.in.in
deleted file mode 100644
index f7bd72e77..000000000
--- a/capplets/windows/window-properties.desktop.in.in
+++ /dev/null
@@ -1,15 +0,0 @@
-[Desktop Entry]
-Encoding=UTF-8
-_Name=Windows
-_Comment=Set your window properties
-Exec=gnome-window-properties
-Icon=gnome-window-manager
-Terminal=false
-Type=Application
-StartupNotify=true
-Categories=GNOME;Application;Settings;
-OnlyShowIn=GNOME;
-X-GNOME-Bugzilla-Bugzilla=GNOME
-X-GNOME-Bugzilla-Product=control-center
-X-GNOME-Bugzilla-Component=Window preferences
-X-GNOME-Bugzilla-Version=@VERSION@
diff --git a/capplets/wm-properties/ChangeLog b/capplets/wm-properties/ChangeLog
deleted file mode 100644
index 607eb7e1f..000000000
--- a/capplets/wm-properties/ChangeLog
+++ /dev/null
@@ -1,138 +0,0 @@
-2004-10-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.8.1
-
-2004-04-15 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.1
-
-2004-04-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.3
-
-2004-03-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0.1
-
-2004-03-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.6.0
-
-2004-03-11 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.4
-
-2004-02-13 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.3
-
-2004-01-14 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.2
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1.1
-
-2003-12-30 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.1
-
-2003-10-28 Jody Goldberg <jody@gnome.org>
-
- * Release 2.5.0
-
-2003-07-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.4
-
-2003-06-24 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.3
-
-2003-05-07 Jody Goldberg <jody@gnome.org>
-
- * Release 2.3.1
-
-Tue Feb 4 17:09:18 2003 Jonathan Blandford <jrb@redhat.com>
-
- * Release 2.2.0.1
-
-Tue Jan 21 01:15:14 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.2.0
-
-Thu Jan 16 02:41:09 2003 Jonathan Blandford <jrb@gnome.org>
-
- * Release 2.1.7
-
-2003-01-10 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.6
-
-2002-12-18 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.5
-
-2002-11-23 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.3
-
-2002-11-02 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.2
-
-2002-10-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.1
-
-2002-10-01 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0.1
-
-2002-08-21 Jody Goldberg <jody@gnome.org>
-
- * Release 2.1.0
-
-2002-06-17 Jody Goldberg <jody@gnome.org>
-
- * Release 2.0.0
-
-2001-12-08 Richard Hestilow <hestilow@ximian.com>
-
- * Port to GConf, away from libcapplet.
-
-2001-09-29 Richard Hestilow <hestilow@ximian.com>
-
- * wm-properties-capplet.c: Applied patch from drk@sgi.com
- to fix bug #60822.
-
-2001-09-29 Richard Hestilow <hestilow@ximian.com>
-
- * wm-list.c (wm_list_read_dir): Check if config_tryexec is blank,
- and if it is, free it and set it to NULL.
- (wm_check_present): If there is no config_tryexec, fall back
- on checking the path of the config_exec. Fix for bug #58306.
-
-2001-09-05 Abel Cheung <maddog@linux.org.hk>
-
- * wm.desktop.in.in: Rename zh_TW.Big5 to zh_TW .
-2001-07-27 Bradford Hovinen <hovinen@ximian.com>
-
- * RELEASE : 1.5.2
-
-2001-07-24 Chema Celorio <chema@celorio.com>
-
- * wm-properties-capplet.c (wm_setup): add a label and set the usize
-
-2001-07-20 Chema Celorio <chema@celorio.com>
-
- * RELEASE : 1.5.0
-
-2001-07-19 Chema Celorio <chema@celorio.com>
-
- * wm-desktops/Makefile.am (wms): distcheck fixes
-
-2001-07-19 Carlos Perelló Marín <carlos@gnome-db.org>
-
- * wm-desktops/*.desktop: Adapted to use xml-i18n-tools
diff --git a/capplets/wm-properties/Makefile.am b/capplets/wm-properties/Makefile.am
deleted file mode 100644
index 43510617c..000000000
--- a/capplets/wm-properties/Makefile.am
+++ /dev/null
@@ -1,33 +0,0 @@
-SUBDIRS = wm-desktops
-
-cappletname = wm
-cappletgroup = "Advanced/"
-bin_PROGRAMS = wm-properties-capplet
-
-wm_properties_capplet_LDADD = $(GNOMECC_CAPPLETS_LIBS)
-wm_properties_capplet_SOURCES = \
- wm-properties.h \
- wm-properties-capplet.c \
- wm-list.c \
- wm-exec.c \
- gnome-startup.c \
- gnome-startup.h
-
-pixmap_DATA =
-
-##
-## You should not need to modify anything below this line
-##
-@INTLTOOL_DESKTOP_RULE@
-@GNOMECC_CAPPLETS_DESKTOP_IN_RULE@
-
-INCLUDES = $(GNOMECC_CAPPLETS_CFLAGS)
-CLEANFILES = $(GNOMECC_CAPPLETS_CLEANFILES)
-EXTRA_DIST = $(GNOMECC_CAPPLETS_EXTRA_DIST)
-iconsdir = $(GNOMECC_ICONS_DIR)
-Gladedir = $(GNOMECC_GLADE_DIR)
-pixmapdir = $(GNOMECC_PIXMAPS_DIR)
-Glade_DATA = $(cappletname)-properties.glade
-icons_DATA = $(cappletname)-capplet.png
-desktop = $(cappletname).desktop
-all-local: $(desktop)
diff --git a/capplets/wm-properties/wm-capplet.png b/capplets/wm-properties/wm-capplet.png
deleted file mode 100644
index ef95bcd47..000000000
--- a/capplets/wm-properties/wm-capplet.png
+++ /dev/null
Binary files differ
diff --git a/capplets/wm-properties/wm-desktops/Enlightenment.desktop.in.in b/capplets/wm-properties/wm-desktops/Enlightenment.desktop.in.in
deleted file mode 100644
index 1d9d0a199..000000000
--- a/capplets/wm-properties/wm-desktops/Enlightenment.desktop.in.in
+++ /dev/null
@@ -1,9 +0,0 @@
-[Desktop Entry]
-_Name=Enlightenment
-Exec=enlightenment
-TryExec=enlightenment
-
-[Window Manager]
-ConfigExec=e-conf
-ConfigTryExec=e-conf
-SessionManaged=true
diff --git a/capplets/wm-properties/wm-desktops/IceWM.desktop.in.in b/capplets/wm-properties/wm-desktops/IceWM.desktop.in.in
deleted file mode 100644
index e12d1a9c0..000000000
--- a/capplets/wm-properties/wm-desktops/IceWM.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Ice WM
-Exec=icewm
-TryExec=icewm
-
-[Window Manager]
-SessionManaged=true
diff --git a/capplets/wm-properties/wm-desktops/Makefile.am b/capplets/wm-properties/wm-desktops/Makefile.am
deleted file mode 100644
index 18bf50b46..000000000
--- a/capplets/wm-properties/wm-desktops/Makefile.am
+++ /dev/null
@@ -1,21 +0,0 @@
-wms = \
- Enlightenment \
- IceWM \
- Scwm \
- WindowMaker \
- twm
-
-desktop_files = $(wms:=.desktop)
-desktop_in_files = $(desktop_files:.desktop=.desktop.in)
-desktop_in_in_files = $(desktop_files:.desktop=.desktop.in.in)
-
-wmdatadir = $(datadir)/gnome/wm-properties
-wmdata_DATA = $(desktop_files)
-
-EXTRA_DIST = $(desktop_in_in_files)
-
-$(desktop_in_files): %.desktop.in: %.desktop.in.in
- sed s#Icon=#Icon=$(GNOMECC_ICONS_DIR)/# < $< > $@
-
-$(desktop_files): %.desktop: %.desktop.in
- $(top_builddir)/intltool-merge -d $(top_srcdir)/po $< $@
diff --git a/capplets/wm-properties/wm-desktops/Scwm.desktop.in.in b/capplets/wm-properties/wm-desktops/Scwm.desktop.in.in
deleted file mode 100644
index 88e0a8c30..000000000
--- a/capplets/wm-properties/wm-desktops/Scwm.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=Scwm
-Exec=scwm
-TryExec=scwm
-
-[Window Manager]
-SessionManaged=true
diff --git a/capplets/wm-properties/wm-desktops/WindowMaker.desktop.in.in b/capplets/wm-properties/wm-desktops/WindowMaker.desktop.in.in
deleted file mode 100644
index 7e1cde50e..000000000
--- a/capplets/wm-properties/wm-desktops/WindowMaker.desktop.in.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-_Name=Window Maker
-Exec=wmaker
-TryExec=wmaker
-
-[Window Manager]
-SessionManaged=false
-ConfigExec=/usr/X11R6/lib/GNUstep/Apps/WPrefs.app/WPrefs
diff --git a/capplets/wm-properties/wm-desktops/twm.desktop.in.in b/capplets/wm-properties/wm-desktops/twm.desktop.in.in
deleted file mode 100644
index 45aef35a9..000000000
--- a/capplets/wm-properties/wm-desktops/twm.desktop.in.in
+++ /dev/null
@@ -1,7 +0,0 @@
-[Desktop Entry]
-_Name=twm
-Exec=twm
-TryExec=twm
-
-[Window Manager]
-SessionManaged=false
diff --git a/capplets/wm-properties/wm-exec.c b/capplets/wm-properties/wm-exec.c
deleted file mode 100644
index f24fdf362..000000000
--- a/capplets/wm-properties/wm-exec.c
+++ /dev/null
@@ -1,331 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Code available under the Gnu GPL.
- * Authors: Owen Taylor <otaylor@redhat.com>
- */
-
-#include <gtk/gtk.h>
-#include <gdk/gdkx.h>
-#include <libgnome/libgnome.h>
-#include "wm-properties.h"
-
-typedef struct _RestartInfo RestartInfo;
-
-struct _RestartInfo {
- GnomeDesktopItem *dentry;
- gint retries;
- WMResultFunc callback;
- gpointer data;
-};
-
-gboolean
-wm_is_running (void)
-{
- gboolean result;
- guint old_mask;
- XWindowAttributes attrs;
-
- gdk_error_trap_push ();
-
- XGetWindowAttributes (GDK_DISPLAY(), GDK_ROOT_WINDOW(), &attrs);
-
- XSelectInput (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- SubstructureRedirectMask);
- XSync (GDK_DISPLAY(), False);
- if (gdk_error_trap_pop () == 0) {
- result = FALSE;
- XSelectInput (GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- attrs.your_event_mask);
- } else
- result = TRUE;
-
-
- return result;
-}
-
-/* Cut and paste from gnome-libs/gnome_win_hints_wm_exists, except that we
- * return the xid instead of a window
- */
-static Window
-find_gnome_wm_window(void)
-{
- Atom r_type;
- int r_format;
- unsigned long count;
- unsigned long bytes_remain;
- unsigned char *prop, *prop2;
- GdkAtom cardinal_atom = gdk_atom_intern ("CARDINAL", FALSE);
-
- gdk_error_trap_push ();
- if (XGetWindowProperty(GDK_DISPLAY(), GDK_ROOT_WINDOW(),
- gdk_x11_atom_to_xatom (gdk_atom_intern ("_WIN_SUPPORTING_WM_CHECK", FALSE)),
- 0, 1, False, gdk_x11_atom_to_xatom (cardinal_atom),
- &r_type, &r_format,
- &count, &bytes_remain, &prop) == Success && prop)
- {
- if (r_type == gdk_x11_atom_to_xatom (cardinal_atom) && r_format == 32 && count == 1)
- {
- Window n = *(long *)prop;
- if (XGetWindowProperty(GDK_DISPLAY(), n,
- gdk_x11_atom_to_xatom (gdk_atom_intern ("_WIN_SUPPORTING_WM_CHECK", FALSE)),
- 0, 1, False, gdk_x11_atom_to_xatom (cardinal_atom),
- &r_type, &r_format, &count, &bytes_remain,
- &prop2) == Success && prop)
- {
- if (r_type == gdk_x11_atom_to_xatom (cardinal_atom) && r_format == 32 && count == 1)
- {
- XFree(prop);
- XFree(prop2);
- gdk_error_trap_pop ();
- return n;
- }
- XFree(prop2);
- }
- }
- XFree(prop);
- }
- gdk_error_trap_pop ();
- return None;
-}
-
-static Window
-find_wm_window_from_client (GdkWindow *client)
-{
- Window window, frame, parent, root;
- Window *children;
- unsigned int nchildren;
- gboolean needs_pop = TRUE;
-
- if (!client)
- return None;
-
- frame = None;
- window = GDK_WINDOW_XWINDOW (client);
-
- gdk_error_trap_push ();
-
- while (XQueryTree (GDK_DISPLAY(), window,
- &root, &parent, &children, &nchildren))
- {
- if (gdk_error_trap_pop != 0)
- {
- needs_pop = FALSE;
- break;
- }
-
- gdk_error_trap_push ();
-
- if (children)
- XFree(children);
-
- if (window == root)
- break;
-
- if (root == parent) {
- frame = window;
- break;
- }
- window = parent;
- }
-
- if (needs_pop)
- gdk_error_trap_pop ();
-
- return frame;
-}
-
-static gboolean
-window_has_wm_state (Window window)
-{
- Atom r_type;
- int r_format;
- unsigned long count;
- unsigned long bytes_remain;
- unsigned char *prop;
-
- if (XGetWindowProperty(GDK_DISPLAY(), window,
- gdk_x11_atom_to_xatom (gdk_atom_intern ("WM_STATE", FALSE)),
- 0, 0, False, AnyPropertyType,
- &r_type, &r_format,
- &count, &bytes_remain, &prop) == Success) {
-
- if (r_type != None) {
- XFree(prop);
- return TRUE;
- }
- }
- return FALSE;
-}
-
-static gboolean
-descendent_has_wm_state (Window window)
-{
- gboolean result = FALSE;
- Window parent, root;
- Window *children;
- unsigned int nchildren;
- gint i;
-
- if (!XQueryTree (GDK_DISPLAY(), window,
- &root, &parent, &children, &nchildren))
- return FALSE;
-
- for (i=0; i<nchildren; i++) {
- if (window_has_wm_state (children[i]) ||
- descendent_has_wm_state (children[i])) {
- result = TRUE;
- break;
- }
- }
-
- if (children)
- XFree (children);
-
- return result;
-}
-
-/* This function tries to find a window manager frame by
- * hunting all the children of the root window
- */
-static Window
-find_wm_window_from_hunt (void)
-{
- Window parent, root, frame;
- Window *children;
- unsigned int nchildren;
- gint i;
-
- frame = None;
-
- gdk_error_trap_push ();
-
- XQueryTree (GDK_DISPLAY(), GDK_ROOT_WINDOW (),
- &root, &parent, &children, &nchildren);
-
- /* We are looking for a window that doesn't have WIN_STATE
- * set on it, but does have a child with WIN_STATE set
- */
- for (i=0; i<nchildren; i++) {
- if (!window_has_wm_state (children[i]) &&
- descendent_has_wm_state (children[i])) {
- frame = children[i];
- break;
- }
- }
-
- if (children)
- XFree (children);
-
- gdk_error_trap_pop ();
-
- return frame;
-}
-
-static Window
-find_wm_window (GdkWindow *client)
-{
- Window wm_window = None;
-
- /* First, try to find a GNOME compliant WM */
-
- wm_window = find_gnome_wm_window();
-
- if (!wm_window) {
- wm_window = find_wm_window_from_client (client);
- }
-
- if (!wm_window) {
- wm_window = find_wm_window_from_hunt ();
- }
-
- return wm_window;
-}
-
-static gboolean
-start_timeout (gpointer data)
-{
- RestartInfo *info = data;
- if (wm_is_running ()) {
- info->callback(WM_SUCCESS, info->data);
- gnome_desktop_item_unref (info->dentry);
- g_free (info);
- return FALSE;
- } else {
- info->retries--;
- if (info->retries > 0)
- return TRUE;
- else {
- info->callback(WM_CANT_START, info->data);
- gnome_desktop_item_unref (info->dentry);
- g_free (info);
- return FALSE;
- }
- }
-}
-
-static void
-start_do (RestartInfo *info)
-{
- gnome_desktop_item_launch (info->dentry, 0, NULL, NULL);
-
- info->retries = 10;
- gtk_timeout_add (1000, start_timeout, info);
-}
-
-static gboolean
-kill_timeout (gpointer data)
-{
- RestartInfo *info = data;
- if (!wm_is_running ()) {
- start_do (info);
- return FALSE;
- } else {
- info->retries--;
- if (info->retries > 0)
- return TRUE;
- else {
- info->callback(WM_ALREADY_RUNNING, info->data);
- gnome_desktop_item_unref (info->dentry);
- g_free (info);
- return FALSE;
- }
- }
-}
-
-void
-wm_restart (WindowManager *new,
- GdkWindow *client,
- WMResultFunc callback,
- gpointer data)
-{
- Window wm_window;
- RestartInfo *info;
-
- g_return_if_fail (new->is_present);
-
- info = g_new (RestartInfo, 1);
- info->dentry = gnome_desktop_item_copy (new->dentry);
- info->callback = callback;
- info->data = data;
- info->retries = 10;
-
- if (wm_is_running ()) {
- wm_window = find_wm_window (client);
- if (!wm_window) {
- (*callback) (WM_ALREADY_RUNNING, data);
- gnome_desktop_item_unref (info->dentry);
- g_free (info);
- } else {
- XKillClient (GDK_DISPLAY(), wm_window);
- gtk_timeout_add (1000, kill_timeout, info);
- }
- } else {
- start_do (info);
- }
-}
-
-WindowManager *
-wm_guess_current (void)
-{
- return NULL;
-}
diff --git a/capplets/wm-properties/wm-list.c b/capplets/wm-properties/wm-list.c
deleted file mode 100644
index 022971359..000000000
--- a/capplets/wm-properties/wm-list.c
+++ /dev/null
@@ -1,574 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Code available under the Gnu GPL.
- * Authors: Owen Taylor <otaylor@redhat.com>,
- * Bradford Hovinen <hovinen@helixcode.com>
- */
-
-#include <sys/types.h>
-#include <dirent.h>
-#include <unistd.h>
-#include <ctype.h>
-#include <libgnome/libgnome.h>
-#include <gconf/gconf-client.h>
-#include "wm-properties.h"
-
-#define CONFIG_PREFIX "/desktop/gnome/applications/window_manager"
-
-/* Current list of window managers */
-GList *window_managers = NULL;
-
-/* List on startup */
-static GList *window_managers_save = NULL;
-
-/* Current window manager */
-static WindowManager *current_wm = NULL;
-
-/* Window manager on startup */
-static WindowManager *current_wm_save = NULL;
-
-static gboolean xml_read_bool (xmlNodePtr node);
-static xmlNodePtr xml_write_bool (gchar *name,
- gboolean value);
-
-gboolean
-is_blank (gchar *str)
-{
- while (*str) {
- if (!isspace(*str))
- return FALSE;
- str++;
- }
- return TRUE;
-}
-
-static gint
-wm_compare (gconstpointer a, gconstpointer b)
-{
- const WindowManager *wm_a = (const WindowManager *)a;
- const WindowManager *wm_b = (const WindowManager *)b;
-
- return g_strcasecmp (gnome_desktop_item_get_string (wm_a->dentry, GNOME_DESKTOP_ITEM_NAME), gnome_desktop_item_get_string (wm_b->dentry, GNOME_DESKTOP_ITEM_NAME));
-}
-
-static void
-wm_free (WindowManager *wm)
-{
- gnome_desktop_item_unref (wm->dentry);
- g_free (wm->config_exec);
- g_free (wm->config_tryexec);;
- g_free (wm);
-}
-
-void
-wm_check_present (WindowManager *wm)
-{
- gchar *path;
-
- if (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC)) {
- if (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_TRY_EXEC)) {
- path = gnome_is_program_in_path (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_TRY_EXEC));
- wm->is_present = (path != NULL);
- if (path)
- g_free (path);
- } else
- wm->is_present = TRUE;
- } else
- wm->is_present = FALSE;
-
- if (wm->config_exec) {
- if (wm->config_tryexec) {
- path = gnome_is_program_in_path (wm->config_tryexec);
- wm->is_config_present = (path != NULL);
- if (path)
- g_free (path);
- } else {
- path = gnome_is_program_in_path (wm->config_exec);
- wm->is_config_present = (path != NULL);
- if (path)
- g_free (path);
- }
- } else
- wm->is_config_present = FALSE;
-
-}
-
-static WindowManager *
-wm_copy (WindowManager *wm)
-{
- WindowManager *result = g_new (WindowManager, 1);
-
- result->dentry = gnome_desktop_item_copy (wm->dentry);
- result->config_exec = g_strdup (wm->config_exec);
- result->config_tryexec = g_strdup (wm->config_tryexec);
-
- result->session_managed = wm->session_managed;
- result->is_user = wm->is_user;
- result->is_present = wm->is_present;
- result->is_config_present = wm->is_config_present;
-
- return result;
-}
-
-
-static WindowManager *
-wm_list_find (GList *list, gchar *name)
-{
- GList *tmp_list = list;
- while (tmp_list) {
- WindowManager *wm = tmp_list->data;
- if (strcmp (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC), name) == 0)
- return wm;
-
- tmp_list = tmp_list->next;
- }
-
- return NULL;
-}
-
-static WindowManager *
-wm_list_find_exec (GList *list, gchar *name)
-{
- GList *tmp_list = list;
- while (tmp_list) {
- WindowManager *wm = tmp_list->data;
- if (!gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC))
- continue;
- if (strcmp (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC), name) == 0)
- return wm;
-
- tmp_list = tmp_list->next;
- }
-
- return NULL;
-}
-
-static GList *
-wm_list_find_files (gchar *directory)
-{
- DIR *dir;
- struct dirent *child;
- GList *result = NULL;
- gchar *suffix;
-
- dir = opendir (directory);
- if (dir == NULL)
- return NULL;
-
- while ((child = readdir (dir)) != NULL) {
- /* Ignore files without .desktop suffix, and ignore
- * .desktop files with no prefix
- */
- suffix = child->d_name + strlen (child->d_name) - 8;
- /* strlen(".desktop") == 8 */
-
- if (suffix <= child->d_name ||
- strcmp (suffix, ".desktop") != 0)
- continue;
-
- result = g_list_prepend (result,
- g_concat_dir_and_file (directory,
- child->d_name));
- }
- closedir (dir);
-
- return result;
-}
-
-static void
-wm_list_read_dir (gchar *directory, gboolean is_user)
-{
- WindowManager *wm;
- GList *tmp_list;
- GList *files;
- gchar *prefix;
-
- files = wm_list_find_files (directory);
-
- tmp_list = files;
- while (tmp_list) {
- wm = g_new (WindowManager, 1);
-
- wm->dentry = gnome_desktop_item_new_from_file (tmp_list->data, GNOME_DESKTOP_ITEM_TYPE_APPLICATION, NULL);
- gnome_desktop_item_set_entry_type (wm->dentry, GNOME_DESKTOP_ITEM_TYPE_APPLICATION);
-
- if (!wm->dentry) {
- g_free (wm);
- tmp_list = tmp_list->next;
- continue;
- }
-
- prefix = g_strconcat ("=", gnome_desktop_item_get_location (wm->dentry), "=/Window Manager/", NULL);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- wm->config_exec = gnome_config_get_string ("ConfigExec");
- wm->config_tryexec = gnome_config_get_string ("ConfigTryExec");
- wm->session_managed = gnome_config_get_bool ("SessionManaged=0");
- wm->is_user = is_user;
-
- if (wm->config_exec && is_blank (wm->config_exec)) {
- g_free (wm->config_exec);
- wm->config_exec = NULL;
- }
-
- if (wm->config_tryexec && is_blank (wm->config_tryexec)) {
- g_free (wm->config_tryexec);
- wm->config_tryexec = NULL;
- }
-
- gnome_config_pop_prefix ();
-
- wm_check_present (wm);
-
- if (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME) && gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC) &&
- (wm->is_user || wm->is_present)) {
- window_managers =
- g_list_insert_sorted (window_managers,
- wm,
- wm_compare);
- window_managers_save =
- g_list_insert_sorted (window_managers_save,
- wm_copy (wm),
- wm_compare);
- } else {
- wm_free (wm);
- }
-
-
- tmp_list = tmp_list->next;
- }
- g_list_free (files);
-}
-
-void
-wm_list_init (void)
-{
- gchar *tempdir;
- gchar *name;
- GConfClient *client;
-
- tempdir = gnome_unconditional_datadir_file ("gnome/wm-properties/");
- wm_list_read_dir (tempdir, FALSE);
- g_free (tempdir);
-
- tempdir = gnome_util_home_file("wm-properties/");
- wm_list_read_dir (tempdir, TRUE);
- g_free (tempdir);
-
- client = gconf_client_get_default ();
- name = gconf_client_get_string (client, CONFIG_PREFIX "/current", NULL);
- if (name) {
- current_wm = wm_list_find (window_managers, name);
- g_free (name);
- }
-
- if (!current_wm) {
- name = gconf_client_get_string (client, CONFIG_PREFIX "/default", NULL);
-
- if (name) {
- current_wm = wm_list_find_exec (window_managers, name);
- g_free (name);
- }
- }
-
- if (!current_wm) {
- gchar *wmfile, *prefix;
-
- wmfile = gnome_unconditional_datadir_file ("default.wm");
- prefix = g_strconcat ("=", wmfile, "=/Default/WM", NULL);
- name = gnome_config_get_string (prefix);
-
- g_free (wmfile);
- g_free (prefix);
-
- if (name) {
- current_wm = wm_list_find_exec (window_managers, name);
- g_free (name);
- }
- }
-
- if (!current_wm && window_managers)
- current_wm = window_managers->data;
-
- if(current_wm)
- current_wm_save = wm_list_find (window_managers_save, gnome_desktop_item_get_string (current_wm->dentry, GNOME_DESKTOP_ITEM_NAME));
-
- g_object_unref (G_OBJECT (client));
-}
-
-void
-wm_list_save (void)
-{
- GList *old_files;
- GList *tmp_list;
- gchar *tempdir;
- gchar *prefix;
- WindowManager *wm;
-
- /* Clean out the current contents of .gnome/wm-desktops
- */
-
- tempdir = gnome_util_home_file("wm-properties/");
- old_files = wm_list_find_files (tempdir);
- g_free (tempdir);
-
- tmp_list = old_files;
- while (tmp_list) {
- prefix = g_strconcat ("=", tmp_list->data, "=", NULL);
- gnome_config_clean_file (prefix);
- gnome_config_sync_file (prefix);
- g_free (prefix);
-
- tmp_list = tmp_list->next;
- }
- g_list_free (old_files);
-
-
- /* Save the user's desktops
- */
-
- tmp_list = window_managers;
- while (tmp_list) {
- wm = tmp_list->data;
-
- if (wm->is_user) {
- gnome_desktop_item_save (wm->dentry, NULL, TRUE, NULL);
-
- prefix = g_strconcat ("=", gnome_desktop_item_get_location (wm->dentry), "=/Window Manager/", NULL);
- gnome_config_push_prefix (prefix);
- g_free (prefix);
-
- if (wm->config_exec)
- gnome_config_set_string ("ConfigExec", wm->config_exec);
- if (wm->config_tryexec)
- gnome_config_set_string ("ConfigTryExec", wm->config_tryexec);
- gnome_config_set_bool ("SessionManaged=0", wm->session_managed);
- gnome_config_pop_prefix ();
-
- }
- tmp_list = tmp_list->next;
- }
-
- /* Save the current window manager
- */
- if(current_wm)
- {
- GConfClient *client = gconf_client_get_default ();
- gconf_client_set_string (client, CONFIG_PREFIX "/current",
- gnome_desktop_item_get_string (current_wm->dentry, GNOME_DESKTOP_ITEM_EXEC),
- NULL);
- g_object_unref (G_OBJECT (client));
- }
-
- gnome_config_sync ();
-}
-
-void
-wm_list_revert (void)
-{
- GList *tmp_list;
- gchar *old_name = NULL;
-
- if(current_wm)
- old_name = g_strdup (gnome_desktop_item_get_string (current_wm->dentry, GNOME_DESKTOP_ITEM_NAME));
-
- g_list_foreach (window_managers, (GFunc)wm_free, NULL);
- g_list_free (window_managers);
- window_managers = NULL;
-
- tmp_list = window_managers_save;
- while (tmp_list) {
- window_managers = g_list_prepend (window_managers,
- wm_copy (tmp_list->data));
- tmp_list = tmp_list->next;
- }
- window_managers = g_list_reverse (window_managers);
- current_wm = wm_list_find (window_managers, old_name);
- g_free (old_name);
-}
-
-void
-wm_list_add (WindowManager *wm)
-{
- g_return_if_fail (wm != NULL);
-
- window_managers = g_list_insert_sorted (window_managers, wm,
- wm_compare);
-}
-
-void
-wm_list_delete (WindowManager *wm)
-{
- GList *node;
-
- g_return_if_fail (wm != NULL);
- g_return_if_fail (wm != current_wm);
-
- node = g_list_find (window_managers, wm);
- g_return_if_fail (node != NULL);
-
- window_managers = g_list_remove_link (window_managers, node);
- g_list_free_1 (node);
- wm_free (wm);
-}
-
-void
-wm_list_set_current (WindowManager *wm)
-{
- current_wm = wm;
-}
-
-WindowManager *
-wm_list_get_current (void)
-{
- return current_wm;
-}
-
-WindowManager *
-wm_list_get_revert (void)
-{
- if(current_wm_save)
- return wm_list_find (window_managers, gnome_desktop_item_get_string (current_wm_save->dentry, GNOME_DESKTOP_ITEM_NAME));
- else
- return NULL;
-}
-
-static WindowManager *
-wm_read_from_xml (xmlNodePtr wm_node)
-{
- xmlNodePtr node;
- WindowManager *wm;
- gboolean is_current = FALSE;
-
- if (strcmp (wm_node->name, "window-manager")) return NULL;
-
- wm = g_new0 (WindowManager, 1);
-
- wm->dentry = gnome_desktop_item_new_from_file
- (xmlGetProp (wm_node, "desktop-entry"),
- GNOME_DESKTOP_ITEM_TYPE_APPLICATION, NULL);
- gnome_desktop_item_set_entry_type (wm->dentry, GNOME_DESKTOP_ITEM_TYPE_APPLICATION);
-
- for (node = wm_node->children; node; node = node->next) {
- if (!strcmp (node->name, "config-exec"))
- wm->config_exec = xmlNodeGetContent (node);
- else if (!strcmp (node->name, "config-tryexec"))
- wm->config_tryexec = xmlNodeGetContent (node);
- else if (!strcmp (node->name, "session-managed"))
- wm->session_managed = xml_read_bool (node);
- else if (!strcmp (node->name, "is-user"))
- wm->is_user = xml_read_bool (node);
- else if (!strcmp (node->name, "is-current"))
- is_current = xml_read_bool (node); /* FIXME: sanity check */
- }
-
- wm_check_present (wm);
-
- if (wm->dentry == NULL ||
- (wm->config_exec != NULL && is_blank (wm->config_exec)) ||
- gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME) == NULL || gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC) == NULL ||
- !(wm->is_user || wm->is_present))
- {
- g_free (wm);
- return NULL;
- }
-
- if (is_current) current_wm = wm;
-
- return wm;
-}
-
-void
-wm_list_read_from_xml (xmlDocPtr doc)
-{
- xmlNodePtr root_node, node;
- WindowManager *wm;
-
- root_node = xmlDocGetRootElement (doc);
- if (strcmp (root_node->name, "wm-prefs")) return;
-
- for (node = root_node; node; node = node->next) {
- if (!strcmp (node->name, "window-manager")) {
- wm = wm_read_from_xml (node);
- if (wm) window_managers =
- g_list_insert_sorted
- (window_managers, wm, wm_compare);
- }
- }
-}
-
-static xmlNodePtr
-wm_write_to_xml (WindowManager *wm)
-{
- xmlNodePtr node;
-
- node = xmlNewNode (NULL, "window-manager");
-
- xmlNewProp (node, "desktop-entry", gnome_desktop_item_get_location (wm->dentry));
-
- if (wm->config_exec != NULL)
- xmlNewChild (node, NULL, "config-exec", wm->config_exec);
-
- xmlAddChild (node, xml_write_bool ("session-managed",
- wm->session_managed));
-
- xmlAddChild (node, xml_write_bool ("is-user", wm->is_user));
- xmlAddChild (node, xml_write_bool ("is-current", wm == current_wm));
-
- return node;
-}
-
-xmlDocPtr
-wm_list_write_to_xml (void)
-{
- xmlDocPtr doc;
- xmlNodePtr root_node, node;
- GList *wm_node;
-
- doc = xmlNewDoc ("1.0");
- root_node = xmlNewDocNode (doc, NULL, "wm-prefs", NULL);
-
- for (wm_node = window_managers; wm_node; wm_node = wm_node->next) {
- node = wm_write_to_xml ((WindowManager *) wm_node->data);
- if (node) xmlAddChild (root_node, node);
- }
-
- xmlDocSetRootElement (doc, root_node);
-
- return doc;
-}
-
-/* Read a boolean value from a node */
-
-static gboolean
-xml_read_bool (xmlNodePtr node)
-{
- char *text;
-
- text = xmlNodeGetContent (node);
-
- if (!g_strcasecmp (text, "true"))
- return TRUE;
- else
- return FALSE;
-}
-
-/* Write out a boolean value in a node */
-
-static xmlNodePtr
-xml_write_bool (gchar *name, gboolean value)
-{
- xmlNodePtr node;
-
- g_return_val_if_fail (name != NULL, NULL);
-
- node = xmlNewNode (NULL, name);
-
- if (value)
- xmlNodeSetContent (node, "true");
- else
- xmlNodeSetContent (node, "false");
-
- return node;
-}
diff --git a/capplets/wm-properties/wm-properties-capplet.c b/capplets/wm-properties/wm-properties-capplet.c
deleted file mode 100644
index ee21f2417..000000000
--- a/capplets/wm-properties/wm-properties-capplet.c
+++ /dev/null
@@ -1,1260 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998-1999 Redhat Software Inc.
- * Code available under the Gnu GPL.
- * Authors: Jonathan Blandford <jrb@redhat.com>
- * Owen Taylor <otaylor@redhat.com>
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
-#include <ctype.h>
-#include <libxml/parser.h>
-#include "wm-properties.h"
-#include "gnome.h"
-
-#ifdef HAVE_XIMIAN_ARCHIVER
-# include <ximian-archiver/archive.h>
-# include <ximian-archiver/location.h>
-#endif /* HAVE_XIMIAN_ARCHIVER */
-
-#include "gnome-startup.h"
-
-/* prototypes */
-static void restart (gboolean force);
-static void try_callback (void);
-static void help_callback (void);
-static void ok_callback (void);
-static void revert_callback (void);
-static void cancel_callback (void);
-
-/* structures */
-
-typedef struct {
- GtkWidget *dialog;
- GtkWidget *name_entry;
- GtkWidget *exec_entry;
- GtkWidget *config_entry;
- GtkWidget *sm_toggle;
-} WMDialog;
-
-/* vars. */
-static GtkWidget *capplet;
-static GtkWidget *delete_button;
-static GtkWidget *edit_button;
-static GtkWidget *config_button;
-static GtkWidget *clist;
-
-static WindowManager *selected_wm = NULL;
-
-static GtkWidget *restart_dialog = NULL;
-static GtkWidget *restart_label = NULL;
-guint restart_dialog_timeout;
-gchar *restart_name = NULL;
-
-/* Time until dialog times out */
-gdouble restart_remaining_time;
-gint restart_displayed_time;
-
-GnomeClient *client = NULL;
-gchar *argv0;
-
-/* Enumeration describing the current state of the capplet.
- * in any other state than idle, all controls are !sensitive.
- */
-typedef enum {
- STATE_IDLE,
- STATE_TRY,
- STATE_REVERT,
- STATE_OK,
- STATE_CANCEL,
- STATE_TRY_REVERT, /* Currently trying, revert afterwards */
- STATE_TRY_CANCEL /* Currently trying, cancel afterwards */
-} StateType;
-
-/* The possible transitions between states are described below.
- *
-
- * operation | try revert ok cancel finish
- * ===========+=================================================
- * IDLE | TRY REVERT OK CANCEL
- * TRY | TRY_REVERT OK TRY_CANCEL IDLE
- * REVERT | CANCEL CANCEL IDLE
- * OK | (quit)
- * CANCEL | (quit)
- * TRY_REVERT | TRY_CANCEL TRY_CANCEL REVERT
- * TRY_CANCEL | CANCEL
- *
- * When a restart fails, there are three cases
- *
- * (1) The failure was because the current window manager didn't
- * die. We inform the user of the situation, and then
- * abort the operation.
- *
- * (2) The window manager didn't start, and we don't have a
- * a fallback. We pop up a error dialog, tell the user
- * to start a new window manager, and abort the operation.
- *
- * (3) The window manager didn't start, and we previously had a
- * window manager runnning. We pop up a warning dialog,
- * then try to go back to the old window manager.
- *
- * operation | (1) (2) (3)
- * ===========+=================================================
- * IDLE |
- * TRY | IDLE IDLE TRY
- * REVERT | IDLE IDLE REVERT
- * OK | (quit) (quit) OK
- * CANCEL | (quit) (quit) CANCEL
- * TRY_REVERT | REVERT REVERT REVERT
- * TRY_CANCEL | CANCEL CANCEL CANCEL
- */
-
-
-
-/* Current state
- */
-StateType state = STATE_IDLE;
-
-/* Set TRUE when we've exited the main loop, but restart_pending
- */
-gboolean quit_pending = FALSE;
-
-/* Set TRUE when we're waiting for the WM to restart
- */
-gboolean restart_pending = FALSE;
-
-/* Set TRUE while we are filling in the list
- */
-gboolean in_fill = FALSE;
-
-static gint cap_session_init = 0;
-static struct poptOption cap_options[] = {
- {"init-session-settings", '\0', POPT_ARG_NONE, &cap_session_init, 0,
- N_("Initialize session settings"), NULL},
- {NULL, '\0', 0, NULL, 0}
-};
-
-#ifdef HAVE_XIMIAN_ARCHIVER
-
-static void
-store_archive_data (void)
-{
- Archive *archive;
- Location *location;
- xmlDocPtr xml_doc;
-
- archive = ARCHIVE (archive_load (FALSE));
- location = archive_get_current_location (archive);
- xml_doc = wm_list_write_to_xml ();
- location_store_xml (location, "wm-properties-capplet",
- xml_doc, STORE_MASK_PREVIOUS);
- xmlFreeDoc (xml_doc);
- archive_close (archive);
-}
-
-#endif /* HAVE_XIMIAN_ARCHIVER */
-
-static void
-response_cb (GtkDialog *dialog, gint response_id, gpointer data)
-{
- int old_state = state;
-
- switch (response_id)
- {
- case GTK_RESPONSE_NONE:
- case GTK_RESPONSE_CLOSE:
- gtk_main_quit ();
- break;
- case GTK_RESPONSE_APPLY:
- state = STATE_TRY;
- restart(FALSE);
- wm_list_set_current (selected_wm);
- wm_list_save ();
- update_session ();
- break;
- }
-}
-
-static void
-state_changed (void)
-{
- gtk_dialog_set_response_sensitive (GTK_DIALOG (capplet), GTK_RESPONSE_APPLY,
- TRUE);
-}
-
-static GtkWidget *
-left_aligned_button (gchar *label)
-{
- GtkWidget *button = gtk_button_new_with_label (label);
- gtk_misc_set_alignment (GTK_MISC (GTK_BIN (button)->child),
- 0.0, 0.5);
- gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child),
- GNOME_PAD_SMALL, 0);
-
- return button;
-}
-static void
-restart_label_update (void)
-{
- gchar *tmp;
-
- if ((gint)restart_remaining_time != restart_displayed_time) {
- restart_displayed_time = restart_remaining_time;
-
- tmp = g_strdup_printf (_("Starting %s\n"
- "(%d seconds left before operation times out)"),
- restart_name,
- restart_displayed_time);
- gtk_label_set_text (GTK_LABEL (restart_label), tmp);
- g_free (tmp);
- }
-}
-
-static gboolean
-restart_dialog_raise (gpointer data)
-{
- if (restart_dialog && GTK_WIDGET_REALIZED (restart_dialog)) {
- restart_remaining_time -= 0.25;
- restart_label_update();
- gdk_window_raise (restart_dialog->window);
- }
- return TRUE;
-}
-
-static void
-restart_dialog_destroyed (GtkWidget *widget)
-{
- if (restart_dialog_timeout) {
- gtk_timeout_remove (restart_dialog_timeout);
- restart_dialog_timeout = 0;
- }
-
- restart_dialog = NULL;
-}
-
-static void
-show_restart_dialog (gchar *name)
-{
- GtkWidget *hbox;
- GtkWidget *frame;
- GtkWidget *pixmap;
- gchar *tmp;
-
- if (!restart_dialog) {
- restart_dialog = gtk_window_new (GTK_WINDOW_POPUP);
- gtk_window_set_position (GTK_WINDOW (restart_dialog),
- GTK_WIN_POS_CENTER);
-
- gtk_signal_connect (GTK_OBJECT (restart_dialog), "destroy",
- GTK_SIGNAL_FUNC (restart_dialog_destroyed),
- &restart_dialog);
- frame = gtk_frame_new (NULL);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT);
- gtk_container_add (GTK_CONTAINER (restart_dialog), frame);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD);
- gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD);
- gtk_container_add (GTK_CONTAINER (frame), hbox);
-
- tmp = gnome_unconditional_pixmap_file("gnome-info.png");
- if (tmp) {
- pixmap = gnome_pixmap_new_from_file(tmp);
- g_free(tmp);
- gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 0);
- }
-
- restart_label = gtk_label_new ("");
- gtk_box_pack_start (GTK_BOX (hbox), restart_label, FALSE, FALSE, GNOME_PAD);
- }
-
- if (!restart_dialog_timeout) {
- restart_dialog_timeout = gtk_timeout_add (250, restart_dialog_raise, NULL);
- }
-
- restart_remaining_time = 10.0;
- restart_displayed_time = -1;
- if (restart_name)
- g_free (restart_name);
-
- restart_name = g_strdup (name);
- restart_label_update ();
-
- gtk_widget_show_all (restart_dialog);
-}
-
-static void
-hide_restart_dialog (void)
-{
- if (restart_dialog)
- gtk_widget_destroy (restart_dialog);
-}
-
-static void
-update_session (void)
-{
- WindowManager *current_wm = wm_list_get_current();
- gchar *session_args[3];
-
- if (!current_wm)
- return;
-
- if (current_wm->session_managed) {
- gnome_client_set_restart_style (client,
- GNOME_RESTART_NEVER);
-
- } else {
- session_args[0] = argv0;
- session_args[1] = "--init-session-settings";
- session_args[2] = NULL;
- /* We use a priority of 15 so that we start after
- * session-managed WM's (priority 10), for safety.
- */
- gnome_client_set_priority (client, 15);
- gnome_client_set_restart_style (client,
- GNOME_RESTART_ANYWAY);
- gnome_client_set_restart_command (client, 2,
- session_args);
- }
-
- gnome_client_flush (client);
-}
-
-static void
-init_session (void)
-{
- GnomeClientFlags flags;
- gint token;
-
- client = gnome_master_client ();
- flags = gnome_client_get_flags (client);
-
- if (flags & GNOME_CLIENT_IS_CONNECTED) {
- token = gnome_startup_acquire_token("GNOME_WM_PROPERTIES",
- gnome_client_get_id(client));
-
- if (token)
- update_session();
- else {
- gnome_client_set_restart_style (client,
- GNOME_RESTART_NEVER);
- gnome_client_flush (client);
- }
- }
-}
-
-static void
-update_gui (void)
-{
- GList *tmp_list;
- WindowManager *current_wm = wm_list_get_current();
- gint new_row;
- gchar *tmpstr;
-
- gtk_clist_clear (GTK_CLIST (clist));
-
- in_fill = TRUE;
-
- tmp_list = window_managers;
- while (tmp_list) {
- gchar *row_text;
- WindowManager *wm;
-
- wm = tmp_list->data;
-
- if (wm == current_wm) {
- row_text = g_strdup_printf (_("%s (Current)"),
- gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME));
-
- tmpstr = g_strdup_printf (_("Run Configuration Tool for %s"),
- gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME));
-
- gtk_label_set_text (GTK_LABEL (GTK_BIN (config_button)->child),
- tmpstr);
- gtk_widget_set_sensitive (config_button,
- wm->is_config_present);
-
- g_free (tmpstr);
- } else if (wm->is_user && !wm->is_present) {
- row_text = g_strconcat (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME),
- _(" (Not found)"), NULL);
- } else {
- row_text = g_strdup (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME));
- }
-
- new_row = gtk_clist_append (GTK_CLIST (clist), &row_text);
- gtk_clist_set_row_data (GTK_CLIST (clist), new_row, wm);
-
- if (wm == selected_wm)
- gtk_clist_select_row (GTK_CLIST (clist), new_row, 0);
-
- g_free (row_text);
-
- tmp_list = tmp_list->next;
- }
-
- in_fill = FALSE;
-
- if(selected_wm) {
- gtk_widget_set_sensitive (edit_button, selected_wm->is_user);
- gtk_widget_set_sensitive (delete_button, selected_wm->is_user);
- } else {
- gtk_widget_set_sensitive (edit_button, FALSE);
- gtk_widget_set_sensitive (delete_button, FALSE);
- }
-
- if (current_wm)
- gtk_widget_show(config_button);
- else
- gtk_widget_hide(config_button);
-}
-
-static void
-init_callback (WMResult result, gpointer data)
-{
- switch (result) {
- case WM_SUCCESS:
- break;
- case WM_ALREADY_RUNNING:
- g_warning (_("wm-properties-capplet: Unable to initialize window manager.\n"
- "\tAnother window manager is already running and could not be killed\n"));
- break;
- case WM_CANT_START:
- g_warning (_("wm-properties-capplet: Unable to initialize window manager.\n"
- "\t'%s' didn't start\n"), (gchar *)data);
- break;
- }
-
- g_free (data);
- gtk_main_quit ();
-}
-
-static void
-restart_finalize ()
-{
- wm_list_set_current (selected_wm);
- hide_restart_dialog();
-
- switch (state) {
- case STATE_TRY:
- case STATE_REVERT:
- gtk_widget_set_sensitive (capplet, TRUE);
- update_gui();
- state = STATE_IDLE;
- break;
-
- case STATE_OK:
- case STATE_CANCEL:
- if (quit_pending)
- gtk_main_quit();
- break;
- default:
- g_warning ("Finalize in state %d!!!\n", state);
- return;
- }
-
- restart_pending = FALSE;
-}
-
-static void
-restart_failure (WMResult reason)
-{
- GtkWidget *msgbox;
- WindowManager *current_wm;
- gchar *msg = NULL;
- gboolean modal = FALSE;
-
- current_wm = wm_list_get_current ();
-
- /* Did the previous window manager not die?
- */
- if (reason == WM_ALREADY_RUNNING) {
- msg = g_strdup (_("Previous window manager did not die\n"));
-
- switch (state) {
- case STATE_TRY:
- case STATE_REVERT:
- case STATE_OK:
- case STATE_CANCEL:
- selected_wm = current_wm;
- restart_finalize ();
- break;
-
- case STATE_TRY_REVERT:
- revert_callback ();
- break;
-
- case STATE_TRY_CANCEL:
- cancel_callback ();
- break;
-
- default:
- g_warning ("Failure in state %d!!!\n", state);
- return;
- }
- }
- /* Is there something reasonable to try to fall back to?
- */
- else if (current_wm != selected_wm) {
-
- switch (state) {
- case STATE_TRY:
- case STATE_REVERT:
- case STATE_OK:
- case STATE_CANCEL:
- msg = g_strdup_printf (_("Could not start '%s'.\n"
- "Falling back to previous window manager '%s'\n"),
- selected_wm?gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_NAME):"Unknown",
- current_wm?gnome_desktop_item_get_string (current_wm->dentry, GNOME_DESKTOP_ITEM_NAME):"Unknown");
- selected_wm = current_wm;
- restart(TRUE);
- break;
-
- case STATE_TRY_REVERT:
- revert_callback ();
- break;
-
- case STATE_TRY_CANCEL:
- cancel_callback ();
- break;
-
- default:
- g_warning ("Failure in state %d!!!\n", state);
- return;
- }
-
- /* Give up */
- } else {
-
- switch (state) {
- case STATE_OK:
- case STATE_CANCEL:
- modal = TRUE; /* prevent an immediate exit */
- /* Fall through */
- case STATE_TRY:
- case STATE_REVERT:
- msg = g_strdup (_("Could not start fallback window manager.\n"
- "Please run a window manager manually. You can\n"
- "do this by selecting \"Run Program\" in the\n"
- "foot menu\n"));
-
- restart_finalize();
- break;
-
- case STATE_TRY_REVERT:
- revert_callback ();
- break;
-
- case STATE_TRY_CANCEL:
- cancel_callback ();
- break;
-
- default:
- g_warning ("Failure in state %d!!!\n", state);
- return;
- }
- }
-
- if (msg) {
- msgbox = gnome_message_box_new (msg,
- GNOME_MESSAGE_BOX_ERROR,
- _("OK"), NULL);
- if (modal)
- gnome_dialog_run (GNOME_DIALOG (msgbox));
- else
- gtk_widget_show (msgbox);
- g_free (msg);
- }
-}
-
-static void
-show_restart_info (void)
-{
- gchar *save_session;
- GtkWidget *dialog;
-
- save_session = gnome_is_program_in_path ("save-session");
- if (save_session) {
- dialog = gnome_message_box_new (
- _("Your current window manager has been changed. In order for\n"
- "this change to be saved, you will need to save your current\n"
- "session. You can do so immediately by selecting the \"Save session\n"
- "now\" below, or you can save your session later. This can be\n"
- "done either selecting \"Save Current Session\" under \"Settings\"\n"
- "in the main menu, or by turning on \"Save Current Setup\" when\n"
- "you log out.\n"),
- GNOME_MESSAGE_BOX_INFO, _("Save Session Later"), _("Save Session Now"), NULL);
- } else {
- dialog = gnome_message_box_new (
- _("Your current window manager has been changed. In order for\n"
- "this change to be saved, you will need to save your current\n"
- "session. This can be done by either selecting \"Save Current Session\"\n"
- "under \"Settings\" in the main menu, or by turning on\n"
- "\"Save Current Setup\" when you log out.\n"),
- GNOME_MESSAGE_BOX_INFO, GNOME_STOCK_BUTTON_CLOSE, NULL);
- }
- if ((gnome_dialog_run_and_close (GNOME_DIALOG (dialog)) == 1) && save_session) {
- system (save_session);
- }
- g_free (save_session);
-}
-
-static void
-restart_finish (void)
-{
- switch (state) {
- case STATE_TRY:
- case STATE_REVERT:
- case STATE_OK:
- case STATE_CANCEL:
- hide_restart_dialog();
- show_restart_info();
- restart_finalize();
- break;
-
- case STATE_TRY_REVERT:
- revert_callback ();
- break;
-
- case STATE_TRY_CANCEL:
- cancel_callback ();
- break;
-
- default:
- g_warning ("Finished in state %d!!!\n", state);
- return;
- }
-}
-
-static void
-restart_callback (WMResult result, gpointer data)
-{
- if (result == WM_SUCCESS)
- restart_finish ();
- else
- restart_failure (result);
-}
-
-static void
-destroy_callback (GtkWidget *widget, void *data)
-{
-}
-
-static void
-restart (gboolean force)
-{
- WindowManager *current_wm = wm_list_get_current(), *mywm;
- static gboolean last_try_was_twm = FALSE;
- GnomeDesktopItem *twm_dentry = gnome_desktop_item_new ();
- WindowManager twm_fallback = {twm_dentry, "twm", "twm", 0, 0, 1, 0};
-
- gnome_desktop_item_set_entry_type (twm_dentry, GNOME_DESKTOP_ITEM_TYPE_APPLICATION);
- gnome_desktop_item_set_string (twm_dentry,
- GNOME_DESKTOP_ITEM_NAME, "twm");
- gnome_desktop_item_set_string (twm_dentry,
- GNOME_DESKTOP_ITEM_COMMENT, "twm");
- gnome_desktop_item_set_string (twm_dentry,
- GNOME_DESKTOP_ITEM_EXEC, "twm");
-
- if(selected_wm) {
- last_try_was_twm = FALSE;
- mywm = selected_wm;
- } else if(!last_try_was_twm) {
- last_try_was_twm = TRUE;
- mywm = (WindowManager*)&twm_fallback;
- } else {
- restart_finalize();
- gnome_desktop_item_unref (twm_dentry);
- return;
- }
-
- if (force || current_wm != mywm) {
- show_restart_dialog (gnome_desktop_item_get_string (mywm->dentry, GNOME_DESKTOP_ITEM_NAME));
- if (state != STATE_OK && state != STATE_CANCEL)
- gtk_widget_set_sensitive (capplet, FALSE);
- restart_pending = TRUE;
- wm_restart (mywm,
- capplet->window,
- restart_callback,
- NULL);
- } else {
- restart_finalize ();
- }
-
- gnome_desktop_item_unref (twm_dentry);
-}
-
-static void
-try_callback (void)
-{
- if (state != STATE_IDLE) {
- g_warning ("try_callback in state %d!!!\n", state);
- return;
- }
-
- state = STATE_TRY;
- restart(FALSE);
-}
-
-static void
-help_callback (void)
-{
- gchar *tmp;
-
- gnome_help_display_with_doc_id (gnome_program_get (), "users-guide", "gccdesktop.html", "#GCCWM", NULL);
-}
-
-static void
-ok_callback (void)
-{
- switch (state) {
- case STATE_IDLE:
- state = STATE_OK;
- restart(FALSE);
- break;
-
- case STATE_TRY:
- state = STATE_OK;
- break;
-
- case STATE_REVERT:
- state = STATE_CANCEL;
- break;
-
- case STATE_TRY_REVERT:
- state = STATE_TRY_CANCEL;
- break;
-
- default:
- g_warning ("ok callback in state %d!!!\n", state);
- return;
- }
-
- wm_list_save ();
-#ifdef HAVE_XIMIAN_ARCHIVER
- store_archive_data ();
-#endif /* HAVE_XIMIAN_ARCHIVER */
-}
-
-static void
-revert_callback (void)
-{
- StateType old_state = state;
-
- switch (state) {
- case STATE_IDLE:
- case STATE_TRY_REVERT:
- wm_list_revert();
- selected_wm = wm_list_get_revert();
- state = STATE_REVERT;
-
- restart (old_state == STATE_TRY_REVERT);
- update_gui();
-
- break;
-
- case STATE_TRY:
- state = STATE_TRY_REVERT;
- break;
-
- default:
- g_warning ("revert callback in state %d!!!\n", state);
- return;
- }
-}
-
-static void
-cancel_callback (void)
-{
- StateType old_state = state;
-
- switch (state) {
- case STATE_IDLE:
- case STATE_TRY_CANCEL:
- wm_list_revert();
- selected_wm = wm_list_get_revert();
- state = STATE_CANCEL;
-
- restart (old_state == STATE_TRY_CANCEL);
-
- break;
-
- case STATE_TRY:
- state = STATE_TRY_CANCEL;
- break;
-
- case STATE_REVERT:
- state = STATE_CANCEL;
- break;
-
- case STATE_TRY_REVERT:
- state = STATE_TRY_CANCEL;
- break;
-
- default:
- g_warning ("ok callback in state %d!!!\n", state);
- return;
- }
-}
-
-static WMDialog *
-create_dialog (gchar *title)
-{
- GtkWidget *label;
- GtkWidget *alignment;
- GtkWidget *table;
- WMDialog *dialog;
-
- dialog = g_new (WMDialog, 1);
-
- dialog->dialog = gnome_dialog_new (_("Add New Window Manager"),
- _("OK"), _("Cancel"), NULL);
-
- gnome_dialog_set_default (GNOME_DIALOG (dialog->dialog), 0);
- gnome_dialog_close_hides (GNOME_DIALOG (dialog->dialog), TRUE);
-
- table = gtk_table_new (4, 2, FALSE);
-
- gtk_table_set_row_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
- gtk_table_set_col_spacings (GTK_TABLE (table), GNOME_PAD_SMALL);
- gtk_container_add (GTK_CONTAINER (GNOME_DIALOG (dialog->dialog)->vbox),
- table);
-
- label = gtk_label_new (_("Name:"));
- gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 0, 1,
- GTK_FILL, 0,
- 0, 0);
-
- dialog->name_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), dialog->name_entry,
- 1, 2, 0, 1,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- label = gtk_label_new (_("Command:"));
- gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 1, 2,
- GTK_FILL, 0,
- 0, 0);
-
- dialog->exec_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), dialog->exec_entry,
- 1, 2, 1, 2,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- label = gtk_label_new (_("Configuration Command:"));
- gtk_misc_set_alignment (GTK_MISC (label), 1.0, 0.5);
- gtk_table_attach (GTK_TABLE (table), label,
- 0, 1, 2, 3,
- GTK_FILL, 0,
- 0, 0);
-
- dialog->config_entry = gtk_entry_new ();
- gtk_table_attach (GTK_TABLE (table), dialog->config_entry,
- 1, 2, 2, 3,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- alignment = gtk_alignment_new (0.0, 0.5, 0.0, 0.0);
- gtk_table_attach (GTK_TABLE (table), alignment,
- 0, 2, 3, 4,
- GTK_FILL | GTK_EXPAND, 0,
- 0, 0);
-
- dialog->sm_toggle = gtk_check_button_new_with_label (_("Window manager is session managed"));
- gtk_container_add (GTK_CONTAINER (alignment), dialog->sm_toggle);
-
- gtk_window_set_default_size (GTK_WINDOW (dialog->dialog), 400, -1);
- gtk_window_set_policy (GTK_WINDOW (dialog->dialog), FALSE, TRUE, FALSE);
- gtk_widget_show_all (dialog->dialog);
-
- return dialog;
-}
-
-static gchar *
-extract_entry (GtkWidget *widget)
-{
- gchar *tmp;
-
- g_return_val_if_fail (GTK_IS_ENTRY (widget), NULL);
-
- tmp = gtk_entry_get_text (GTK_ENTRY (widget));
- if (is_blank (tmp))
- return NULL;
- else
- return g_strdup (tmp);
-}
-
-static gchar *
-make_filename (gchar *name)
-{
- gchar *tempname = g_strconcat (name, ".desktop", NULL);
- gchar *tempdir = gnome_util_home_file("wm-properties/");
- gchar *tmp = tempname;
- gchar *result;
-
- while (*tmp) {
- if (isspace (*tmp) || (*tmp == '/'))
- *tmp = '_';
- tmp++;
- }
- result = g_concat_dir_and_file (tempdir, tempname);
- g_free (tempname);
- g_free (tempdir);
-
- return result;
-}
-
-static gboolean
-check_dialog (WMDialog *dialog)
-{
- GtkWidget *msgbox;
-
- if (is_blank (gtk_entry_get_text (GTK_ENTRY (dialog->name_entry)))) {
- msgbox = gnome_message_box_new (_("Name cannot be empty"),
- GNOME_MESSAGE_BOX_ERROR,
- _("OK"), NULL);
- gnome_dialog_run (GNOME_DIALOG (msgbox));
- return FALSE;
- }
- if (is_blank (gtk_entry_get_text (GTK_ENTRY (dialog->exec_entry)))) {
- msgbox = gnome_message_box_new (_("Command cannot be empty"),
- GNOME_MESSAGE_BOX_ERROR,
- _("OK"), NULL);
- gnome_dialog_run (GNOME_DIALOG (msgbox));
- return FALSE;
- }
-
- return TRUE;
-}
-
-static void
-get_dialog_contents (WMDialog *dialog, WindowManager *wm)
-{
- gchar *tmp;
-
- tmp = extract_entry (dialog->name_entry);
- gnome_desktop_item_set_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME,
- tmp);
- g_free (tmp);
-
- tmp = extract_entry (dialog->exec_entry);
- gnome_desktop_item_set_string (wm->dentry, GNOME_DESKTOP_ITEM_EXEC,
- tmp);
- g_free (tmp);
-
- if (wm->config_exec)
- g_free (wm->config_exec);
- wm->config_exec = extract_entry (dialog->config_entry);
-
- tmp = make_filename (gnome_desktop_item_get_string (wm->dentry, GNOME_DESKTOP_ITEM_NAME));
- gnome_desktop_item_set_location (wm->dentry, tmp);
- g_free (tmp);
-
- wm->session_managed = !!GTK_TOGGLE_BUTTON (dialog->sm_toggle)->active;
-
- wm_check_present (wm);
-}
-
-static void
-edit_dialog (void)
-{
- WMDialog *dialog;
- gchar *tmp;
- gint result;
-
- if(!selected_wm)
- return;
-
- dialog = create_dialog (_("Edit Window Manager"));
-
- if (gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_NAME))
- gtk_entry_set_text (GTK_ENTRY (dialog->name_entry), gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_NAME));
-
- if (gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_EXEC))
- gtk_entry_set_text (GTK_ENTRY (dialog->exec_entry), gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_EXEC));
-
- if (selected_wm->config_exec)
- gtk_entry_set_text (GTK_ENTRY (dialog->config_entry), selected_wm->config_exec);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (dialog->sm_toggle),
- selected_wm->session_managed);
-
- if (!selected_wm->is_user) {
- gtk_widget_set_sensitive (dialog->name_entry, FALSE);
- gtk_widget_set_sensitive (dialog->exec_entry, FALSE);
- gtk_widget_set_sensitive (dialog->config_entry, FALSE);
- gtk_widget_set_sensitive (dialog->sm_toggle, FALSE);
- }
-
- do {
- gtk_widget_show (dialog->dialog);
- result = gnome_dialog_run (GNOME_DIALOG (dialog->dialog));
- } while (result == 0 && !check_dialog (dialog));
-
- if (selected_wm->is_user && (result == 0)) {
- get_dialog_contents (dialog, selected_wm);
- update_gui();
- state_changed ();
- }
-
- gtk_widget_destroy (dialog->dialog);
- g_free (dialog);
-}
-
-static void
-add_dialog (void)
-{
- WMDialog *dialog = create_dialog (_("Edit Window Manager"));
- WindowManager *wm;
- gint result;
-
- do {
- result = gnome_dialog_run (GNOME_DIALOG (dialog->dialog));
- } while (result == 0 && !check_dialog (dialog));
-
- if (result == 0) {
- wm = g_new0 (WindowManager, 1);
- wm->dentry = gnome_desktop_item_new ();
- gnome_desktop_item_set_entry_type (wm->dentry, GNOME_DESKTOP_ITEM_TYPE_APPLICATION);
- get_dialog_contents (dialog, wm);
-
- wm->is_user = TRUE;
-
- wm_list_add (wm);
-
- selected_wm = wm;
- update_gui();
-
- state_changed ();
- }
-
- gtk_widget_destroy (dialog->dialog);
- g_free (dialog);
-}
-
-static void
-select_row (GtkCList *the_clist,
- gint row,
- gint column,
- GdkEvent *event,
- gpointer data)
-{
- WindowManager *wm;
-
- if (!in_fill) {
- wm = gtk_clist_get_row_data (GTK_CLIST (clist), row);
- gtk_widget_set_sensitive (edit_button, wm->is_user);
- gtk_widget_set_sensitive (delete_button, wm->is_user);
-
- if (wm != selected_wm) {
- selected_wm = wm;
- state_changed ();
- }
- }
-}
-
-static void
-delete (void)
-{
- WindowManager *current_wm = wm_list_get_current();
- GtkWidget *msgbox;
-
- if (current_wm == selected_wm) {
- msgbox = gnome_message_box_new (
- _("You cannot delete the current Window Manager"),
- GNOME_MESSAGE_BOX_ERROR, _("OK"), NULL);
-
- gnome_dialog_run (GNOME_DIALOG (msgbox));
- return;
- }
-
- wm_list_delete (selected_wm);
- selected_wm = current_wm;
- update_gui();
- state_changed ();
-}
-
-
-static void
-run_config (GtkWidget *w)
-{
- WindowManager *current_wm = wm_list_get_current();
-
- if (current_wm
- && current_wm->is_config_present
- && current_wm->config_exec != NULL) {
- gchar *argv[4];
-
- argv[0] = "/bin/sh";
- argv[1] = "-c";
- argv[2] = current_wm->config_exec;
- argv[3] = NULL;
-
- gnome_execute_async (NULL, 4, argv);
- }
-}
-
-static void
-wm_setup (void)
-{
- GtkWidget *hbox, *vbox, *bottom;
- GtkWidget *util_vbox;
- GtkWidget *add_button;
- GtkWidget *scrolled_window;
- GtkWidget *label;
-
- capplet = gtk_dialog_new_with_buttons (_("Window Manager Selector"),
- NULL,
- -1,
- GTK_STOCK_HELP, GTK_RESPONSE_HELP,
- GTK_STOCK_APPLY, GTK_RESPONSE_APPLY,
- GTK_STOCK_CLOSE, GTK_RESPONSE_CLOSE,
- NULL);
- gtk_dialog_set_response_sensitive (GTK_DIALOG (capplet), GTK_RESPONSE_APPLY, FALSE);
- gtk_widget_set_usize (capplet, 360, 200);
-
- vbox = gtk_vbox_new (FALSE, 0);
-
- label = gtk_label_new (_("Window Manager Selector"));
- gtk_box_pack_start (GTK_BOX (vbox), label, TRUE, FALSE, 10);
-
- hbox = gtk_hbox_new (FALSE, GNOME_PAD);
-
- gtk_container_set_border_width (GTK_CONTAINER (hbox), GNOME_PAD_SMALL);
- bottom = gtk_hbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_container_set_border_width (GTK_CONTAINER (bottom), GNOME_PAD_SMALL);
- scrolled_window = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolled_window),
- GTK_POLICY_AUTOMATIC,
- GTK_POLICY_AUTOMATIC);
-
- clist = gtk_clist_new (1);
- gtk_clist_column_titles_hide (GTK_CLIST (clist));
- gtk_clist_set_column_auto_resize (GTK_CLIST (clist), 0, TRUE);
- gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_BROWSE);
-
- gtk_signal_connect (GTK_OBJECT (clist), "select_row",
- GTK_SIGNAL_FUNC (select_row), NULL);
-
- gtk_container_add (GTK_CONTAINER (scrolled_window), clist);
-
- gtk_box_pack_start (GTK_BOX (hbox), scrolled_window, TRUE, TRUE, 0);
-
- util_vbox = gtk_vbox_new (FALSE, GNOME_PAD_SMALL);
- gtk_box_pack_start (GTK_BOX (hbox), util_vbox, FALSE, FALSE, 0);
-
- add_button = left_aligned_button (_("Add..."));
- gtk_signal_connect (GTK_OBJECT (add_button), "clicked",
- GTK_SIGNAL_FUNC (add_dialog), NULL);
- gtk_box_pack_start (GTK_BOX (util_vbox), add_button, FALSE, FALSE, 0);
-
- edit_button = left_aligned_button (_("Edit..."));
- gtk_signal_connect (GTK_OBJECT (edit_button), "clicked",
- GTK_SIGNAL_FUNC (edit_dialog), NULL);
- gtk_box_pack_start (GTK_BOX (util_vbox), edit_button, FALSE, FALSE, 0);
-
- delete_button = left_aligned_button (_("Delete"));
- gtk_signal_connect (GTK_OBJECT (delete_button), "clicked",
- GTK_SIGNAL_FUNC (delete), NULL);
- gtk_box_pack_start (GTK_BOX (util_vbox), delete_button, FALSE, FALSE, 0);
- config_button = gtk_button_new_with_label ("");
-
- gtk_misc_set_padding (GTK_MISC (GTK_BIN (config_button)->child),
- GNOME_PAD_SMALL, 0);
- gtk_signal_connect (GTK_OBJECT (config_button), "clicked",
- GTK_SIGNAL_FUNC (run_config), NULL);
- gtk_box_pack_start (GTK_BOX (bottom), config_button, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (vbox), hbox, TRUE, TRUE, 0);
- gtk_box_pack_end (GTK_BOX (vbox), bottom, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (GTK_DIALOG (capplet)->vbox), vbox,
- TRUE, TRUE, 0);
-
- gtk_widget_show_all (capplet);
-
- update_gui();
-}
-
-static void do_get_xml (void)
-{
- xmlDocPtr doc;
-
- doc = wm_list_write_to_xml ();
- xmlDocDump (stdout, doc);
-}
-
-static void do_set_xml (void)
-{
- xmlDocPtr doc;
- char *buffer;
- int len = 0;
-
- while (!feof (stdin)) {
- if (!len) buffer = g_new (char, 16384);
- else buffer = g_renew (char, buffer, len + 16384);
- fread (buffer + len, 1, 16384, stdin);
- len += 16384;
- }
-
- doc = xmlParseMemory (buffer, strlen (buffer));
-
- init_session ();
- wm_list_read_from_xml (doc);
- wm_list_save ();
- update_session ();
-}
-
-int
-main (int argc, char **argv)
-{
- bindtextdomain (PACKAGE, GNOMELOCALEDIR);
- textdomain (PACKAGE);
-
- argv0 = g_strdup (argv[0]);
- gnome_program_init ("wm-properties", VERSION,
- LIBGNOMEUI_MODULE, argc, argv,
- GNOME_PARAM_POPT_TABLE, &cap_options,
- NULL);
-
- /* Read in the list of window managers, and the current
- * window manager
- */
- wm_list_init();
- selected_wm = wm_list_get_current();
-
- if (!cap_session_init)
- {
- init_session();
- wm_setup();
- g_signal_connect (G_OBJECT (capplet), "response",
- response_cb, NULL);
-
- gtk_main ();
-
- if (restart_pending) {
- quit_pending = TRUE;
- gtk_main();
- }
- }
- else {
- if (selected_wm &&
- !selected_wm->session_managed &&
- !wm_is_running()) {
-
- wm_restart (selected_wm, NULL, init_callback,
- g_strdup (gnome_desktop_item_get_string (selected_wm->dentry, GNOME_DESKTOP_ITEM_NAME)));
- gtk_main ();
- }
-
- init_session();
- }
-
- return 0;
-}
-
diff --git a/capplets/wm-properties/wm-properties.glade b/capplets/wm-properties/wm-properties.glade
deleted file mode 100644
index e69de29bb..000000000
--- a/capplets/wm-properties/wm-properties.glade
+++ /dev/null
diff --git a/capplets/wm-properties/wm-properties.h b/capplets/wm-properties/wm-properties.h
deleted file mode 100644
index f14dc4ea5..000000000
--- a/capplets/wm-properties/wm-properties.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
-/* Copyright (C) 1998 Redhat Software Inc.
- * Code available under the Gnu GPL.
- * Authors: Owen Taylor <otaylor@redhat.com>,
- * Bradford Hovinen <hovinen@helixcode.com>
- */
-
-#include <gdk/gdk.h>
-#include <libgnome/libgnome.h>
-#include <libgnome/gnome-desktop-item.h>
-
-#include <libxml/tree.h>
-
-typedef struct _WindowManager WindowManager;
-
-struct _WindowManager {
- GnomeDesktopItem *dentry;
- gchar *config_exec;
- gchar *config_tryexec;
- gboolean session_managed : 1;
- gboolean is_user : 1;
- gboolean is_present : 1;
- gboolean is_config_present : 1;
-};
-
-/* Utility functions */
-gboolean is_blank (gchar *str);
-
-/* Fill in the is_present and is_config_present fields */
-void wm_check_present (WindowManager *wm);
-
-/* Management of window manager list */
-
-void wm_list_init (void);
-void wm_list_save (void);
-void wm_list_revert (void);
-void wm_list_add (WindowManager *window_manager);
-void wm_list_delete (WindowManager *window_manager);
-void wm_list_set_current (WindowManager *window_manager);
-WindowManager *wm_list_get_current (void);
-WindowManager *wm_list_get_revert (void);
-
-void wm_list_read_from_xml (xmlDocPtr doc);
-xmlDocPtr wm_list_write_to_xml (void);
-
-extern GList *window_managers;
-
-/* Management of current window manager */
-
-typedef enum {
- WM_SUCCESS,
- WM_ALREADY_RUNNING,
- WM_CANT_START
-} WMResult;
-
-typedef void (*WMResultFunc) (WMResult result, gpointer data);
-
-void wm_restart (WindowManager *new,
- GdkWindow *client,
- WMResultFunc callback,
- gpointer data);
-gboolean wm_is_running (void);
-WindowManager *wm_guess_current (void);
diff --git a/capplets/wm-properties/wm.desktop.in.in b/capplets/wm-properties/wm.desktop.in.in
deleted file mode 100644
index e4268c52b..000000000
--- a/capplets/wm-properties/wm.desktop.in.in
+++ /dev/null
@@ -1,61 +0,0 @@
-[Desktop Entry]
-Name=Window Manager Selector
-Name[pt_BR]=Gerenciador de Janelas
-Name[ca]=Gestor de finestres
-Name[cs]=Správce oken
-Name[da]=Vindueshåndtering
-Name[de]=Fenstermanager
-Name[el]=Äéá÷åéñéóôÞò Ðáñáèýñùí
-Name[es]=Gestor de ventanas
-Name[et]=Aknahaldur
-Name[fi]=Ikkunointiohjelma
-Name[fr]=Gestionnaire de fenêtres
-Name[gl]=Xestor de fiestras
-Name[hu]=Ablakkezelõ
-Name[it]=Window manager
-Name[ja]=¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã
-Name[ko]=â °ü¸®ÀÚ
-Name[lt]=Langø tvarkyklë
-Name[no]=Vindushåndterer
-Name[pl]=Mened¿er okien
-Name[pt]=Gestor de Janelas
-Name[ro]=Manager de ferestre
-Name[sl]=Upravljalnik oken
-Name[sv]=Fönsterhanterare
-Name[tr]=Pencere yöneticisi
-Name[uk]=÷¦ËÏÎÎÉÊ ÍÅÎÅÄÖÅÒ
-Name[wa]=Manaedjeu di purneas
-Name[zh_TW]=µøµ¡ºÞ²zµ{¦¡
-Name[zh_CN.GB2312]=ÊÓ´°¹ÜÀí³Ìʽ
-Comment=Choose a window manager
-Comment[pt_BR]=Selecionar um gerenciador de janelas
-Comment[ca]=Permet escollir el gestor de finestres.
-Comment[cs]=Volba správce oken
-Comment[da]=Vælg en vindueshåndterer.
-Comment[de]=Einen Fenstermanager auswählen
-Comment[es]=ÅðéëïãÞ äéá÷åéñéóôÞò ðáñáèýñùí
-Comment[es]=Permite elegir gestor de ventanas a usar con GNOME
-Comment[et]=Määrab aknahalduri
-Comment[fi]=Valitse ikkunointiohjelma
-Comment[fr]=Configuration du gestionnaire de fenêtres à utiliser avec GNOME
-Comment[gl]=Excoller un xestor de fiestras para usar con GNOME
-Comment[hu]=Ablakkezelõ választása
-Comment[it]=Selezione del Window Manager usato in GNOME
-Comment[ja]=¥¦¥£¥ó¥É¥¦¥Þ¥Í¡¼¥¸¥ã¤òÁª¤ó¤Ç²¼¤µ¤¤
-Comment[ko]=â °ü¸®ÀÚ ¼±ÅÃ
-Comment[lt]=Pasirinkti langø tvarkyklæ
-Comment[no]=Velg en vindushåndterer
-Comment[pl]=Wybór mened¿era okien
-Comment[pt]=Escolha o seu gestor de janelas
-Comment[ro]=Alegeþi un manager de ferestre
-Comment[sl]=Izberite upravljalca oken
-Comment[sv]=Välj en fönsterhanterare
-Comment[tr]=Bir pencere yöneticisini seç
-Comment[uk]=÷ÉÂ¦Ò ×¦ËÏÎÎÏÇÏ ÍÅÎÅÄÖÅÒÁ
-Comment[wa]=Tchwezixhoz li manaedjeu di purneas a eployî avou GNOME
-Comment[zh_TW]=¿ï¾Ü±z©Ò¨Ï¥Îªºµøµ¡ºÞ²zµ{¦¡
-Comment[zh_CN.GB2312]=Ñ¡ÔñÄúËùʹÓõÄÊÓ´°¹ÜÀí³Ìʽ
-Exec=wm-properties-capplet --sync
-Icon=gnome-ccwindowmanager.png
-Terminal=0
-Type=Application