[Xfce4-commits] <xfce4-cpugraph-plugin:taskbranch/bug-6700> Add icons

Florian Rivoal noreply at xfce.org
Mon Oct 4 13:36:02 CEST 2010


Updating branch refs/heads/taskbranch/bug-6700
         to 175a87e8313a45d0e61ada3712404a4938dcf7a2 (commit)
       from cacc35ee18a348a45b899690257a51889d55230f (commit)

commit 175a87e8313a45d0e61ada3712404a4938dcf7a2
Author: Florian Rivoal <frivoal at gmail.com>
Date:   Mon Oct 4 10:30:05 2010 +0900

    Add icons
    
    CPU Graph now has its own icon, available in 3 sizes. Thanks to Simon
    Steinbeiss for making it.
    
    Currently used only for the .desktop file.

 Makefile.am                           |    2 +-
 configure.ac                          |    4 ++++
 icons/16x16/Makefile.am               |    3 +++
 icons/16x16/xfce4-cpugraph-plugin.png |  Bin 0 -> 786 bytes
 icons/22x22/Makefile.am               |    3 +++
 icons/22x22/xfce4-cpugraph-plugin.png |  Bin 0 -> 1418 bytes
 icons/48x48/Makefile.am               |    3 +++
 icons/48x48/xfce4-cpugraph-plugin.png |  Bin 0 -> 3468 bytes
 icons/Makefile.am                     |   15 +++++++++++++++
 panel-plugin/cpugraph.desktop.in.in   |    2 +-
 panel-plugin/properties.c             |   10 ++--------
 11 files changed, 32 insertions(+), 10 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 23f8f3e..4a789e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,6 +1,6 @@
 @SET_MAKE@
 
-SUBDIRS = panel-plugin po
+SUBDIRS = panel-plugin po icons
 
 distclean-local:
 	rm -rf *.cache *~
diff --git a/configure.ac b/configure.ac
index 2da6786..c300ebd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -40,5 +40,9 @@ XDT_FEATURE_DEBUG()
 AC_OUTPUT([
 Makefile
 panel-plugin/Makefile
+icons/Makefile
+icons/16x16/Makefile
+icons/22x22/Makefile
+icons/48x48/Makefile
 po/Makefile.in
 ])
diff --git a/icons/16x16/Makefile.am b/icons/16x16/Makefile.am
new file mode 100644
index 0000000..592ff52
--- /dev/null
+++ b/icons/16x16/Makefile.am
@@ -0,0 +1,3 @@
+iconsdir = $(datadir)/icons/hicolor/16x16/apps
+icons_DATA = xfce4-cpugraph-plugin.png
+EXTRA_DIST = $(icons_DATA)
diff --git a/icons/16x16/xfce4-cpugraph-plugin.png b/icons/16x16/xfce4-cpugraph-plugin.png
new file mode 100644
index 0000000..61eb861
Binary files /dev/null and b/icons/16x16/xfce4-cpugraph-plugin.png differ
diff --git a/icons/22x22/Makefile.am b/icons/22x22/Makefile.am
new file mode 100644
index 0000000..5af4881
--- /dev/null
+++ b/icons/22x22/Makefile.am
@@ -0,0 +1,3 @@
+iconsdir = $(datadir)/icons/hicolor/22x22/apps
+icons_DATA = xfce4-cpugraph-plugin.png
+EXTRA_DIST = $(icons_DATA)
diff --git a/icons/22x22/xfce4-cpugraph-plugin.png b/icons/22x22/xfce4-cpugraph-plugin.png
new file mode 100644
index 0000000..df84dd3
Binary files /dev/null and b/icons/22x22/xfce4-cpugraph-plugin.png differ
diff --git a/icons/48x48/Makefile.am b/icons/48x48/Makefile.am
new file mode 100644
index 0000000..33b9590
--- /dev/null
+++ b/icons/48x48/Makefile.am
@@ -0,0 +1,3 @@
+iconsdir = $(datadir)/icons/hicolor/48x48/apps
+icons_DATA = xfce4-cpugraph-plugin.png
+EXTRA_DIST = $(icons_DATA)
diff --git a/icons/48x48/xfce4-cpugraph-plugin.png b/icons/48x48/xfce4-cpugraph-plugin.png
new file mode 100644
index 0000000..bf23f1f
Binary files /dev/null and b/icons/48x48/xfce4-cpugraph-plugin.png differ
diff --git a/icons/Makefile.am b/icons/Makefile.am
new file mode 100644
index 0000000..80cf5d5
--- /dev/null
+++ b/icons/Makefile.am
@@ -0,0 +1,15 @@
+SUBDIRS = 16x16 22x22 48x48
+
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+install-data-hook:
+	@-if test -z "$(DESTDIR)"; then					\
+		echo "Updating Gtk icon cache.";			\
+		$(gtk_update_icon_cache);				\
+	else								\
+		echo "*** Icon cache not updated. Remember to run:";	\
+		echo "***";						\
+		echo "***   $(gtk_update_icon_cache)";			\
+		echo "***";						\
+	fi
+
diff --git a/panel-plugin/cpugraph.desktop.in.in b/panel-plugin/cpugraph.desktop.in.in
index ee2fb22..f771a4c 100644
--- a/panel-plugin/cpugraph.desktop.in.in
+++ b/panel-plugin/cpugraph.desktop.in.in
@@ -3,6 +3,6 @@ Type=X-XFCE-PanelPlugin
 Encoding=UTF-8
 _Name=CPU Graph
 _Comment=Graphical representation of the CPU load
-Icon=xfce-mouse
+Icon=xfce4-cpugraph-plugin
 X-XFCE-Exec=@PLUGIN_PATH@/xfce4-cpugraph-plugin
 
diff --git a/panel-plugin/properties.c b/panel-plugin/properties.c
index eab342e..c4d5750 100644
--- a/panel-plugin/properties.c
+++ b/panel-plugin/properties.c
@@ -75,7 +75,7 @@ void create_options( XfcePanelPlugin *plugin, CPUGraph *base )
 
 	xfce_panel_plugin_block_menu( plugin );
 
-	dlg = gtk_dialog_new_with_buttons( _("CPU Graph Properties"),
+	dlg = xfce_titled_dialog_new_with_buttons( _("CPU Graph Properties"),
 	                                   GTK_WINDOW( gtk_widget_get_toplevel( GTK_WIDGET( plugin ) ) ),
 	                                   GTK_DIALOG_DESTROY_WITH_PARENT | GTK_DIALOG_NO_SEPARATOR,
 	                                   GTK_STOCK_CLOSE,
@@ -85,13 +85,7 @@ void create_options( XfcePanelPlugin *plugin, CPUGraph *base )
 
 	g_signal_connect( dlg, "response", G_CALLBACK( response_cb ), base );
 
-	gtk_container_set_border_width( GTK_CONTAINER( dlg ), 2 );
-
-	header = xfce_create_header( NULL, _("CPU Graph") );
-	gtk_widget_set_size_request( GTK_BIN( header )->child, -1, 32 );
-	gtk_container_set_border_width( GTK_CONTAINER( header ), BORDER - 2 );
-	gtk_widget_show( header );
-	gtk_box_pack_start( GTK_BOX( GTK_DIALOG( dlg )->vbox ), header, FALSE, TRUE, 0 );
+	gtk_window_set_icon_name( GTK_WINDOW (dlg), "xfce4-cpugraph-plugin" );
 
 	sg = gtk_size_group_new( GTK_SIZE_GROUP_HORIZONTAL );
 



More information about the Xfce4-commits mailing list