summaryrefslogtreecommitdiff
path: root/mate-applet
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-01-26 22:51:58 +0100
committerJavier <dev.git@javispedro.com>2015-01-26 22:51:58 +0100
commit480017947277a80e3cee6181340303932d8d9832 (patch)
tree6399ff28dd902b8b1a53b85f458c75e3a5037197 /mate-applet
parent6f318affeb4d1c6ff66ccfa492713ad6f5e1e69c (diff)
downloadmdock-480017947277a80e3cee6181340303932d8d9832.tar.gz
mdock-480017947277a80e3cee6181340303932d8d9832.zip
chdir to $HOME on startup
Diffstat (limited to 'mate-applet')
-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)