[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 06/11] find-dialog: Change "Cancel" button to "Close" button.
From: |
Ben Pfaff |
Subject: |
[PATCH 06/11] find-dialog: Change "Cancel" button to "Close" button. |
Date: |
Sun, 15 Apr 2012 16:58:28 -0700 |
This button doesn't cancel anything, it just closes the dialog box,
so "Close" seems like a better label.
---
src/ui/gui/find.ui | 2 +-
src/ui/gui/psppire-buttonbox.c | 11 ++++++++++-
src/ui/gui/psppire-buttonbox.h | 1 +
3 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/src/ui/gui/find.ui b/src/ui/gui/find.ui
index ed226ad..e5e9f06 100644
--- a/src/ui/gui/find.ui
+++ b/src/ui/gui/find.ui
@@ -249,7 +249,7 @@
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK |
GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK |
GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property>
- <property name="buttons">PSPPIRE_BUTTON_CANCEL_MASK |
PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_RESET_MASK</property>
+ <property name="buttons">PSPPIRE_BUTTON_CLOSE_MASK |
PSPPIRE_BUTTON_HELP_MASK | PSPPIRE_BUTTON_RESET_MASK</property>
</object>
<packing>
<property name="expand">False</property>
diff --git a/src/ui/gui/psppire-buttonbox.c b/src/ui/gui/psppire-buttonbox.c
index 1d52d16..89d24c3 100644
--- a/src/ui/gui/psppire-buttonbox.c
+++ b/src/ui/gui/psppire-buttonbox.c
@@ -1,5 +1,5 @@
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2010, 2011 Free Software Foundation
+ Copyright (C) 2007, 2010, 2011, 2012 Free Software Foundation
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
@@ -152,6 +152,7 @@ typedef enum
PSPPIRE_BUTTON_GOTO_MASK = (1 << PSPPIRE_BUTTON_GOTO),
PSPPIRE_BUTTON_CONTINUE_MASK = (1 << PSPPIRE_BUTTON_CONTINUE),
PSPPIRE_BUTTON_CANCEL_MASK = (1 << PSPPIRE_BUTTON_CANCEL),
+ PSPPIRE_BUTTON_CLOSE_MASK = (1 << PSPPIRE_BUTTON_CLOSE),
PSPPIRE_BUTTON_HELP_MASK = (1 << PSPPIRE_BUTTON_HELP),
PSPPIRE_BUTTON_RESET_MASK = (1 << PSPPIRE_BUTTON_RESET),
PSPPIRE_BUTTON_PASTE_MASK = (1 << PSPPIRE_BUTTON_PASTE)
@@ -175,6 +176,7 @@ psppire_button_box_class_init (PsppireButtonBoxClass *class)
PSPPIRE_TYPE_BUTTON_MASK,
PSPPIRE_BUTTON_OK_MASK |
PSPPIRE_BUTTON_CANCEL_MASK |
+ PSPPIRE_BUTTON_CLOSE_MASK |
PSPPIRE_BUTTON_RESET_MASK |
PSPPIRE_BUTTON_HELP_MASK |
PSPPIRE_BUTTON_PASTE_MASK,
@@ -350,6 +352,12 @@ psppire_button_box_init (PsppireButtonBox *bb)
psppire_box_pack_start_defaults (GTK_BOX (bb),
bb->button[PSPPIRE_BUTTON_CANCEL]);
g_object_set (bb->button[PSPPIRE_BUTTON_CANCEL], "no-show-all", TRUE, NULL);
+ bb->button[PSPPIRE_BUTTON_CLOSE] = gtk_button_new_from_stock
(GTK_STOCK_CLOSE);
+ g_signal_connect (bb->button[PSPPIRE_BUTTON_CLOSE], "clicked",
+ G_CALLBACK (close_dialog), NULL);
+ psppire_box_pack_start_defaults (GTK_BOX (bb),
bb->button[PSPPIRE_BUTTON_CLOSE]);
+ g_object_set (bb->button[PSPPIRE_BUTTON_CLOSE], "no-show-all", TRUE, NULL);
+
bb->button[PSPPIRE_BUTTON_RESET] = gtk_button_new_from_stock
("pspp-stock-reset");
g_signal_connect (bb->button[PSPPIRE_BUTTON_RESET], "clicked",
@@ -486,6 +494,7 @@ psppire_button_flags_get_type (void)
{ PSPPIRE_BUTTON_GOTO_MASK, "PSPPIRE_BUTTON_GOTO_MASK", "Goto
case/variable" },
{ PSPPIRE_BUTTON_CONTINUE_MASK,"PSPPIRE_BUTTON_CONTINUE_MASK",
"Accept and close the subdialog" },
{ PSPPIRE_BUTTON_CANCEL_MASK, "PSPPIRE_BUTTON_CANCEL_MASK", "Close
dialog and discard settings" },
+ { PSPPIRE_BUTTON_CLOSE_MASK, "PSPPIRE_BUTTON_CLOSE_MASK", "Close
dialog" },
{ PSPPIRE_BUTTON_HELP_MASK, "PSPPIRE_BUTTON_HELP_MASK",
"Invoke context sensitive help" },
{ PSPPIRE_BUTTON_RESET_MASK, "PSPPIRE_BUTTON_RESET_MASK",
"Restore dialog to its default settings" },
{ PSPPIRE_BUTTON_PASTE_MASK, "PSPPIRE_BUTTON_PASTE_MASK",
"Accept dialog and paste syntax" },
diff --git a/src/ui/gui/psppire-buttonbox.h b/src/ui/gui/psppire-buttonbox.h
index 8d3d6ef..dc6eb5c 100644
--- a/src/ui/gui/psppire-buttonbox.h
+++ b/src/ui/gui/psppire-buttonbox.h
@@ -41,6 +41,7 @@ enum
PSPPIRE_BUTTON_GOTO,
PSPPIRE_BUTTON_CONTINUE,
PSPPIRE_BUTTON_CANCEL,
+ PSPPIRE_BUTTON_CLOSE,
PSPPIRE_BUTTON_HELP,
PSPPIRE_BUTTON_RESET,
PSPPIRE_BUTTON_PASTE,
--
1.7.2.5
- [PATCH 00/11] first batch of psppsheet changes, Ben Pfaff, 2012/04/15
- [PATCH 01/11] psppire-data-editor: Drop psppire_data_editor_set_font() redundancy., Ben Pfaff, 2012/04/15
- [PATCH 04/11] psppire-buttonbox: Fix style in header file., Ben Pfaff, 2012/04/15
- [PATCH 03/11] psppire-data-store: Use NULL for a null pointer., Ben Pfaff, 2012/04/15
- [PATCH 02/11] psppire-data-store: Use PSPPIRE namespace instead of GTK+'s., Ben Pfaff, 2012/04/15
- [PATCH 06/11] find-dialog: Change "Cancel" button to "Close" button.,
Ben Pfaff <=
- [PATCH 05/11] gtkxpaned: Remove write-only variables., Ben Pfaff, 2012/04/15
- [PATCH 08/11] psppire-dict: Get rid of static var in auto_generate_var_name()., Ben Pfaff, 2012/04/15
- [PATCH 07/11] Allow dictionary 'var_deleted' callback to examine the deleted var., Ben Pfaff, 2012/04/15
- [PATCH 09/11] psppire-dict: Make auto_generate_var_name() public, and rename., Ben Pfaff, 2012/04/15
- [PATCH 10/11] psppire-dict: Return new var from psppire_dict_insert_variable()., Ben Pfaff, 2012/04/15
- [PATCH 11/11] psppire-dict: Better validate idx arg in psppire_dict_get_variable()., Ben Pfaff, 2012/04/15
- Re: [PATCH 00/11] first batch of psppsheet changes, John Darrington, 2012/04/16