Git-Url: 
http://git.frugalware.org/gitweb/gitweb.cgi?p=gservice.git;a=commitdiff;h=113449704ca2051689f6cfe14fae12917ab41d91

commit 113449704ca2051689f6cfe14fae12917ab41d91
Author: Priyank <priy...@frugalware.org>
Date:   Sun Jan 18 01:48:27 2009 +0530

gService gets an icon
* Also closed some popened streams
* Fixed a minor bug in gsvc_service_get_status() where it returned
GSVC_OFF where it should have returned GSVC_ERR

diff --git a/Makefile.am b/Makefile.am
index c01c5fd..cd283fa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,2 +1,8 @@
SUBDIRS = src data po

+icondir = $(datadir)/pixmaps
+icon_DATA = data/gservice.png
+
+EXTRA_DIST = $(icon_DATA)
+
+
diff --git a/data/Makefile.am b/data/Makefile.am
index 6ffe40c..e2ea645 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -1,7 +1,7 @@
SUBDIRS = icons

gladedir                = $(datadir)/gservice
-glade_DATA             = gservice.glade gservice-splash.png
+glade_DATA             = gservice.glade gservice-splash.png gservice.png

EXTRA_DIST = $(glade_DATA)

diff --git a/data/gservice.png b/data/gservice.png
new file mode 100644
index 0000000..48a6e06
Binary files /dev/null and b/data/gservice.png differ
diff --git a/src/gservice-about.c b/src/gservice-about.c
index 2a05650..cc6afd4 100644
--- a/src/gservice-about.c
+++ b/src/gservice-about.c
@@ -52,7 +52,7 @@ static const gchar *authors[] = { \
};

static const gchar *artists[] = { \
-                               "Frugalware Logo - Viktor Gondor 
<nadf...@frugalware.org>",
+                               "The gService icon is borrowed from the Tango 
project.",
NULL
};

@@ -68,7 +68,12 @@ gservice_about_dlg_create (void)
GList *list;

if (!about_pixbuf)
-               about_pixbuf = NULL;
+       {
+               gchar *path = g_strdup_printf ("%s/share/pixmaps/gservice.png", 
PREFIX);
+               g_print ("%s\n", path);
+               about_pixbuf = gdk_pixbuf_new_from_file (path, NULL);
+               g_free (path);
+       }
about_dlg = gtk_about_dialog_new ();
gtk_about_dialog_set_name (GTK_ABOUT_DIALOG(about_dlg), PACKAGE);
gtk_about_dialog_set_version (GTK_ABOUT_DIALOG(about_dlg), VERSION);
diff --git a/src/gservice-backend.c b/src/gservice-backend.c
index 26dab78..a1f7d1a 100644
--- a/src/gservice-backend.c
+++ b/src/gservice-backend.c
@@ -204,7 +204,7 @@ gsvc_service_get_runlevel_info (gservice_entry_t *service)
pclose (pp);
g_free (sname);
g_free (cmd);
-
+
return TRUE;
}

@@ -232,6 +232,7 @@ gsvc_get_active_service_list (void)
return ret;
}

+/* sort function for services list */
static int
gsvc_list_sort_func (gconstpointer *a, gconstpointer *b)
{
@@ -457,6 +458,7 @@ gsvc_service_get_status (const char *name)
case 1: ret = GSVC_OFF;
break;
case -1: ret = GSVC_ERR;
+                       break;
default: ret = GSVC_OFF;
}

@@ -490,6 +492,7 @@ gsvc_service_start (const char *service, int *retval)
ret = g_strdup (string->str);
g_string_free (string, TRUE);
g_free (cmd);
+       pclose (pp);

return ret;
}
@@ -520,6 +523,7 @@ gsvc_service_stop (const char *service, int *retval)
ret = g_strdup (string->str);
g_string_free (string, TRUE);
g_free (cmd);
+       pclose (pp);

return ret;
}
_______________________________________________
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git

Reply via email to