From: John Darrington Date: Sun, 21 Jun 2015 19:45:24 +0000 (+0200) Subject: Replace GtkStock, GtkVBox and GtkHBox with their non-deprecated equivalents X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5831a8313d57d5810328cd004ef87108dbdf7663;p=pspp Replace GtkStock, GtkVBox and GtkHBox with their non-deprecated equivalents --- diff --git a/src/ui/gui/aggregate-dialog.c b/src/ui/gui/aggregate-dialog.c index e89943b6c4..c6f5ad838f 100644 --- a/src/ui/gui/aggregate-dialog.c +++ b/src/ui/gui/aggregate-dialog.c @@ -153,11 +153,12 @@ choose_filename (struct aggregate *fd) GtkFileFilter *filter; GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Aggregate destination file"), - GTK_WINDOW (fd->de), - GTK_FILE_CHOOSER_ACTION_SAVE, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, - NULL); + GTK_WINDOW (fd->de), + GTK_FILE_CHOOSER_ACTION_SAVE, + _("Cancel"), GTK_RESPONSE_CANCEL, + _("Save"), GTK_RESPONSE_ACCEPT, + NULL); + g_object_set (dialog, "local-only", FALSE, NULL); gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (dialog), TRUE); diff --git a/src/ui/gui/page-assistant.c b/src/ui/gui/page-assistant.c index 0920f6503e..c55359ef56 100644 --- a/src/ui/gui/page-assistant.c +++ b/src/ui/gui/page-assistant.c @@ -84,10 +84,10 @@ init_assistant (GtkWindow *parent_window) g_signal_connect (a->assistant, "prepare", G_CALLBACK (on_prepare), ia); g_signal_connect (a->assistant, "cancel", G_CALLBACK (on_cancel), ia); g_signal_connect (a->assistant, "close", G_CALLBACK (on_close), ia); - a->paste_button = gtk_button_new_from_stock (GTK_STOCK_PASTE); + a->paste_button = gtk_button_new_with_label (_("Paste")); gtk_assistant_add_action_widget (a->assistant, a->paste_button); g_signal_connect (a->paste_button, "clicked", G_CALLBACK (on_paste), ia); - a->reset_button = gtk_button_new_from_stock ("pspp-stock-reset"); + a->reset_button = gtk_button_new_with_label (_("Reset")); gtk_assistant_add_action_widget (a->assistant, a->reset_button); g_signal_connect (a->reset_button, "clicked", G_CALLBACK (on_reset), ia); gtk_window_set_title (GTK_WINDOW (a->assistant), diff --git a/src/ui/gui/page-file.c b/src/ui/gui/page-file.c index 10453b9f37..9280446b0f 100644 --- a/src/ui/gui/page-file.c +++ b/src/ui/gui/page-file.c @@ -192,8 +192,8 @@ choose_file (GtkWindow *parent_window, gchar **encodingp) GtkWidget *dialog = gtk_file_chooser_dialog_new (_("Import Delimited Text Data"), parent_window, GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("Cancel"), GTK_RESPONSE_CANCEL, + _("Open"), GTK_RESPONSE_ACCEPT, NULL); g_object_set (dialog, "local-only", FALSE, NULL); diff --git a/src/ui/gui/psppire-means-layer.c b/src/ui/gui/psppire-means-layer.c index 8046b00765..cde00d04df 100644 --- a/src/ui/gui/psppire-means-layer.c +++ b/src/ui/gui/psppire-means-layer.c @@ -29,7 +29,7 @@ static void psppire_means_layer_class_init (PsppireMeansLayerClass *class); static void psppire_means_layer_init (PsppireMeansLayer *window); -G_DEFINE_TYPE (PsppireMeansLayer, psppire_means_layer, GTK_TYPE_VBOX); +G_DEFINE_TYPE (PsppireMeansLayer, psppire_means_layer, GTK_TYPE_BOX); static GObjectClass *parent_class = NULL; @@ -164,9 +164,11 @@ psppire_means_layer_init (PsppireMeansLayer *ml) GtkWidget *alignment = gtk_alignment_new (0, 0.5, 0, 0); GtkWidget *sw = gtk_scrolled_window_new (NULL, NULL); + gtk_orientable_set_orientation (GTK_ORIENTABLE (ml), GTK_ORIENTATION_VERTICAL); + ml->dispose_has_run = FALSE; - ml->forward = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); - ml->back = gtk_button_new_from_stock (GTK_STOCK_GO_BACK); + ml->forward = gtk_button_new_with_label (_("Forward")); + ml->back = gtk_button_new_with_label (_("Back")); ml->var_view = psppire_var_view_new (); ml->label = gtk_label_new (""); diff --git a/src/ui/gui/psppire-means-layer.h b/src/ui/gui/psppire-means-layer.h index ecf019d80d..d36ab8b354 100644 --- a/src/ui/gui/psppire-means-layer.h +++ b/src/ui/gui/psppire-means-layer.h @@ -52,7 +52,7 @@ typedef struct _PsppireMeansLayerClass PsppireMeansLayerClass; struct _PsppireMeansLayer { - GtkVBox parent; + GtkBox parent; /* */ GtkWidget *var_view; @@ -69,7 +69,7 @@ struct _PsppireMeansLayer struct _PsppireMeansLayerClass { - GtkVBoxClass parent_class; + GtkBoxClass parent_class; }; GType psppire_means_layer_get_type (void); diff --git a/src/ui/gui/psppire-window.c b/src/ui/gui/psppire-window.c index f40dbf0563..bc28a15fd1 100644 --- a/src/ui/gui/psppire-window.c +++ b/src/ui/gui/psppire-window.c @@ -521,11 +521,11 @@ psppire_window_query_save (PsppireWindow *se) GTK_RESPONSE_REJECT); cancel_button = gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_CANCEL, + _("Cancel"), GTK_RESPONSE_CANCEL); gtk_dialog_add_button (GTK_DIALOG (dialog), - GTK_STOCK_SAVE, + _("Save"), GTK_RESPONSE_APPLY); gtk_widget_grab_focus (cancel_button); @@ -700,8 +700,8 @@ psppire_window_file_chooser_dialog (PsppireWindow *toplevel) gtk_file_chooser_dialog_new (_("Open"), GTK_WINDOW (toplevel), GTK_FILE_CHOOSER_ACTION_OPEN, - GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, - GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, + _("Cancel"), GTK_RESPONSE_CANCEL, + _("Save"), GTK_RESPONSE_ACCEPT, NULL); g_object_set (dialog, "local-only", FALSE, NULL);