ui: Set icon on the preferences dialog
authorZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 6 May 2010 23:42:26 +0000 (02:42 +0300)
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>
Thu, 6 May 2010 23:42:26 +0000 (02:42 +0300)
src/ui/Makefile.am
src/ui/rygel-preferences-dialog.vala

index ece8e78..8190238 100644 (file)
@@ -1,7 +1,9 @@
 if UNINSTALLED
 shareddir = $(abs_top_builddir)/data
+icondir = $(shareddir)/icons
 else
 shareddir = $(datadir)/rygel
+icondir = $(datadir)/icons/hicolor
 endif
 
 rygeldir = $(top_srcdir)/src/rygel
@@ -16,7 +18,7 @@ AM_CFLAGS = $(LIBGUPNP_CFLAGS) \
            $(LIBSOUP_CFLAGS) \
            $(LIBDBUS_GLIB_CFLAGS) \
            -I$(top_srcdir) -I$(rygeldir) -DDATA_DIR='"$(shareddir)"' \
-           -include config.h
+           -DICON_DIR='"$(icondir)"' -include config.h
 
 bin_PROGRAMS = rygel-preferences
 
index 065cda8..bf90656 100644 (file)
@@ -27,6 +27,7 @@ using CStuff;
 public class Rygel.PreferencesDialog : GLib.Object {
     const string UI_FILE = BuildConfig.DATA_DIR + "/rygel-preferences.ui";
     const string DIALOG = "preferences-dialog";
+    const string ICON = BuildConfig.ICON_DIR + "/32x32/apps/rygel.png";
 
     UserConfig config;
     Builder builder;
@@ -42,6 +43,8 @@ public class Rygel.PreferencesDialog : GLib.Object {
         this.dialog = (Dialog) this.builder.get_object (DIALOG);
         assert (this.dialog != null);
 
+        this.dialog.set_icon_from_file (ICON);
+
         this.sections = new ArrayList<PreferencesSection> ();
         this.sections.add (new GeneralPrefSection (this.builder, this.config));
         this.sections.add (new TrackerPrefSection (this.builder, this.config));