summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMuktha <muktha.narayan@wipro.com>2004-02-16 17:32:32 +0000
committerJody Goldberg <jody@src.gnome.org>2004-02-16 17:32:32 +0000
commitcdb5349d9a5b3793b47d16c11b72eb8132ed6542 (patch)
tree625cd436b1e9f5068cace8fbdf888fa508cbcb5d
parentf2c66eb0de67eca52777ac20f8b3248e9fd2e214 (diff)
downloadgnome-control-center-cdb5349d9a5b3793b47d16c11b72eb8132ed6542.tar.gz
Do not popup the logout dialog when the close button (X) of window manager
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-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. 2003-12-07 Jan Arne Petersen <jpetersen@uni-bonn.de> * background-properties-capplet.c: remove unused "preview_file_selection.h" include. 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-16 Jody Goldberg <jody@gnome.org> * gnome-settings-accessibility-keyboard.c : include libgnome/gnome-help.h to avoid potential crash on 64 bit arches. (ax_response_callback) : actually display the error message on failure. 2004-02-16 Jody Goldberg <jody@gnome.org> http://bugzilla.gnome.org/show_bug.cgi?id=134389 * Makefile.am : Patch from jmmv@menta.net (Julio M. Merino Vidal) to honour the standard schema install flags. I've extended the patch to support builddir != srcdir too
-rw-r--r--capplets/accessibility/at-properties/ChangeLog5
-rw-r--r--capplets/accessibility/at-properties/main.c2
-rw-r--r--capplets/accessibility/keyboard/ChangeLog12
-rw-r--r--capplets/accessibility/keyboard/accessibility-keyboard.c124
-rw-r--r--capplets/background/ChangeLog5
-rw-r--r--capplets/background/background-properties-capplet.c1
6 files changed, 70 insertions, 79 deletions
diff --git a/capplets/accessibility/at-properties/ChangeLog b/capplets/accessibility/at-properties/ChangeLog
index c9a3ecdeb..129787019 100644
--- a/capplets/accessibility/at-properties/ChangeLog
+++ b/capplets/accessibility/at-properties/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/capplets/accessibility/at-properties/main.c b/capplets/accessibility/at-properties/main.c
index 6faa63584..570339ede 100644
--- a/capplets/accessibility/at-properties/main.c
+++ b/capplets/accessibility/at-properties/main.c
@@ -95,7 +95,7 @@ cb_dialog_response (GtkDialog *dialog, gint response_id)
capplet_help (GTK_WINDOW (dialog),
"foo.xml",
"bar");
- else if (response_id == GTK_RESPONSE_CLOSE)
+ else if (response_id == GTK_RESPONSE_CLOSE || response_id == GTK_RESPONSE_DELETE_EVENT)
gtk_main_quit ();
else {
g_message ("CLOSE AND LOGOUT!");
diff --git a/capplets/accessibility/keyboard/ChangeLog b/capplets/accessibility/keyboard/ChangeLog
index b3774095a..13d0334f8 100644
--- a/capplets/accessibility/keyboard/ChangeLog
+++ b/capplets/accessibility/keyboard/ChangeLog
@@ -1,3 +1,15 @@
+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
diff --git a/capplets/accessibility/keyboard/accessibility-keyboard.c b/capplets/accessibility/keyboard/accessibility-keyboard.c
index 13779c370..aaba5d538 100644
--- a/capplets/accessibility/keyboard/accessibility-keyboard.c
+++ b/capplets/accessibility/keyboard/accessibility-keyboard.c
@@ -323,16 +323,16 @@ xrm_get_int (GConfClient *client, XrmDatabase *db, char const *gconf_key,
/* This loads the current users XKB settings from their file */
static gboolean
-load_CDE_file (GtkFileSelection *fsel)
+load_CDE_file (GtkFileChooser *fchooser)
{
- char const *file = gtk_file_selection_get_filename (fsel);
+ 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 (fsel)),
+ 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);
@@ -340,6 +340,7 @@ load_CDE_file (GtkFileSelection *fsel)
"response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (warn);
+ g_free (file);
return FALSE;
}
@@ -390,7 +391,7 @@ load_CDE_file (GtkFileSelection *fsel)
* break string freeze
*/
GtkWidget *warn = gtk_message_dialog_new (
- gtk_window_get_transient_for (GTK_WINDOW (fsel)),
+ 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);
@@ -398,95 +399,64 @@ load_CDE_file (GtkFileSelection *fsel)
"response",
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (warn);
+ g_free (file);
return FALSE;
}
+ g_free(file);
return TRUE;
}
static void
-fsel_dialog_finish (GtkWidget *fsel)
+fchooser_handle_response (GtkFileChooser *fchooser, gint response, gpointer data)
{
- gtk_widget_hide_all (fsel);
-}
-
-static void
-fsel_handle_ok (GtkWidget *widget, GtkFileSelection *fsel)
-{
- gchar const *file_name;
-
- file_name = gtk_file_selection_get_filename (fsel);
-
- /* Change into directory if that's what user selected */
- if (g_file_test (file_name, G_FILE_TEST_IS_DIR)) {
- gint name_len;
- gchar *dir_name;
-
- name_len = strlen (file_name);
- if (name_len < 1 || file_name [name_len - 1] != '/') {
- /* The file selector needs a '/' at the end of a directory name */
- dir_name = g_strconcat (file_name, "/", NULL);
- } else {
- dir_name = g_strdup (file_name);
- }
- gtk_file_selection_set_filename (fsel, dir_name);
- g_free (dir_name);
- } else if (load_CDE_file (fsel))
- fsel_dialog_finish (GTK_WIDGET (fsel));
-}
+ char *file_name;
-static void
-fsel_handle_cancel (GtkWidget *widget, GtkFileSelection *fsel)
-{
- fsel_dialog_finish (GTK_WIDGET (fsel));
-}
+ if (response == GTK_RESPONSE_OK) {
+ file_name = gtk_file_chooser_get_filename (fchooser);
-static gint
-fsel_delete_event (GtkWidget *fsel, GdkEventAny *event)
-{
- fsel_dialog_finish (fsel);
- return TRUE;
-}
+ /* 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));
-static gint
-fsel_key_event (GtkWidget *fsel, GdkEventKey *event, gpointer user_data)
-{
- if (event->keyval == GDK_Escape) {
- gtk_signal_emit_stop_by_name (GTK_OBJECT (fsel), "key_press_event");
- fsel_dialog_finish (fsel);
- return TRUE;
+ g_free (file_name);
+ } else {
+ gtk_widget_destroy (GTK_WIDGET (fchooser));
}
-
- return FALSE;
}
-static GtkFileSelection *fsel = NULL;
static void
cb_load_CDE_file (GtkButton *button, GtkWidget *dialog)
{
- if (fsel == NULL) {
- fsel = GTK_FILE_SELECTION (
- gtk_file_selection_new (_("Import Feature Settings File")));
-
- gtk_file_selection_hide_fileop_buttons (GTK_FILE_SELECTION (fsel));
- gtk_file_selection_set_select_multiple (GTK_FILE_SELECTION (fsel), FALSE);
-
- gtk_window_set_modal (GTK_WINDOW (fsel), TRUE);
- gtk_window_set_transient_for (GTK_WINDOW (fsel),
- GTK_WINDOW (gtk_widget_get_toplevel (dialog)));
- g_signal_connect (G_OBJECT (fsel->ok_button),
- "clicked",
- G_CALLBACK (fsel_handle_ok), fsel);
- g_signal_connect (G_OBJECT (fsel->cancel_button),
- "clicked",
- G_CALLBACK (fsel_handle_cancel), fsel);
- g_signal_connect (G_OBJECT (fsel),
- "key_press_event",
- G_CALLBACK (fsel_key_event), NULL);
- g_signal_connect (G_OBJECT (fsel),
- "delete_event",
- G_CALLBACK (fsel_delete_event), NULL);
- }
- gtk_widget_show_all (GTK_WIDGET (fsel));
+ GtkFileChooser *fchooser;
+ GdkRectangle rect;
+ GtkWindow *toplevel = GTK_WINDOW (gtk_widget_get_toplevel (dialog));
+ int kludge_height;
+
+ /* the new file selectors vertical height negotiation isn't wonderful,
+ * kludge up a rough version that uses a fraction of the screen height for now */
+ gdk_screen_get_monitor_geometry (toplevel->screen, 0, &rect);
+ kludge_height = rect.height * .6;
+ if (kludge_height < 400)
+ kludge_height = rect.height * .9;
+
+ 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_default_size (GTK_WINDOW (fchooser), -1, kludge_height);
+ 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));
}
/*******************************************************************************/
diff --git a/capplets/background/ChangeLog b/capplets/background/ChangeLog
index 772674ebc..e83ccaa62 100644
--- a/capplets/background/ChangeLog
+++ b/capplets/background/ChangeLog
@@ -1,3 +1,8 @@
+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
diff --git a/capplets/background/background-properties-capplet.c b/capplets/background/background-properties-capplet.c
index 686076448..c42667164 100644
--- a/capplets/background/background-properties-capplet.c
+++ b/capplets/background/background-properties-capplet.c
@@ -37,7 +37,6 @@
#include "capplet-util.h"
#include "gconf-property-editor.h"
#include "applier.h"
-#include "preview-file-selection.h"
#include "activate-settings-daemon.h"
enum