[gimp] app: get rid of a few forgotten stock-ids and new_from_stock()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: get rid of a few forgotten stock-ids and new_from_stock()
- Date: Sun, 29 Apr 2018 02:51:14 +0000 (UTC)
commit 4cc8481b669236b5aa80bf127a11e854a26681be
Author: Michael Natterer <mitch gimp org>
Date: Sun Apr 29 04:50:17 2018 +0200
app: get rid of a few forgotten stock-ids and new_from_stock()
app/dialogs/resize-dialog.c | 2 +-
app/display/gimptoolgui.c | 24 ++++++++++++------------
app/widgets/gimpcolordisplayeditor.c | 2 +-
app/widgets/gimpiconpicker.h | 2 +-
app/widgets/gimpoverlaydialog.c | 4 +---
5 files changed, 16 insertions(+), 18 deletions(-)
---
diff --git a/app/dialogs/resize-dialog.c b/app/dialogs/resize-dialog.c
index 9f573c5..c1447bc 100644
--- a/app/dialogs/resize-dialog.c
+++ b/app/dialogs/resize-dialog.c
@@ -274,7 +274,7 @@ resize_dialog_new (GimpViewable *viewable,
G_CALLBACK (offset_update),
private);
- button = gtk_button_new_from_stock (GIMP_ICON_CENTER);
+ button = gtk_button_new_with_mnemonic (_("C_enter"));
gtk_table_attach_defaults (GTK_TABLE (entry), button, 4, 5, 1, 2);
gtk_widget_show (button);
diff --git a/app/display/gimptoolgui.c b/app/display/gimptoolgui.c
index 7d90a53..3fcba0c 100644
--- a/app/display/gimptoolgui.c
+++ b/app/display/gimptoolgui.c
@@ -53,7 +53,7 @@ typedef struct _ResponseEntry ResponseEntry;
struct _ResponseEntry
{
gint response_id;
- gchar *stock_id;
+ gchar *button_text;
gint alternative_position;
gboolean sensitive;
};
@@ -104,7 +104,7 @@ static void gimp_tool_gui_canvas_resized (GtkWidget *canvas,
GimpToolGui *gui);
static ResponseEntry * response_entry_new (gint response_id,
- const gchar *stock_id);
+ const gchar *button_text);
static void response_entry_free (ResponseEntry *entry);
static ResponseEntry * response_entry_find (GList *entries,
gint response_id);
@@ -229,7 +229,7 @@ gimp_tool_gui_new (GimpToolInfo *tool_info,
GimpToolGui *gui;
GimpToolGuiPrivate *private;
va_list args;
- const gchar *stock_id;
+ const gchar *button_text;
g_return_val_if_fail (GIMP_IS_TOOL_INFO (tool_info), NULL);
@@ -258,15 +258,15 @@ gimp_tool_gui_new (GimpToolInfo *tool_info,
va_start (args, overlay);
- for (stock_id = va_arg (args, const gchar *);
- stock_id;
- stock_id = va_arg (args, const gchar *))
+ for (button_text = va_arg (args, const gchar *);
+ button_text;
+ button_text = va_arg (args, const gchar *))
{
gint response_id = va_arg (args, gint);
private->response_entries = g_list_append (private->response_entries,
response_entry_new (response_id,
- stock_id));
+ button_text));
}
va_end (args);
@@ -752,7 +752,7 @@ gimp_tool_gui_create_dialog (GimpToolGui *gui,
ResponseEntry *entry = list->data;
gimp_overlay_dialog_add_button (GIMP_OVERLAY_DIALOG (private->dialog),
- entry->stock_id,
+ entry->button_text,
entry->response_id);
if (! entry->sensitive)
@@ -786,7 +786,7 @@ gimp_tool_gui_create_dialog (GimpToolGui *gui,
ResponseEntry *entry = list->data;
gimp_dialog_add_button (GIMP_DIALOG (private->dialog),
- entry->stock_id,
+ entry->button_text,
entry->response_id);
if (! entry->sensitive)
@@ -955,12 +955,12 @@ gimp_tool_gui_canvas_resized (GtkWidget *canvas,
static ResponseEntry *
response_entry_new (gint response_id,
- const gchar *stock_id)
+ const gchar *button_text)
{
ResponseEntry *entry = g_slice_new0 (ResponseEntry);
entry->response_id = response_id;
- entry->stock_id = g_strdup (stock_id);
+ entry->button_text = g_strdup (button_text);
entry->alternative_position = -1;
entry->sensitive = TRUE;
@@ -970,7 +970,7 @@ response_entry_new (gint response_id,
static void
response_entry_free (ResponseEntry *entry)
{
- g_free (entry->stock_id);
+ g_free (entry->button_text);
g_slice_free (ResponseEntry, entry);
}
diff --git a/app/widgets/gimpcolordisplayeditor.c b/app/widgets/gimpcolordisplayeditor.c
index 8b1bc9d..50b635f 100644
--- a/app/widgets/gimpcolordisplayeditor.c
+++ b/app/widgets/gimpcolordisplayeditor.c
@@ -328,7 +328,7 @@ gimp_color_display_editor_init (GimpColorDisplayEditor *editor)
gtk_box_pack_end (GTK_BOX (editor->config_box), hbox, FALSE, FALSE, 0);
gtk_widget_show (hbox);
- editor->reset_button = gtk_button_new_from_stock (GIMP_ICON_RESET);
+ editor->reset_button = gtk_button_new_with_mnemonic (_("_Reset"));
gtk_box_pack_end (GTK_BOX (hbox), editor->reset_button, FALSE, FALSE, 0);
gtk_widget_show (editor->reset_button);
diff --git a/app/widgets/gimpiconpicker.h b/app/widgets/gimpiconpicker.h
index 261b638..d0c49d6 100644
--- a/app/widgets/gimpiconpicker.h
+++ b/app/widgets/gimpiconpicker.h
@@ -50,7 +50,7 @@ GtkWidget * gimp_icon_picker_new (Gimp *gimp);
const gchar * gimp_icon_picker_get_icon_name (GimpIconPicker *picker);
void gimp_icon_picker_set_icon_name (GimpIconPicker *picker,
- const gchar *stock_id);
+ const gchar *icon_name);
GdkPixbuf * gimp_icon_picker_get_icon_pixbuf (GimpIconPicker *picker);
void gimp_icon_picker_set_icon_pixbuf (GimpIconPicker *picker,
diff --git a/app/widgets/gimpoverlaydialog.c b/app/widgets/gimpoverlaydialog.c
index 2fe3ac7..d255747 100644
--- a/app/widgets/gimpoverlaydialog.c
+++ b/app/widgets/gimpoverlaydialog.c
@@ -549,10 +549,8 @@ gimp_overlay_dialog_add_button (GimpOverlayDialog *dialog,
response_id == GIMP_RESPONSE_DETACH)
return NULL;
- button = gtk_button_new_from_stock (button_text);
-
+ button = gtk_button_new_with_mnemonic (button_text);
gtk_widget_set_can_default (button, TRUE);
-
gtk_widget_show (button);
ad = get_response_data (button, TRUE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]