diff options
author | Javier <dev.git@javispedro.com> | 2015-01-26 22:51:58 +0100 |
---|---|---|
committer | Javier <dev.git@javispedro.com> | 2015-01-26 22:51:58 +0100 |
commit | 480017947277a80e3cee6181340303932d8d9832 (patch) | |
tree | 6399ff28dd902b8b1a53b85f458c75e3a5037197 /mate-applet | |
parent | 6f318affeb4d1c6ff66ccfa492713ad6f5e1e69c (diff) | |
download | mdock-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.c | 11 |
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) |