summaryrefslogtreecommitdiff
path: root/src/deamon.vala
diff options
context:
space:
mode:
authorAlessandro Ghedini <al3xbio@gmail.com>2012-01-21 19:07:09 +0100
committerAlessandro Ghedini <al3xbio@gmail.com>2012-01-21 19:07:09 +0100
commit60560a030fda3c539ff9dc1563b9926414a193da (patch)
tree77590b395685a8d48d3615e45629a1610d08c071 /src/deamon.vala
parentd6b2677825cbb423e2099563c16321c3e23d7899 (diff)
Imported Upstream version 0.4.0upstream/0.4.0
Diffstat (limited to 'src/deamon.vala')
-rw-r--r--src/deamon.vala28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/deamon.vala b/src/deamon.vala
index 0cdb4c2..cec9539 100644
--- a/src/deamon.vala
+++ b/src/deamon.vala
@@ -15,11 +15,6 @@ You should have received a copy of the GNU General Public License along with
this program. If not, see <http://www.gnu.org/licenses/>.
*/
-/////////////////////////////////////////////////////////////////////
-/// TODO-List (need comments):
-/// PieList
-/////////////////////////////////////////////////////////////////////
-
namespace GnomePie {
/////////////////////////////////////////////////////////////////////////
@@ -36,6 +31,7 @@ public class Deamon : GLib.Object {
public static int main(string[] args) {
Logger.init();
+ Gdk.threads_init();
Gtk.init(ref args);
Paths.init();
@@ -100,7 +96,11 @@ public class Deamon : GLib.Object {
// create unique application
var app = new Unique.App("org.gnome.gnomepie", null);
- if (app.is_running) {
+ #if HAVE_GTK_3
+ if (app.is_running()) {
+ #else
+ if (app.is_running) {
+ #endif
// inform the running instance of the pie to be opened
if (open_pie != null) {
message("Gnome-Pie is already running. Sending request to open pie " + open_pie + ".");
@@ -120,27 +120,27 @@ public class Deamon : GLib.Object {
if (cmd == Unique.Command.ACTIVATE) {
var pie = data.get_text();
- if (pie != "") PieManager.open_pie(pie);
- else this.indicator.show_preferences();
+ if (pie != null && pie != "") PieManager.open_pie(pie);
+ else this.indicator.show_preferences();
return Unique.Response.OK;
}
return Unique.Response.PASSTHROUGH;
});
-
+
+ // init locale support
+ Intl.bindtextdomain ("gnomepie", Paths.locales);
+ Intl.textdomain ("gnomepie");
+
// init toolkits and static stuff
- Gdk.threads_init();
ActionRegistry.init();
GroupRegistry.init();
+
PieManager.init();
Icon.init();
ThemedIcon.init();
RenderedText.init();
-
- // init locale support
- Intl.bindtextdomain ("gnomepie", Paths.locales);
- Intl.textdomain ("gnomepie");
// launch the indicator
this.indicator = new Indicator();