summaryrefslogtreecommitdiff
path: root/src/deamon.vala
diff options
context:
space:
mode:
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();