summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-applet/mdock-mate-panel-applet.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/mate-applet/mdock-mate-panel-applet.c b/mate-applet/mdock-mate-panel-applet.c
index 25a167e..bf846ce 100644
--- a/mate-applet/mdock-mate-panel-applet.c
+++ b/mate-applet/mdock-mate-panel-applet.c
@@ -17,13 +17,12 @@
* along with MDock. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <glib/gi18n.h>
#include <mate-panel-applet-gsettings.h>
+#include "../config.h"
#include "mdock-mate-panel-applet.h"
-#include <glib/gi18n.h>
-#include <gdk/gdkx.h>
-
G_DEFINE_TYPE(MDockMatePanelApplet, mdock_mate_panel_applet, PANEL_TYPE_APPLET)
static void display_preferences_dialog(GtkAction *action, MDockMatePanelApplet *self)
@@ -120,6 +119,12 @@ static void mdock_mate_panel_applet_class_init(MDockMatePanelAppletClass *klass)
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
widget_class->size_allocate = mdock_mate_panel_applet_size_allocate;
widget_class->size_request = mdock_mate_panel_applet_size_request;
+
+ // Let's do some stuff to initialize the process..
+ // A decent default directory for spawned processes.
+ if (chdir(g_get_home_dir()) != 0) {
+ g_message("Failed to set cwd to the home directory");
+ }
}
static void mdock_mate_panel_applet_init(MDockMatePanelApplet *self)