diff options
Diffstat (limited to 'sfshare-gui')
-rwxr-xr-x | sfshare-gui/Makefile.am | 37 | ||||
-rwxr-xr-x | sfshare-gui/data/Makefile.am | 7 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/data/sfshare_window.ui | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/dbus_client.c (renamed from sfshare-gui/src/dbus_client.c) | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/dbus_client.h (renamed from sfshare-gui/src/dbus_client.h) | 3 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/dbus_client_glue.h (renamed from sfshare-gui/src/dbus_client_glue.h) | 0 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/sfshare.c (renamed from sfshare-gui/src/sfshare.c) | 15 | ||||
-rwxr-xr-x[-rw-r--r--] | sfshare-gui/sfshare.h (renamed from sfshare-gui/src/sfshare.h) | 3 | ||||
-rwxr-xr-x | sfshare-gui/src/Makefile.am | 11 |
9 files changed, 56 insertions, 23 deletions
diff --git a/sfshare-gui/Makefile.am b/sfshare-gui/Makefile.am index 3310172..04aaa75 100755 --- a/sfshare-gui/Makefile.am +++ b/sfshare-gui/Makefile.am @@ -1,5 +1,34 @@ -AUTOMAKE_OPTIONS = foreign +NULL = -SUBDIRS = \ - src \ - data +SUBDIRS = data + +INCLUDES = \ + -DDATADIR=\"$(datadir)\" \ + -DGNOMELOCALEDIR=\""$(datadir)/locale"\" \ + -I$(top_srcdir) \ + -I$(top_builddir) \ + $(WARN_CFLAGS) \ + $(DISABLE_DEPRECATED_CFLAGS) \ + $(GLIB_CFLAGS) \ + $(GTK_CFLAGS) \ + $(DBUS_GLIB_CFLAGS) \ + $(POLKIT_CFLAGS) \ + $(NULL) + +LDADD = \ + $(GLIB_LIBS) \ + $(GTK_LIBS) \ + $(DBUS_GLIB_LIBS) \ + $(POLKIT_LIBS) \ + $(NULL) + + +bin_PROGRAMS = sfshare-gui + +sfshare_gui_SOURCES = \ + dbus_client.h \ + dbus_client.c \ + dbus_client_glue.h \ + sfshare.h \ + sfshare.c \ + $(NULL) diff --git a/sfshare-gui/data/Makefile.am b/sfshare-gui/data/Makefile.am index 41a66d3..5a50cfe 100755 --- a/sfshare-gui/data/Makefile.am +++ b/sfshare-gui/data/Makefile.am @@ -1,7 +1,4 @@ -# TODO $(sysconfdir)/sfshare/ -uidir = /usr/share/sfshare/ +uidir = $(datadir)/sfshare/ ui_DATA = sfshare_window.ui - - -EXTRA_DIST = $(ui_DATA) +EXTRA_DIST = $(ui_DATA) diff --git a/sfshare-gui/data/sfshare_window.ui b/sfshare-gui/data/sfshare_window.ui index 25dc438..25dc438 100644..100755 --- a/sfshare-gui/data/sfshare_window.ui +++ b/sfshare-gui/data/sfshare_window.ui diff --git a/sfshare-gui/src/dbus_client.c b/sfshare-gui/dbus_client.c index e285e97..87a0e69 100644..100755 --- a/sfshare-gui/src/dbus_client.c +++ b/sfshare-gui/dbus_client.c @@ -1,4 +1,6 @@ /* + * dbus_client.c + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either @@ -13,6 +15,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * Author: Jan Lipovsky <janlipovsky@gmail.com> */ #include <glib.h> diff --git a/sfshare-gui/src/dbus_client.h b/sfshare-gui/dbus_client.h index ce963b2..9a81ee8 100644..100755 --- a/sfshare-gui/src/dbus_client.h +++ b/sfshare-gui/dbus_client.h @@ -1,4 +1,6 @@ /* + * dbus_client.c + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either @@ -13,6 +15,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * Author: Jan Lipovsky <janlipovsky@gmail.com> */ #ifndef DBUS_SERVICE_H diff --git a/sfshare-gui/src/dbus_client_glue.h b/sfshare-gui/dbus_client_glue.h index a494714..a494714 100644..100755 --- a/sfshare-gui/src/dbus_client_glue.h +++ b/sfshare-gui/dbus_client_glue.h diff --git a/sfshare-gui/src/sfshare.c b/sfshare-gui/sfshare.c index d223cab..fe2f3e2 100644..100755 --- a/sfshare-gui/src/sfshare.c +++ b/sfshare-gui/sfshare.c @@ -1,4 +1,6 @@ /* + * sfshare.c + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either @@ -13,6 +15,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * Author: Jan Lipovsky <janlipovsky@gmail.com> */ #include <gtk/gtk.h> @@ -289,18 +292,24 @@ main ( int argc, char **argv ) g_warning ("Wrong parameter!"); exit(1); } - /* First parameter is path to shared folder */ dir_path = argv[1]; gtk_init( &argc, &argv ); + if (!g_file_test (dir_path, G_FILE_TEST_IS_DIR)) + { + g_warning ("Directory \'%s\' does not exist!", dir_path); + exit(1); + } + + /* Create builder and load interface */ builder = gtk_builder_new (); - ui_filename = "/usr/share/sfshare/sfshare_window.ui"; + ui_filename = DATADIR "/sfshare/sfshare_window.ui"; if (!g_file_test (ui_filename, G_FILE_TEST_EXISTS)) - ui_filename = "../data/sfshare_window.ui"; + ui_filename = "data/sfshare_window.ui"; if (!gtk_builder_add_from_file ( builder, ui_filename, &error )) diff --git a/sfshare-gui/src/sfshare.h b/sfshare-gui/sfshare.h index 7876e3b..a5c76a3 100644..100755 --- a/sfshare-gui/src/sfshare.h +++ b/sfshare-gui/sfshare.h @@ -1,4 +1,6 @@ /* + * sfshare.h + * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either @@ -13,6 +15,7 @@ * License along with this library; if not, write to the Free * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * + * Author: Jan Lipovsky <janlipovsky@gmail.com> */ #ifndef SFSHARE_H diff --git a/sfshare-gui/src/Makefile.am b/sfshare-gui/src/Makefile.am deleted file mode 100755 index c55555f..0000000 --- a/sfshare-gui/src/Makefile.am +++ /dev/null @@ -1,11 +0,0 @@ -AM_CFLAGS=-Wall @POLKIT_CFLAGS@ @GTK_CFLAGS@ @DBUS_GLIB_CFLAGS@ -# "`$PKG_CONFIG --cflags gtk+-2.0 dbus-glib-1 polkit-gtk-1`" -#$(shell pkg-config --cflags gtk+-2.0 dbus-glib-1 polkit-gtk-1) -AM_LDFLAGS= @POLKIT_LIBS@ @GTK_LIBS@ @DBUS_GLIB_LIBS@ -# "`$PKG_CONFIG --libs gtk+-2.0 dbus-glib-1 polkit-gtk-1`" -#$(shell pkg-config --libs gtk+-2.0 dbus-glib-1 polkit-gtk-1) - - -bin_PROGRAMS = sfshare-gui -sfshare_gui_SOURCES = dbus_client.c dbus_client.h sfshare.h dbus_client_glue.h sfshare.c - |