summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorAlex Duggan <aldug@astrolinux.com>2004-12-13 19:00:14 +0000
committerAlex Duggan <aldug@src.gnome.org>2004-12-13 19:00:14 +0000
commit8235fa831fb8376d594080dc5cf74cec20be8974 (patch)
treeb597d26bc7ede1beb6104ad934174a73700e2935 /src/tools
parentd9f4f54b7d7382521b1ad4fa73e9683069f19c4d (diff)
downloadmetacity-8235fa831fb8376d594080dc5cf74cec20be8974.tar.gz
metacity-8235fa831fb8376d594080dc5cf74cec20be8974.tar.bz2
Remove deprecated capplet from GNOME 2.0
2004-12-07 Alex Duggan <aldug@astrolinux.com> * configure.in: * src/tools/Makefile.am: Remove deprecated capplet from GNOME 2.0 * src/tools/metacity-properties.c: * src/tools/metacity-properties.desktop.in: * src/tools/metacity-properties.glade: * src/tools/metacity-properties.png: Removed from cvs
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/Makefile.am38
-rw-r--r--src/tools/metacity-properties.c154
-rw-r--r--src/tools/metacity-properties.desktop.in8
-rw-r--r--src/tools/metacity-properties.glade206
-rw-r--r--src/tools/metacity-properties.pngbin1565 -> 0 bytes
5 files changed, 3 insertions, 403 deletions
diff --git a/src/tools/Makefile.am b/src/tools/Makefile.am
index 8c6c272..fe02c2c 100644
--- a/src/tools/Makefile.am
+++ b/src/tools/Makefile.am
@@ -4,9 +4,7 @@ icondir=$(pkgdatadir)/icons
icon_DATA=metacity-window-demo.png
INCLUDES=@METACITY_WINDOW_DEMO_CFLAGS@ @METACITY_MESSAGE_CFLAGS@ \
- @METACITY_PROPS_CFLAGS@ -DMETACITY_ICON_DIR=\"$(pkgdatadir)/icons\" \
- -DMETACITY_PROPS_GLADEDIR=\"$(pkgdatadir)/glade\" \
- -DMETACITY_PROPS_ICON_DIR=\"$(datadir)/pixmaps\" \
+ -DMETACITY_ICON_DIR=\"$(pkgdatadir)/icons\" \
-DMETACITY_LOCALEDIR=\"$(prefix)/@DATADIRNAME@/locale\"
metacity_message_SOURCES= \
@@ -21,34 +19,7 @@ metacity_mag_SOURCES= \
metacity_grayscale_SOURCES= \
metacity-grayscale.c
-metacity_properties_SOURCES= \
- metacity-properties.c
-
-metacity_properties_LDFLAGS = -export-dynamic
-
-uidir=$(pkgdatadir)/glade
-ui_DATA=metacity-properties.glade
-
-propicondir=$(datadir)/pixmaps
-propicon_DATA=metacity-properties.png
-
-METACITY_PROPERTIES_DESKTOP_IN=metacity-properties.desktop.in
-if BUILD_CONFIG_DIALOG
-METACITY_PROPERTIES_DESKTOP=metacity-properties.desktop
-else
-METACITY_PROPERTIES_DESKTOP=
-endif
-
-desktopdir=$(datadir)/control-center-2.0/capplets
-desktop_DATA=$(METACITY_PROPERTIES_DESKTOP)
-
-if BUILD_CONFIG_DIALOG
-CONFIG_DIALOG=metacity-properties
-else
-CONFIG_DIALOG=
-endif
-
-bin_PROGRAMS=metacity-message metacity-window-demo $(CONFIG_DIALOG)
+bin_PROGRAMS=metacity-message metacity-window-demo
## cheesy hacks I use, don't really have any business existing. ;-)
noinst_PROGRAMS=metacity-mag metacity-grayscale
@@ -57,9 +28,6 @@ metacity_message_LDADD= @METACITY_MESSAGE_LIBS@
metacity_window_demo_LDADD= @METACITY_WINDOW_DEMO_LIBS@
metacity_mag_LDADD= @METACITY_WINDOW_DEMO_LIBS@
metacity_grayscale_LDADD = @METACITY_WINDOW_DEMO_LIBS@
-if BUILD_CONFIG_DIALOG
-metacity_properties_LDADD= @METACITY_PROPS_LIBS@
-endif
-EXTRA_DIST=$(icon_DATA) $(ui_DATA) $(propicon_DATA) $(METACITY_PROPERTIES_DESKTOP_IN)
+EXTRA_DIST=$(icon_DATA)
diff --git a/src/tools/metacity-properties.c b/src/tools/metacity-properties.c
deleted file mode 100644
index 76534cc..0000000
--- a/src/tools/metacity-properties.c
+++ /dev/null
@@ -1,154 +0,0 @@
-/* Metacity control panel */
-
-/*
- * Copyright (C) 2002 Sun Microsystems, Inc.
- * Copyright (C) 2002 Red Hat, 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.
- */
-
-#include <config.h>
-#include <glade/glade.h>
-#include <gtk/gtk.h>
-#include <libintl.h>
-#include <string.h>
-#include <gconf/gconf-client.h>
-
-void update_config (GtkWidget *widget, gpointer user_data);
-
-static GConfClient *gconf_client;
-static GtkWidget *click_radio;
-static GtkWidget *point_radio;
-static GtkWidget *autoraise_check;
-
-#define KEY_DIR "/apps/metacity/general"
-#define KEY_FOCUS_MODE "/apps/metacity/general/focus_mode"
-#define KEY_AUTO_RAISE "/apps/metacity/general/auto_raise"
-
-static void
-update_ui (void)
-{
- char *focus_mode;
-
- focus_mode = gconf_client_get_string (gconf_client,
- KEY_FOCUS_MODE,
- NULL);
-
- if (focus_mode == NULL)
- focus_mode = g_strdup ("click");
-
- if (strcmp (focus_mode, "click") == 0)
- {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (click_radio),
- TRUE);
- gtk_widget_set_sensitive(autoraise_check, FALSE);
- }
- else
- {
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (point_radio),
- TRUE);
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (autoraise_check),
- gconf_client_get_bool (gconf_client,
- KEY_AUTO_RAISE,
- NULL));
- gtk_widget_set_sensitive(autoraise_check, TRUE);
- }
-
- g_free (focus_mode);
-}
-
-static void
-key_change_cb (GConfClient *client, guint cnxn_id,
- GConfEntry *entry, gpointer user_data)
-{
- update_ui ();
-}
-
-void
-update_config (GtkWidget *widget, gpointer user_data)
-{
- const char *focus_mode = NULL;
-
- if (GTK_TOGGLE_BUTTON (click_radio)->active == TRUE)
- {
- focus_mode = "click";
- }
- else
- {
- focus_mode = "sloppy";
- }
-
- gconf_client_set_string (gconf_client,
- KEY_FOCUS_MODE,
- focus_mode,
- NULL);
-
- gconf_client_set_bool (gconf_client, KEY_AUTO_RAISE,
- GTK_TOGGLE_BUTTON (autoraise_check)->active, NULL);
-}
-
-int
-main (int argc, char **argv)
-{
- GladeXML *xml;
- GdkPixbuf *pixbuf;
- GtkWidget *window;
-
- bindtextdomain (GETTEXT_PACKAGE, METACITY_LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
- textdomain (GETTEXT_PACKAGE);
-
- gtk_init (&argc, &argv);
-
- xml = glade_xml_new (METACITY_PROPS_GLADEDIR
- "/metacity-properties.glade", NULL, NULL);
-
- click_radio = glade_xml_get_widget (xml, "Clickfocus");
- point_radio = glade_xml_get_widget (xml, "Pointfocus");
- autoraise_check = glade_xml_get_widget (xml, "Autoraise");
- window = glade_xml_get_widget (xml, "Mainwindow");
-
- pixbuf = gdk_pixbuf_new_from_file (METACITY_PROPS_ICON_DIR
- "/metacity-properties.png", NULL);
-
- gtk_window_set_icon (GTK_WINDOW (window), pixbuf);
- g_object_unref (G_OBJECT (pixbuf));
-
- gconf_client = gconf_client_get_default ();
- gconf_client_add_dir (gconf_client,
- KEY_DIR,
- GCONF_CLIENT_PRELOAD_NONE,
- NULL);
- gconf_client_notify_add (gconf_client,
- KEY_FOCUS_MODE,
- key_change_cb,
- NULL, NULL, NULL);
- gconf_client_notify_add (gconf_client,
- KEY_AUTO_RAISE,
- key_change_cb,
- NULL, NULL, NULL);
-
- update_ui ();
-
- glade_xml_signal_autoconnect (xml);
-
- gtk_widget_show_all (window);
-
- gtk_main ();
-
- return 0;
-}
-
diff --git a/src/tools/metacity-properties.desktop.in b/src/tools/metacity-properties.desktop.in
deleted file mode 100644
index d12b55b..0000000
--- a/src/tools/metacity-properties.desktop.in
+++ /dev/null
@@ -1,8 +0,0 @@
-[Desktop Entry]
-_Name=Window Focus
-_Comment=Select how to give focus to windows
-Exec=metacity-properties
-Icon=metacity-properties.png
-Terminal=0
-Type=Application
-Categories=Application;Settings;
diff --git a/src/tools/metacity-properties.glade b/src/tools/metacity-properties.glade
deleted file mode 100644
index c98017e..0000000
--- a/src/tools/metacity-properties.glade
+++ /dev/null
@@ -1,206 +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="Mainwindow">
- <property name="title" translatable="yes">Window Focus 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">True</property>
- <signal name="close" handler="gtk_main_quit" last_modification_time="Tue, 28 May 2002 18:10:39 GMT"/>
- <signal name="response" handler="gtk_main_quit" last_modification_time="Tue, 28 May 2002 18:12:39 GMT"/>
-
- <child internal-child="vbox">
- <widget class="GtkVBox" id="dialog-vbox1">
- <property name="border_width">2</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
-
- <child internal-child="action_area">
- <widget class="GtkHButtonBox" id="dialog-action_area1">
- <property name="border_width">5</property>
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">10</property>
-
- <child>
- <widget class="GtkButton" id="helpbutton">
- <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="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>
- <signal name="clicked" handler="gtk_main_quit" last_modification_time="Tue, 28 May 2002 18:19:12 GMT"/>
- </widget>
- </child>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="border_width">8</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">8</property>
-
- <child>
- <widget class="GtkLabel" id="label5">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Focus behavior:</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="GtkRadioButton" id="Clickfocus">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Clic_k to give focus</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="label5" type="labelled-by"/>
- </accessibility>
- <signal name="toggled" handler="update_config" last_modification_time="Tue, 28 May 2002 20:59:55 GMT"/>
- <signal name="clicked" handler="update_config" last_modification_time="Tue, 28 May 2002 21:19:56 GMT"/>
- </widget>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
-
- <child>
- <widget class="GtkRadioButton" id="Pointfocus">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Point to give focus</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">Clickfocus</property>
- <accessibility>
- <atkrelation target="label5" type="labelled-by"/>
- <atkrelation target="Autoraise" type="controller-for"/>
- </accessibility>
- <signal name="toggled" handler="update_config" last_modification_time="Tue, 28 May 2002 21:00:02 GMT"/>
- </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">17</property>
-
- <child>
- <widget class="GtkLabel" id="label4">
- <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="GtkCheckButton" id="Autoraise">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Raise window on focus</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="Pointfocus" type="controlled-by"/>
- </accessibility>
- <signal name="toggled" handler="update_config" last_modification_time="Tue, 28 May 2002 21:00:14 GMT"/>
- </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/src/tools/metacity-properties.png b/src/tools/metacity-properties.png
deleted file mode 100644
index 8b5d9c3..0000000
--- a/src/tools/metacity-properties.png
+++ /dev/null
Binary files differ