summaryrefslogtreecommitdiff
path: root/capplets
diff options
context:
space:
mode:
authorzhuyaliang <[email protected]>2023-04-04 11:39:52 +0800
committerLuke from DC <[email protected]>2023-04-05 03:16:24 +0000
commite6409a52cd242ec4564585525ff85912cb9c9c61 (patch)
tree613ed3806c927bffcb4262a66a2df469c43e9160 /capplets
parent4be54ce126c7f511f63d5b6d02d3d9a6c3c15f32 (diff)
downloadmate-control-center-e6409a52cd242ec4564585525ff85912cb9c9c61.tar.bz2
mate-control-center-e6409a52cd242ec4564585525ff85912cb9c9c61.tar.xz
appearance: use mate_image_menu_item replace gtk_image_menu_item
Diffstat (limited to 'capplets')
-rw-r--r--capplets/appearance/appearance-ui.c8
-rw-r--r--capplets/appearance/appearance.h1
-rw-r--r--capplets/appearance/data/appearance.ui88
3 files changed, 69 insertions, 28 deletions
diff --git a/capplets/appearance/appearance-ui.c b/capplets/appearance/appearance-ui.c
index 5b0437d7..ebf67ba9 100644
--- a/capplets/appearance/appearance-ui.c
+++ b/capplets/appearance/appearance-ui.c
@@ -42,22 +42,22 @@ set_have_icons (AppearanceData *data, gboolean value)
const char **name;
for (name = menu_item_names; *name != NULL; name++) {
- GtkImageMenuItem *item = GTK_IMAGE_MENU_ITEM (appearance_capplet_get_widget (data, *name));
+ MateImageMenuItem *item = MATE_IMAGE_MENU_ITEM (appearance_capplet_get_widget (data, *name));
GtkWidget *image;
if (value) {
image = g_object_get_data (G_OBJECT (item), "image");
if (image) {
- gtk_image_menu_item_set_image (item, image);
+ mate_image_menu_item_set_image (item, image);
g_object_unref (image);
}
}
else
{
- image = gtk_image_menu_item_get_image (item);
+ image = mate_image_menu_item_get_image (item);
g_object_set_data (G_OBJECT (item), "image", image);
g_object_ref (image);
- gtk_image_menu_item_set_image (item, NULL);
+ mate_image_menu_item_set_image (item, NULL);
}
}
}
diff --git a/capplets/appearance/appearance.h b/capplets/appearance/appearance.h
index 4aa7cb1e..0a01ddcf 100644
--- a/capplets/appearance/appearance.h
+++ b/capplets/appearance/appearance.h
@@ -27,6 +27,7 @@
#include <gtk/gtk.h>
#include <gio/gio.h>
#include <libmate-desktop/mate-desktop-thumbnail.h>
+#include <libmate-desktop/mate-image-menu-item.h>
#include "mate-theme-info.h"
diff --git a/capplets/appearance/data/appearance.ui b/capplets/appearance/data/appearance.ui
index 700565f0..6c64cae7 100644
--- a/capplets/appearance/data/appearance.ui
+++ b/capplets/appearance/data/appearance.ui
@@ -28,6 +28,46 @@ Author: Wolfgang Ulbrich
<!-- interface-description appearance properties dialog window -->
<!-- interface-copyright MATE Developers -->
<!-- interface-authors Wolfgang Ulbrich -->
+ <object class="GtkImage" id="menu_gtk_paste">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-paste</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_new">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-new</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_open">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-open</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_save">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-save</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_print">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-print</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_quit">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-quit</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_cut">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-cut</property>
+ </object>
+ <object class="GtkImage" id="menu_gtk_copy">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">gtk-copy</property>
+ </object>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step-increment">1</property>
@@ -3486,30 +3526,30 @@ Author: Wolfgang Ulbrich
<object class="GtkMenu" id="File Menu_menu">
<property name="can-focus">False</property>
<child>
- <object class="GtkImageMenuItem" id="menu_item_1">
- <property name="label">gtk-new</property>
+ <object class="MateImageMenuItem" id="menu_item_1">
+ <property name="label" translatable="yes">_New</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_new</property>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="menu_item_2">
- <property name="label">gtk-open</property>
+ <object class="MateImageMenuItem" id="menu_item_2">
+ <property name="label" translatable="yes">_Open</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_open</property>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="menu_item_3">
- <property name="label">gtk-save</property>
+ <object class="MateImageMenuItem" id="menu_item_3">
+ <property name="label" translatable="yes">_Save</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_save</property>
</object>
</child>
<child>
@@ -3519,12 +3559,12 @@ Author: Wolfgang Ulbrich
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="menu_item_4">
- <property name="label">gtk-print</property>
+ <object class="MateImageMenuItem" id="menu_item_4">
+ <property name="label" translatable="yes">_Print</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_print</property>
</object>
</child>
<child>
@@ -3534,12 +3574,12 @@ Author: Wolfgang Ulbrich
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="menu_item_5">
- <property name="label">gtk-quit</property>
+ <object class="MateImageMenuItem" id="menu_item_5">
+ <property name="label" translatable="yes">_Quit</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_quit</property>
</object>
</child>
</object>
@@ -3556,30 +3596,30 @@ Author: Wolfgang Ulbrich
<object class="GtkMenu" id="edit1_menu">
<property name="can-focus">False</property>
<child>
- <object class="GtkImageMenuItem" id="cut">
- <property name="label">gtk-cut</property>
+ <object class="MateImageMenuItem" id="cut">
+ <property name="label" translatable="yes">cu_T</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_cut</property>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="copy">
- <property name="label">gtk-copy</property>
+ <object class="MateImageMenuItem" id="copy">
+ <property name="label" translatable="yes">_Copy</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_copy</property>
</object>
</child>
<child>
- <object class="GtkImageMenuItem" id="paste">
- <property name="label">gtk-paste</property>
+ <object class="MateImageMenuItem" id="paste">
+ <property name="label" translatable="yes">_Paste</property>
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-underline">True</property>
- <property name="use-stock">True</property>
+ <property name="image">menu_gtk_paste</property>
</object>
</child>
</object>