[libgda] Stop using deprecated GtkStock and GtkAction
- From: Vivien Malerba <vivien src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libgda] Stop using deprecated GtkStock and GtkAction
- Date: Wed, 16 Apr 2014 13:00:50 +0000 (UTC)
commit 7acf11f65746f15a59965c39e24ce8bff6820d8e
Author: Vivien Malerba <malerba gnome-db org>
Date: Sat Apr 12 21:28:23 2014 +0200
Stop using deprecated GtkStock and GtkAction
libgda-ui/data-entries/common-bin.c | 16 ++++----
libgda-ui/data-entries/plugins/common-pict.c | 37 +++++++++++--------
libgda-ui/data-entries/plugins/common-pict.h | 6 ++--
.../plugins/gdaui-data-cell-renderer-pict.c | 19 +++++-----
.../data-entries/plugins/gdaui-entry-filesel.c | 6 ++--
libgda-ui/data-entries/plugins/gdaui-entry-pict.c | 28 +++++++-------
libgda-ui/demos/basic_form.c | 3 +-
libgda-ui/demos/cloud.c | 3 +-
libgda-ui/demos/combo.c | 3 +-
libgda-ui/demos/data_model_dir.c | 3 +-
libgda-ui/demos/ddl_queries.c | 7 ++--
libgda-ui/demos/form.c | 3 +-
libgda-ui/demos/form_data_layout.c | 3 +-
libgda-ui/demos/form_model_change.c | 3 +-
libgda-ui/demos/form_pict.c | 3 +-
libgda-ui/demos/form_rw.c | 3 +-
libgda-ui/demos/grid.c | 3 +-
libgda-ui/demos/grid_data_layout.c | 3 +-
libgda-ui/demos/grid_model_change.c | 3 +-
libgda-ui/demos/grid_pict.c | 3 +-
libgda-ui/demos/grid_rw.c | 3 +-
libgda-ui/demos/linked_grid_form.c | 3 +-
libgda-ui/demos/linked_model_param.c | 3 +-
libgda-ui/demos/login.c | 3 +-
libgda-ui/demos/provider_sel.c | 3 +-
libgda-ui/demos/tree.c | 3 +-
libgda-ui/gdaui-basic-form.c | 8 ++---
libgda-ui/gdaui-login.c | 4 +-
libgda-ui/gdaui-raw-form.c | 2 +-
libgda-ui/gdaui-raw-grid.c | 27 ++++++--------
libgda-ui/gdaui-rt-editor.c | 6 ++--
libgda-ui/gdaui-server-operation.c | 16 ++++-----
libgda-ui/internal/utility.c | 4 +-
33 files changed, 110 insertions(+), 133 deletions(-)
---
diff --git a/libgda-ui/data-entries/common-bin.c b/libgda-ui/data-entries/common-bin.c
index ffcdcf6..27fa713 100644
--- a/libgda-ui/data-entries/common-bin.c
+++ b/libgda-ui/data-entries/common-bin.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -40,8 +40,8 @@ file_load_cb (GtkWidget *button, BinMenu *menu)
dlg = gtk_file_chooser_dialog_new (_("Select file to load"),
GTK_WINDOW (gtk_widget_get_toplevel (button)),
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);
if (menu->current_folder)
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg), menu->current_folder);
@@ -110,8 +110,8 @@ file_save_cb (GtkWidget *button, BinMenu *menu)
dlg = gtk_file_chooser_dialog_new (_("Select a file to save data to"),
GTK_WINDOW (gtk_widget_get_toplevel (button)),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Open"), GTK_RESPONSE_ACCEPT,
NULL);
if (menu->current_folder)
@@ -214,13 +214,13 @@ common_bin_create_menu (BinMenu *binmenu, PopupContainerPositionFunc pos_func, G
bbox = gtk_button_box_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (vbox), bbox, FALSE, FALSE, 0);
- button = gtk_button_new_from_stock (GTK_STOCK_OPEN);
+ button = gtk_button_new_from_icon_name ("document-open", GTK_ICON_SIZE_BUTTON);
gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
g_signal_connect (button, "clicked",
G_CALLBACK (file_load_cb), binmenu);
binmenu->load_button = button;
-
- button = gtk_button_new_from_stock (GTK_STOCK_SAVE_AS);
+
+ button = gtk_button_new_from_icon_name ("document-save-as", GTK_ICON_SIZE_BUTTON);
gtk_box_pack_start (GTK_BOX (bbox), button, FALSE, FALSE, 0);
g_signal_connect (button, "clicked",
G_CALLBACK (file_save_cb), binmenu);
diff --git a/libgda-ui/data-entries/plugins/common-pict.c b/libgda-ui/data-entries/plugins/common-pict.c
index 21229dc..83a57aa 100644
--- a/libgda-ui/data-entries/plugins/common-pict.c
+++ b/libgda-ui/data-entries/plugins/common-pict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This library is free software; you can redistribute it and/or
@@ -32,13 +32,16 @@
*/
gboolean
common_pict_load_data (PictOptions *options, const GValue *value, PictBinData *bindata,
- const gchar **stock, GError **error)
+ const gchar **out_icon_name, GError **error)
{
gboolean allok = TRUE;
+ g_assert (out_icon_name);
+ *out_icon_name = NULL;
+
if (value) {
if (gda_value_is_null ((GValue *) value)) {
- *stock = GTK_STOCK_MISSING_IMAGE;
+ *out_icon_name = "image-missing";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR, GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
"%s", _("No data"));
allok = FALSE;
@@ -70,7 +73,7 @@ common_pict_load_data (PictOptions *options, const GValue *value, PictBinData *b
memcpy (bindata->data, bin->data, bin->binary_length);
}
else {
- *stock = GTK_STOCK_DIALOG_ERROR;
+ *out_icon_name = "dialog-error";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR,
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
"%s", _("No data"));
allok = FALSE;
@@ -101,14 +104,14 @@ common_pict_load_data (PictOptions *options, const GValue *value, PictBinData *b
}
}
else {
- *stock = GTK_STOCK_MISSING_IMAGE;
+ *out_icon_name = "image-missing";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR,
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
"%s", _("Empty data"));
allok = FALSE;
}
}
else {
- *stock = GTK_STOCK_DIALOG_ERROR;
+ *out_icon_name = "dialog-error";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR,
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
"%s", _("Unhandled type of data"));
allok = FALSE;
@@ -116,7 +119,7 @@ common_pict_load_data (PictOptions *options, const GValue *value, PictBinData *b
}
}
else {
- *stock = GTK_STOCK_MISSING_IMAGE;
+ *out_icon_name = "image-missing";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR, GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
"%s", _("Empty data"));
allok = FALSE;
@@ -191,9 +194,11 @@ loader_size_prepared_cb (GdkPixbufLoader *loader, gint width, gint height, PictA
*/
GdkPixbuf *
common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocation *allocation,
- const gchar **stock, GError **error)
+ const gchar **out_icon_name, GError **error)
{
GdkPixbuf *retpixbuf = NULL;
+ g_assert (out_icon_name);
+ *out_icon_name = NULL;
if (bindata->data) {
if (options->serialize) {
@@ -206,7 +211,7 @@ common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocat
bindata->data = NULL;
bindata->data_length = 0;
- *stock = GTK_STOCK_DIALOG_ERROR;
+ *out_icon_name = "dialog-error";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR,
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
_("Error while deserializing data:\n%s"),
loc_error && loc_error->message ? loc_error->message : _("No
detail"));
@@ -216,7 +221,7 @@ common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocat
else {
retpixbuf = gdk_pixbuf_from_pixdata (&pixdata, FALSE, &loc_error);
if (!retpixbuf) {
- *stock = GTK_STOCK_DIALOG_ERROR;
+ *out_icon_name = "dialog-error";
g_set_error (error, GDAUI_DATA_ENTRY_ERROR,
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
_("Error while interpreting data as an image:\n%s"),
loc_error && loc_error->message ? loc_error->message :
_("No detail"));
@@ -254,7 +259,7 @@ common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocat
if (!retpixbuf) {
if (loc_error)
g_propagate_error (error, loc_error);
- *stock = GTK_STOCK_MISSING_IMAGE;
+ *out_icon_name = "image-missing";
}
else
g_object_ref (retpixbuf);
@@ -263,7 +268,7 @@ common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocat
gchar *notice_msg;
notice_msg = g_strdup_printf (_("Error while interpreting data as an
image:\n%s"),
loc_error && loc_error->message ?
loc_error->message : _("No detail"));
- *stock = GTK_STOCK_DIALOG_WARNING;
+ *out_icon_name = "dialog-warning";
g_set_error_literal (error, loc_error ? loc_error->domain :
GDAUI_DATA_ENTRY_ERROR,
loc_error ? loc_error->code :
GDAUI_DATA_ENTRY_INVALID_DATA_ERROR,
notice_msg);
@@ -360,8 +365,8 @@ file_load_cb (GtkWidget *button, PictMenuData *menudata)
dlg = gtk_file_chooser_dialog_new (_("Select image to load"),
GTK_WINDOW (gtk_widget_get_toplevel (button)),
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);
filter = gtk_file_filter_new ();
gtk_file_filter_add_pixbuf_formats (filter);
@@ -487,8 +492,8 @@ file_save_cb (GtkWidget *button, PictMenuData *menudata)
dlg = gtk_file_chooser_dialog_new (_("Select a file to save the image to"),
GTK_WINDOW (gtk_widget_get_toplevel (button)),
GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Save"), GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg),
gdaui_get_default_path ());
diff --git a/libgda-ui/data-entries/plugins/common-pict.h b/libgda-ui/data-entries/plugins/common-pict.h
index 77a881a..424e29d 100644
--- a/libgda-ui/data-entries/plugins/common-pict.h
+++ b/libgda-ui/data-entries/plugins/common-pict.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -66,10 +66,10 @@ GdkPixbuf *common_pict_fetch_cached_pixbuf (PictOptions *options, const GValue
void common_pict_clear_pixbuf_cache (PictOptions *options);
gboolean common_pict_load_data (PictOptions *options, const GValue *value, PictBinData *bindata,
- const gchar **stock, GError **error);
+ const gchar **out_icon_name, GError **error);
GdkPixbuf *common_pict_make_pixbuf (PictOptions *options, PictBinData *bindata, PictAllocation
*allocation,
- const gchar **stock, GError **error);
+ const gchar **out_icon_name, GError **error);
void common_pict_create_menu (PictMenu *pictmenu, GtkWidget *attach_to, PictBinData *bindata,
PictOptions *options,
PictCallback callback, gpointer data);
diff --git a/libgda-ui/data-entries/plugins/gdaui-data-cell-renderer-pict.c
b/libgda-ui/data-entries/plugins/gdaui-data-cell-renderer-pict.c
index 79f8598..9ba5246 100644
--- a/libgda-ui/data-entries/plugins/gdaui-data-cell-renderer-pict.c
+++ b/libgda-ui/data-entries/plugins/gdaui-data-cell-renderer-pict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -272,11 +272,11 @@ gdaui_data_cell_renderer_pict_set_property (GObject *object,
case PROP_VALUE:
/* Because we don't have a copy of the value, we MUST NOT free it! */
cell->priv->value = NULL;
- g_object_set (G_OBJECT (cell), "pixbuf", NULL, "stock-id", NULL, NULL);
+ g_object_set (G_OBJECT (cell), "pixbuf", NULL, "icon-name", NULL, NULL);
if (value) {
GValue *gval = g_value_get_boxed (value);
GdkPixbuf *pixbuf = NULL;
- const gchar *stock = NULL;
+ const gchar *icon_name = NULL;
GError *error = NULL;
if (!gval)
@@ -289,7 +289,8 @@ gdaui_data_cell_renderer_pict_set_property (GObject *object,
}
/* fill in cell->priv->data */
- if (common_pict_load_data (&(cell->priv->options), gval, &(cell->priv->bindata),
&stock, &error)) {
+ if (common_pict_load_data (&(cell->priv->options), gval, &(cell->priv->bindata),
+ &icon_name, &error)) {
/* try to make a pixbuf */
pixbuf = common_pict_fetch_cached_pixbuf (&(cell->priv->options), gval);
if (pixbuf)
@@ -297,13 +298,13 @@ gdaui_data_cell_renderer_pict_set_property (GObject *object,
else {
pixbuf = common_pict_make_pixbuf (&(cell->priv->options),
&(cell->priv->bindata),
&(cell->priv->size),
- &stock, &error);
+ &icon_name, &error);
if (pixbuf)
common_pict_add_cached_pixbuf (&(cell->priv->options), gval,
pixbuf);
}
- if (!pixbuf && !stock)
- stock = GTK_STOCK_MISSING_IMAGE;
+ if (!pixbuf && !icon_name)
+ icon_name = "image-missing";
}
/* display something */
@@ -312,8 +313,8 @@ gdaui_data_cell_renderer_pict_set_property (GObject *object,
g_object_unref (pixbuf);
}
- if (stock)
- g_object_set (G_OBJECT (cell), "stock-id", stock, NULL);
+ if (icon_name)
+ g_object_set (G_OBJECT (cell), "icon-name", icon_name, NULL);
if (error)
g_error_free (error);
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
b/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
index 3614f0e..f6591a5 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-filesel.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -197,8 +197,8 @@ button_clicked_cb (G_GNUC_UNUSED GtkWidget *button, GdauiEntryFilesel *filesel)
dlg = gtk_file_chooser_dialog_new (title,
(GtkWindow *) gtk_widget_get_ancestor (GTK_WIDGET (filesel),
GTK_TYPE_WINDOW),
filesel->priv->mode,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_APPLY, GTK_RESPONSE_ACCEPT,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Apply"), GTK_RESPONSE_ACCEPT,
NULL);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg),
gdaui_get_default_path ());
diff --git a/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
b/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
index 6f24010..c03df91 100644
--- a/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
+++ b/libgda-ui/data-entries/plugins/gdaui-entry-pict.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -205,7 +205,7 @@ gdaui_entry_pict_finalize (GObject * object)
parent_class->finalize (object);
}
-static void display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_stock, const
gchar *notice);
+static void display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_icon_name, const
gchar *notice);
static gboolean popup_menu_cb (GtkWidget *button, GdauiEntryPict *mgpict);
static gboolean event_cb (GtkWidget *button, GdkEvent *event, GdauiEntryPict *mgpict);
static void size_allocate_cb (GtkWidget *wid, GtkAllocation *allocation, GdauiEntryPict *mgpict);
@@ -242,7 +242,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
/* image */
wid = gtk_image_new ();
gtk_misc_set_alignment (GTK_MISC (wid), 0., .5);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (mgpict->priv->sw), wid);
+ gtk_container_add (GTK_CONTAINER (mgpict->priv->sw), wid);
gtk_widget_show (wid);
mgpict->priv->pict = wid;
@@ -255,7 +255,7 @@ create_entry (GdauiEntryWrapper *mgwrap)
g_signal_connect (G_OBJECT (mgpict), "event",
G_CALLBACK (event_cb), mgpict);
- display_image (mgpict, NULL, GTK_STOCK_MISSING_IMAGE, _("No data to display"));
+ display_image (mgpict, NULL, "image-missing", _("No data to display"));
g_signal_connect (G_OBJECT (mgpict), "realize",
G_CALLBACK (realize_cb), mgwrap);
@@ -353,7 +353,7 @@ static void
real_set_value (GdauiEntryWrapper *mgwrap, const GValue *value)
{
GdauiEntryPict *mgpict;
- const gchar *stock = NULL;
+ const gchar *icon_name = NULL;
gchar *notice_msg = NULL;
GError *error = NULL;
@@ -366,20 +366,20 @@ real_set_value (GdauiEntryWrapper *mgwrap, const GValue *value)
mgpict->priv->bindata.data_length = 0;
/* fill in mgpict->priv->data */
- if (!common_pict_load_data (&(mgpict->priv->options), value, &(mgpict->priv->bindata), &stock,
&error)) {
+ if (!common_pict_load_data (&(mgpict->priv->options), value, &(mgpict->priv->bindata), &icon_name,
&error)) {
notice_msg = g_strdup (error->message ? error->message : "");
g_error_free (error);
}
/* create (if possible) a pixbuf from mgpict->priv->bindata.data */
- display_image (mgpict, value, stock, notice_msg);
+ display_image (mgpict, value, icon_name, notice_msg);
g_free (notice_msg);
}
static void
-display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_stock, const gchar *notice)
+display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_icon_name, const gchar
*notice)
{
- const gchar *stock = error_stock;
+ const gchar *icon_name = error_icon_name;
gchar *notice_msg = NULL;
GdkPixbuf *pixbuf;
PictAllocation alloc;
@@ -397,7 +397,7 @@ display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_s
g_object_ref (pixbuf);
else {
pixbuf = common_pict_make_pixbuf (&(mgpict->priv->options), &(mgpict->priv->bindata), &alloc,
- &stock, &error);
+ &icon_name, &error);
if (pixbuf)
common_pict_add_cached_pixbuf (&(mgpict->priv->options), value, pixbuf);
}
@@ -412,14 +412,14 @@ display_image (GdauiEntryPict *mgpict, const GValue *value, const gchar *error_s
g_error_free (error);
}
else {
- stock = GTK_STOCK_MISSING_IMAGE;
+ icon_name = "image-missing";
notice_msg = g_strdup (_("Empty data"));
}
}
- if (stock)
- gtk_image_set_from_stock (GTK_IMAGE (mgpict->priv->pict),
- stock, GTK_ICON_SIZE_DIALOG);
+ if (icon_name)
+ gtk_image_set_from_icon_name (GTK_IMAGE (mgpict->priv->pict),
+ icon_name, GTK_ICON_SIZE_DIALOG);
gtk_widget_set_tooltip_text (mgpict->priv->pict, notice ? notice : notice_msg);
g_free (notice_msg);
diff --git a/libgda-ui/demos/basic_form.c b/libgda-ui/demos/basic_form.c
index ec9d777..ff78206 100644
--- a/libgda-ui/demos/basic_form.c
+++ b/libgda-ui/demos/basic_form.c
@@ -20,8 +20,7 @@ do_basic_form (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiBasicForm",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/cloud.c b/libgda-ui/demos/cloud.c
index fc96e53..cc7cdf2 100644
--- a/libgda-ui/demos/cloud.c
+++ b/libgda-ui/demos/cloud.c
@@ -76,8 +76,7 @@ do_cloud (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiCloud",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/combo.c b/libgda-ui/demos/combo.c
index 1b05165..511b33d 100644
--- a/libgda-ui/demos/combo.c
+++ b/libgda-ui/demos/combo.c
@@ -89,8 +89,7 @@ do_combo (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiCombo",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/data_model_dir.c b/libgda-ui/demos/data_model_dir.c
index 0c31bef..5074363 100644
--- a/libgda-ui/demos/data_model_dir.c
+++ b/libgda-ui/demos/data_model_dir.c
@@ -51,8 +51,7 @@ do_data_model_dir (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdaDataModelDir data model",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/ddl_queries.c b/libgda-ui/demos/ddl_queries.c
index 9c6bf87..a47630f 100644
--- a/libgda-ui/demos/ddl_queries.c
+++ b/libgda-ui/demos/ddl_queries.c
@@ -63,8 +63,7 @@ do_ddl_queries (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("DDL queries",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
data->top_window = window;
@@ -409,7 +408,7 @@ show_named_parameters (G_GNUC_UNUSED GtkButton *button, DemoData *data)
dlg = gtk_dialog_new_with_buttons ("Named parameters",
GTK_WINDOW (data->top_window),
GTK_DIALOG_MODAL,
- GTK_STOCK_CLOSE, GTK_RESPONSE_REJECT, NULL);
+ "Close", GTK_RESPONSE_REJECT, NULL);
label = gtk_label_new ("<b>Named parameters:</b>\n");
gtk_misc_set_alignment (GTK_MISC (label), 0., -1);
@@ -478,7 +477,7 @@ show_sql (G_GNUC_UNUSED GtkButton *button, DemoData *data)
dlg = gtk_message_dialog_new_with_markup (GTK_WINDOW (data->top_window),
GTK_DIALOG_MODAL,
- msg_type, GTK_BUTTONS_CLOSE, msg);
+ msg_type, GTK_BUTTONS_CLOSE, "%s", msg);
g_free (sql);
g_free (msg);
diff --git a/libgda-ui/demos/form.c b/libgda-ui/demos/form.c
index 24f9eaa..04b44b9 100644
--- a/libgda-ui/demos/form.c
+++ b/libgda-ui/demos/form.c
@@ -23,8 +23,7 @@ do_form (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiForm (RO)",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/form_data_layout.c b/libgda-ui/demos/form_data_layout.c
index 9aefd99..9fdad2c 100644
--- a/libgda-ui/demos/form_data_layout.c
+++ b/libgda-ui/demos/form_data_layout.c
@@ -25,8 +25,7 @@ do_form_data_layout (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Form with custom data layout",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/form_model_change.c b/libgda-ui/demos/form_model_change.c
index d2bf03a..9c90a5b 100644
--- a/libgda-ui/demos/form_model_change.c
+++ b/libgda-ui/demos/form_model_change.c
@@ -36,8 +36,7 @@ do_form_model_change (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Changing data in a GdauiForm",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/form_pict.c b/libgda-ui/demos/form_pict.c
index 867fe0c..18c5166 100644
--- a/libgda-ui/demos/form_pict.c
+++ b/libgda-ui/demos/form_pict.c
@@ -27,8 +27,7 @@ do_form_pict (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Form with the 'picture' plugin",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/form_rw.c b/libgda-ui/demos/form_rw.c
index dfeb911..adf12d4 100644
--- a/libgda-ui/demos/form_rw.c
+++ b/libgda-ui/demos/form_rw.c
@@ -23,8 +23,7 @@ do_form_rw (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiForm (RW)",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/grid.c b/libgda-ui/demos/grid.c
index a7888af..1373cae 100644
--- a/libgda-ui/demos/grid.c
+++ b/libgda-ui/demos/grid.c
@@ -23,8 +23,7 @@ do_grid (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiGrid (RO)",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/grid_data_layout.c b/libgda-ui/demos/grid_data_layout.c
index 76fab29..e143205 100644
--- a/libgda-ui/demos/grid_data_layout.c
+++ b/libgda-ui/demos/grid_data_layout.c
@@ -26,8 +26,7 @@ do_grid_data_layout (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Grid with custom data layout",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/grid_model_change.c b/libgda-ui/demos/grid_model_change.c
index db1ed16..cbd12dd 100644
--- a/libgda-ui/demos/grid_model_change.c
+++ b/libgda-ui/demos/grid_model_change.c
@@ -36,8 +36,7 @@ do_grid_model_change (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Changing data in a GdauiRawGrid",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/grid_pict.c b/libgda-ui/demos/grid_pict.c
index f103665..b5d730e 100644
--- a/libgda-ui/demos/grid_pict.c
+++ b/libgda-ui/demos/grid_pict.c
@@ -27,8 +27,7 @@ do_grid_pict (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Grid with the 'picture' plugin",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/grid_rw.c b/libgda-ui/demos/grid_rw.c
index b2ee8a2..65ba61f 100644
--- a/libgda-ui/demos/grid_rw.c
+++ b/libgda-ui/demos/grid_rw.c
@@ -23,8 +23,7 @@ do_grid_rw (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiGrid (RW)",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/linked_grid_form.c b/libgda-ui/demos/linked_grid_form.c
index 821ee4f..9341d9d 100644
--- a/libgda-ui/demos/linked_grid_form.c
+++ b/libgda-ui/demos/linked_grid_form.c
@@ -79,8 +79,7 @@ do_linked_grid_form (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("Linked grid and form on the same data",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/linked_model_param.c b/libgda-ui/demos/linked_model_param.c
index 3a76f6f..9855352 100644
--- a/libgda-ui/demos/linked_model_param.c
+++ b/libgda-ui/demos/linked_model_param.c
@@ -35,8 +35,7 @@ do_linked_model_param (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdaDataModel depending on a parameter",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/login.c b/libgda-ui/demos/login.c
index 1efa4e6..1b7857b 100644
--- a/libgda-ui/demos/login.c
+++ b/libgda-ui/demos/login.c
@@ -67,8 +67,7 @@ do_login (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiLogin widget",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/provider_sel.c b/libgda-ui/demos/provider_sel.c
index b3f3a69..b16607b 100644
--- a/libgda-ui/demos/provider_sel.c
+++ b/libgda-ui/demos/provider_sel.c
@@ -23,8 +23,7 @@ do_provider_sel (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdauiProviderSelector",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
gtk_window_set_resizable (GTK_WINDOW (window), FALSE);
g_signal_connect (window, "response",
diff --git a/libgda-ui/demos/tree.c b/libgda-ui/demos/tree.c
index 715885d..a62ef54 100644
--- a/libgda-ui/demos/tree.c
+++ b/libgda-ui/demos/tree.c
@@ -114,8 +114,7 @@ do_tree (GtkWidget *do_widget)
window = gtk_dialog_new_with_buttons ("GdaTree display",
GTK_WINDOW (do_widget),
0,
- GTK_STOCK_CLOSE,
- GTK_RESPONSE_NONE,
+ "Close", GTK_RESPONSE_NONE,
NULL);
g_signal_connect (window, "response",
G_CALLBACK (gtk_widget_destroy), NULL);
diff --git a/libgda-ui/gdaui-basic-form.c b/libgda-ui/gdaui-basic-form.c
index 5f9886d..6727418 100644
--- a/libgda-ui/gdaui-basic-form.c
+++ b/libgda-ui/gdaui-basic-form.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2010 - 2011 Murray Cumming <murrayc murrayc com>
*
@@ -2156,10 +2156,8 @@ gdaui_basic_form_new_in_dialog (GdaSet *data_set, GtkWindow *parent,
dlg = gtk_dialog_new_with_buttons (rtitle, parent,
GTK_DIALOG_MODAL,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT,
- GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
+ _("_Cancel"), GTK_RESPONSE_REJECT,
+ _("_Ok"), GTK_RESPONSE_ACCEPT,
NULL);
gtk_dialog_set_default_response (GTK_DIALOG (dlg), GTK_RESPONSE_ACCEPT);
if (header && *header) {
diff --git a/libgda-ui/gdaui-login.c b/libgda-ui/gdaui-login.c
index 3055cb2..d5edbce 100644
--- a/libgda-ui/gdaui-login.c
+++ b/libgda-ui/gdaui-login.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -197,7 +197,7 @@ gdaui_login_init (GdauiLogin *login, G_GNUC_UNUSED GdauiLoginClass *klass)
/* Create the DSN add button */
login->priv->cc_button = gtk_button_new_with_label (_("Data sources..."));
gtk_button_set_image (GTK_BUTTON (login->priv->cc_button),
- gtk_image_new_from_stock (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_BUTTON));
+ gtk_image_new_from_icon_name ("preferences-system", GTK_ICON_SIZE_BUTTON));
g_signal_connect (G_OBJECT (login->priv->cc_button), "clicked",
G_CALLBACK (run_cc_cb), login);
gtk_widget_show (login->priv->cc_button);
diff --git a/libgda-ui/gdaui-raw-form.c b/libgda-ui/gdaui-raw-form.c
index e2963cd..d1b92ec 100644
--- a/libgda-ui/gdaui-raw-form.c
+++ b/libgda-ui/gdaui-raw-form.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Bas Driessen <bas driessen xobas com>
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
diff --git a/libgda-ui/gdaui-raw-grid.c b/libgda-ui/gdaui-raw-grid.c
index d4647f8..1656b3b 100644
--- a/libgda-ui/gdaui-raw-grid.c
+++ b/libgda-ui/gdaui-raw-grid.c
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2009 Bas Driessen <bas driessen xobas com>
- * Copyright (C) 2009 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -1869,7 +1869,6 @@ static void menu_set_filter_cb (GtkWidget *widget, GdauiRawGrid *grid);
static void menu_unset_filter_cb (GtkWidget *widget, GdauiRawGrid *grid);
static void menu_copy_row_cb (GtkWidget *widget, GdauiRawGrid *grid);
static GtkWidget *new_menu_item (const gchar *label,
- gboolean pixmap,
GCallback cb_func,
gpointer user_data);
static GtkWidget *new_check_menu_item (const gchar *label,
@@ -1939,18 +1938,18 @@ tree_view_popup_button_pressed_cb (G_GNUC_UNUSED GtkWidget *widget, GdkEventButt
}
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- new_menu_item (GTK_STOCK_COPY, TRUE,
+ new_menu_item (_("_Copy"),
G_CALLBACK (menu_copy_row_cb), grid));
if (sel_mode == GTK_SELECTION_MULTIPLE)
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- new_menu_item (_("Select _All"), FALSE,
+ new_menu_item (_("Select _All"),
G_CALLBACK (menu_select_all_cb), grid));
if ((sel_mode == GTK_SELECTION_SINGLE) || (sel_mode == GTK_SELECTION_MULTIPLE))
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- new_menu_item (_("_Clear Selection"), FALSE,
+ new_menu_item (_("_Clear Selection"),
G_CALLBACK (menu_unselect_all_cb), grid));
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
new_check_menu_item (_("Show Column _Titles"),
@@ -1958,17 +1957,17 @@ tree_view_popup_button_pressed_cb (G_GNUC_UNUSED GtkWidget *widget, GdkEventButt
G_CALLBACK (menu_show_columns_cb), grid));
gtk_menu_shell_append (GTK_MENU_SHELL (menu),
- new_menu_item (_("_Set filter"), FALSE,
+ new_menu_item (_("_Set filter"),
G_CALLBACK (menu_set_filter_cb), grid));
- mitem = new_menu_item (_("_Unset filter"), FALSE, G_CALLBACK (menu_unset_filter_cb), grid);
+ mitem = new_menu_item (_("_Unset filter"), G_CALLBACK (menu_unset_filter_cb), grid);
gtk_menu_shell_append (GTK_MENU_SHELL (menu), mitem);
if (!gda_data_proxy_get_filter_expr (grid->priv->proxy))
gtk_widget_set_sensitive (mitem, FALSE);
if (sel_mode != GTK_SELECTION_NONE) {
gtk_menu_shell_append (GTK_MENU_SHELL (menu), gtk_separator_menu_item_new ());
- gtk_menu_shell_append (GTK_MENU_SHELL (menu), new_menu_item (GTK_STOCK_SAVE_AS, TRUE,
+ gtk_menu_shell_append (GTK_MENU_SHELL (menu), new_menu_item (_("Save _As"),
G_CALLBACK (menu_save_as_cb),
grid));
}
@@ -1983,16 +1982,12 @@ tree_view_popup_button_pressed_cb (G_GNUC_UNUSED GtkWidget *widget, GdkEventButt
static GtkWidget *
new_menu_item (const gchar *label,
- gboolean pixmap,
GCallback cb_func,
gpointer user_data)
{
GtkWidget *item;
- if (pixmap)
- item = gtk_image_menu_item_new_from_stock (label, NULL);
- else
- item = gtk_menu_item_new_with_mnemonic (label);
+ item = gtk_menu_item_new_with_mnemonic (label);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (cb_func), user_data);
@@ -2151,8 +2146,8 @@ menu_save_as_cb (G_GNUC_UNUSED GtkWidget *widget, GdauiRawGrid *grid)
/* create dialog box */
dialog = gtk_dialog_new_with_buttons (_("Saving Data"),
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (grid))), 0,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
+ _("_Cancel"), GTK_RESPONSE_CANCEL,
+ _("_Save"), GTK_RESPONSE_OK,
NULL);
gtk_window_set_resizable (GTK_WINDOW (dialog), TRUE);
gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
@@ -2504,7 +2499,7 @@ confirm_file_overwrite (GtkWindow *parent, const gchar *path)
_("If you choose yes, the contents will be lost."));
g_free (msg);
- button = gtk_button_new_from_stock (GTK_STOCK_CANCEL);
+ button = gtk_button_new_with_label (_("_Cancel"));
gtk_widget_set_can_default (button, TRUE);
gtk_dialog_set_default_response (GTK_DIALOG (dialog),
GTK_RESPONSE_NO);
diff --git a/libgda-ui/gdaui-rt-editor.c b/libgda-ui/gdaui-rt-editor.c
index 12f925b..1ec6345 100644
--- a/libgda-ui/gdaui-rt-editor.c
+++ b/libgda-ui/gdaui-rt-editor.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2010 - 2012 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2010 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
* This library is free software; you can redistribute it and/or
@@ -689,8 +689,8 @@ add_image_cb (G_GNUC_UNUSED GtkAction *action, GdauiRtEditor *rte)
dlg = gtk_file_chooser_dialog_new (_("Select image to load"),
GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget*) rte)),
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);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dlg),
gdaui_get_default_path ());
diff --git a/libgda-ui/gdaui-server-operation.c b/libgda-ui/gdaui-server-operation.c
index 5cd6b07..7909f88 100644
--- a/libgda-ui/gdaui-server-operation.c
+++ b/libgda-ui/gdaui-server-operation.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2011 Murray Cumming <murrayc murrayc com>
*
@@ -380,7 +380,7 @@ sequence_grid_attach_widget (GdauiServerOperation *form, GtkWidget *grid, GtkWid
gtk_widget_show (wid);
/* "-" button */
- image = gtk_image_new_from_stock (GTK_STOCK_REMOVE, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name ("list-remove", GTK_ICON_SIZE_MENU);
wid = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (wid), image);
gtk_grid_attach (GTK_GRID (grid), wid, 1, index, 1, 1);
@@ -462,7 +462,7 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
model = info_node->model;
grid = gdaui_raw_grid_new (model);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (plwid), grid);
+ gtk_container_add (GTK_CONTAINER (plwid), grid);
gtk_viewport_set_shadow_type (GTK_VIEWPORT (gtk_bin_get_child (GTK_BIN (plwid))),
GTK_SHADOW_NONE);
gdaui_data_proxy_set_write_mode (GDAUI_DATA_PROXY (grid),
@@ -565,7 +565,7 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
size = gda_server_operation_get_sequence_size (form->priv->op, path);
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 10);
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (plwid), grid);
+ gtk_container_add (GTK_CONTAINER (plwid), grid);
gtk_viewport_set_shadow_type (GTK_VIEWPORT (gtk_bin_get_child (GTK_BIN (plwid))),
GTK_SHADOW_NONE);
gtk_widget_show (grid);
@@ -598,7 +598,7 @@ fill_create_widget (GdauiServerOperation *form, const gchar *path, gchar **secti
gtk_grid_attach (GTK_GRID (grid), wid, 0, size, 1, 1);
gtk_widget_show (wid);
- image = gtk_image_new_from_stock (GTK_STOCK_ADD, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name ("list-add", GTK_ICON_SIZE_MENU);
wid = gtk_button_new ();
gtk_button_set_image (GTK_BUTTON (wid), image);
gtk_grid_attach (GTK_GRID (grid), wid, 1, size, 1, 1);
@@ -1094,10 +1094,8 @@ gdaui_server_operation_new_in_dialog (GdaServerOperation *op, GtkWindow *parent,
dlg = gtk_dialog_new_with_buttons (rtitle, parent,
GTK_DIALOG_MODAL,
- GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT,
+ _("_Ok"), GTK_RESPONSE_ACCEPT,
+ _("_Cancel"), GTK_RESPONSE_REJECT,
NULL);
dcontents = gtk_dialog_get_content_area (GTK_DIALOG (dlg));
diff --git a/libgda-ui/internal/utility.c b/libgda-ui/internal/utility.c
index e527362..4350e95 100644
--- a/libgda-ui/internal/utility.c
+++ b/libgda-ui/internal/utility.c
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2009 - 2011 Vivien Malerba <malerba gnome-db org>
+ * Copyright (C) 2009 - 2014 Vivien Malerba <malerba gnome-db org>
* Copyright (C) 2010 David King <davidk openismus com>
* Copyright (C) 2012 Snicksie <none none com>
*
@@ -486,7 +486,7 @@ _gdaui_utility_show_error (GtkWindow *parent, const gchar *format, ...)
GTK_BUTTONS_CLOSE, "%s", str);
g_free (str);
gtk_dialog_add_action_widget (GTK_DIALOG (dialog),
- gtk_button_new_from_stock (GTK_STOCK_OK),
+ gtk_button_new_with_label (_("Ok")),
GTK_RESPONSE_OK);
gtk_widget_show_all (dialog);
gtk_dialog_run (GTK_DIALOG (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]