[gnome-nibbles] Remove extra buttons that we don't currently use
- From: Bryan Quigley <bryanquigs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-nibbles] Remove extra buttons that we don't currently use
- Date: Sun, 5 Jan 2014 23:34:45 +0000 (UTC)
commit cea80940ee7b8ddad91dd912e72c916cf475d218
Author: Bryan Quigley <bryanquigs src gnome org>
Date: Sun Jan 5 18:02:37 2014 -0500
Remove extra buttons that we don't currently use
src/games-scores-dialog.c | 55 ++++----------------------------------------
src/games-scores-dialog.h | 2 -
2 files changed, 5 insertions(+), 52 deletions(-)
---
diff --git a/src/games-scores-dialog.c b/src/games-scores-dialog.c
index 556a177..9fafa8f 100644
--- a/src/games-scores-dialog.c
+++ b/src/games-scores-dialog.c
@@ -433,54 +433,6 @@ void games_scores_dialog_set_hilight (GamesScoresDialog *self, guint pos)
games_scores_dialog_set_hilight_private (self);
}
-/**
- * set_buttons:
- * @self: a pointer to a GamesScoresDialog
- * @buttons: An or-ed list of GamesScoresButtons
- *
- * Changes the button sets at the buttom of the dialog
- *
- **/
-void games_scores_dialog_set_buttons (GamesScoresDialog *self, guint buttons)
-{
- /* Remove an existing buttons. */
- gtk_container_foreach (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (self))),
- (GtkCallback) (gtk_widget_destroy), NULL);
-
- /* The default is a single close button, suitable for the scores
- menu item. */
- if (buttons == 0)
- buttons = GAMES_SCORES_CLOSE_BUTTON;
-
- if (buttons & GAMES_SCORES_QUIT_BUTTON) {
- gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_QUIT,
- GTK_RESPONSE_REJECT);
- gtk_dialog_set_default_response (GTK_DIALOG (self),
- GTK_RESPONSE_REJECT);
- }
-
- if (buttons & GAMES_SCORES_UNDO_BUTTON) {
- gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_UNDO,
- GTK_RESPONSE_DELETE_EVENT);
- gtk_dialog_set_default_response (GTK_DIALOG (self),
- GTK_RESPONSE_DELETE_EVENT);
- }
-
- if (buttons & GAMES_SCORES_NEW_GAME_BUTTON) {
- gtk_dialog_add_button (GTK_DIALOG (self), _("New Game"),
- GTK_RESPONSE_ACCEPT);
- gtk_dialog_set_default_response (GTK_DIALOG (self),
- GTK_RESPONSE_ACCEPT);
- }
-
- if (buttons & GAMES_SCORES_CLOSE_BUTTON) {
- gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CLOSE,
- GTK_RESPONSE_CLOSE);
- gtk_dialog_set_default_response (GTK_DIALOG (self),
- GTK_RESPONSE_CLOSE);
- }
-}
-
static void games_scores_dialog_init (GamesScoresDialog *self)
{
GtkWidget *vbox;
@@ -594,8 +546,11 @@ static void games_scores_dialog_init (GamesScoresDialog *self)
self->priv->column = column;
gtk_container_add (GTK_CONTAINER (scroll), listview);
-
- games_scores_dialog_set_buttons (self, GAMES_SCORES_CLOSE_BUTTON);
+
+ gtk_dialog_add_button (GTK_DIALOG (self), GTK_STOCK_CLOSE,
+ GTK_RESPONSE_CLOSE);
+ gtk_dialog_set_default_response (GTK_DIALOG (self),
+ GTK_RESPONSE_CLOSE);
gtk_window_set_destroy_with_parent (GTK_WINDOW (self), TRUE);
diff --git a/src/games-scores-dialog.h b/src/games-scores-dialog.h
index 8b168ae..c79d79a 100644
--- a/src/games-scores-dialog.h
+++ b/src/games-scores-dialog.h
@@ -74,8 +74,6 @@ void games_scores_dialog_set_hilight (GamesScoresDialog *self
guint pos);
void games_scores_dialog_set_message (GamesScoresDialog *self,
const gchar *message);
-void games_scores_dialog_set_buttons (GamesScoresDialog *self,
- guint buttons);
G_END_DECLS
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]