Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 882575
Collapse All | Expand All

(-)a/configure.ac (-5 / +4 lines)
Lines 12-18 AM_CONFIG_HEADER(config.h) Link Here
12
#AC_PROG_INTLTOOL([0.29])
12
#AC_PROG_INTLTOOL([0.29])
13
13
14
# Dependency checks
14
# Dependency checks
15
NAUTILUS_REQUIRED=2.16.0
15
NAUTILUS_REQUIRED=43.rc
16
GLIB_REQUIRED=2.14.0
16
GLIB_REQUIRED=2.14.0
17
17
18
# Used programs
18
# Used programs
Lines 26-32 if test "x$HAVE_PKGCONFIG" = "xno"; then Link Here
26
	AC_MSG_ERROR(you need to have pkgconfig installed !)
26
	AC_MSG_ERROR(you need to have pkgconfig installed !)
27
fi
27
fi
28
28
29
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension >= $NAUTILUS_REQUIRED)
29
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension-4 >= $NAUTILUS_REQUIRED)
30
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
30
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
31
31
32
AC_PATH_PROG([PYTHON3], [python3])
32
AC_PATH_PROG([PYTHON3], [python3])
Lines 84-93 AC_MSG_CHECKING([for nautilus extension directory]) Link Here
84
if test -n "$with_nautilus_extension_dir"; then
84
if test -n "$with_nautilus_extension_dir"; then
85
    NAUTILUS_EXTENSION_DIR=$with_nautilus_extension_dir
85
    NAUTILUS_EXTENSION_DIR=$with_nautilus_extension_dir
86
else
86
else
87
    NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension`
87
    NAUTILUS_EXTENSION_DIR=`$PKG_CONFIG --variable=extensiondir libnautilus-extension-4`
88
fi
88
fi
89
if test -z "$NAUTILUS_EXTENSION_DIR"; then
89
if test -z "$NAUTILUS_EXTENSION_DIR"; then
90
    NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-1.0'
90
    NAUTILUS_EXTENSION_DIR='${exec_prefix}/lib/nautilus/extension-4'
91
fi
91
fi
92
92
93
AC_MSG_RESULT([${NAUTILUS_EXTENSION_DIR}])
93
AC_MSG_RESULT([${NAUTILUS_EXTENSION_DIR}])
94
headers
94
headers
95
--
96
src/nautilus-dropbox.c | 9 +++------
95
src/nautilus-dropbox.c | 9 +++------
97
src/nautilus-dropbox.h | 2 +-
96
src/nautilus-dropbox.h | 2 +-
98
2 files changed, 4 insertions(+), 7 deletions(-)
97
2 files changed, 4 insertions(+), 7 deletions(-)
(-)a/src/nautilus-dropbox.c (-6 / +3 lines)
Lines 37-45 Link Here
37
#include <glib-object.h>
37
#include <glib-object.h>
38
#include <gtk/gtk.h>
38
#include <gtk/gtk.h>
39
39
40
#include <libnautilus-extension/nautilus-extension-types.h>
40
#include <nautilus-extension.h>
41
#include <libnautilus-extension/nautilus-menu-provider.h>
42
#include <libnautilus-extension/nautilus-info-provider.h>
43
41
44
#include "g-util.h"
42
#include "g-util.h"
45
#include "dropbox-command-client.h"
43
#include "dropbox-command-client.h"
Lines 661-667 get_file_items_callback(GHashTable *response, gpointer ud) Link Here
661
659
662
static GList *
660
static GList *
663
nautilus_dropbox_get_file_items(NautilusMenuProvider *provider,
661
nautilus_dropbox_get_file_items(NautilusMenuProvider *provider,
664
                                GtkWidget            *window,
665
				GList                *files)
662
				GList                *files)
666
{
663
{
667
  /*
664
  /*
Lines 888-900 on_disconnect(NautilusDropbox *cvs) { Link Here
888
885
889
886
890
static void
887
static void
891
nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderIface *iface) {
888
nautilus_dropbox_menu_provider_iface_init (NautilusMenuProviderInterface *iface) {
892
  iface->get_file_items = nautilus_dropbox_get_file_items;
889
  iface->get_file_items = nautilus_dropbox_get_file_items;
893
  return;
890
  return;
894
}
891
}
895
892
896
static void
893
static void
897
nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderIface *iface) {
894
nautilus_dropbox_info_provider_iface_init (NautilusInfoProviderInterface *iface) {
898
  iface->update_file_info = nautilus_dropbox_update_file_info;
895
  iface->update_file_info = nautilus_dropbox_update_file_info;
899
  iface->cancel_update = nautilus_dropbox_cancel_update;
896
  iface->cancel_update = nautilus_dropbox_cancel_update;
900
  return;
897
  return;
(-)a/src/nautilus-dropbox.h (-2 / +1 lines)
Lines 27-33 Link Here
27
#include <glib.h>
27
#include <glib.h>
28
#include <glib-object.h>
28
#include <glib-object.h>
29
29
30
#include <libnautilus-extension/nautilus-info-provider.h>
30
#include <nautilus-extension.h>
31
31
32
#include "dropbox-command-client.h"
32
#include "dropbox-command-client.h"
33
#include "nautilus-dropbox-hooks.h"
33
#include "nautilus-dropbox-hooks.h"
34
--
35
configure.ac    | 3 +++
34
configure.ac    | 3 +++
36
src/Makefile.am | 1 +
35
src/Makefile.am | 1 +
37
src/dropbox.c   | 3 ---
36
src/dropbox.c   | 3 ---
38
3 files changed, 4 insertions(+), 3 deletions(-)
37
3 files changed, 4 insertions(+), 3 deletions(-)
(-)a/configure.ac (+3 lines)
Lines 28-33 fi Link Here
28
28
29
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension-4 >= $NAUTILUS_REQUIRED)
29
PKG_CHECK_MODULES(NAUTILUS, libnautilus-extension-4 >= $NAUTILUS_REQUIRED)
30
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
30
PKG_CHECK_MODULES(GLIB, glib-2.0 >= $GLIB_REQUIRED)
31
PKG_CHECK_MODULES(GTK, gtk4 >= 4.6.0)
32
33
AC_SUBST(GTK_CFLAGS)
31
34
32
AC_PATH_PROG([PYTHON3], [python3])
35
AC_PATH_PROG([PYTHON3], [python3])
33
36
(-)a/src/Makefile.am (+1 lines)
Lines 13-18 libnautilus_dropbox_la_CFLAGS = \ Link Here
13
	$(WARN_CFLAGS)                                  \
13
	$(WARN_CFLAGS)                                  \
14
	$(DISABLE_DEPRECATED_CFLAGS)					\
14
	$(DISABLE_DEPRECATED_CFLAGS)					\
15
	$(NAUTILUS_CFLAGS)                              \
15
	$(NAUTILUS_CFLAGS)                              \
16
	$(GTK_CFLAGS)                              \
16
	$(GLIB_CFLAGS)
17
	$(GLIB_CFLAGS)
17
18
18
if DEBUG
19
if DEBUG
(-)a/src/dropbox.c (-4 lines)
Lines 27-35 Link Here
27
27
28
#include <glib-object.h>
28
#include <glib-object.h>
29
29
30
#include <gdk/gdk.h>
31
#include <gtk/gtk.h>
32
33
#include "nautilus-dropbox.h"
30
#include "nautilus-dropbox.h"
34
31
35
static GType type_list[1];
32
static GType type_list[1];
36
--
37
src/dropbox.c          | 3 ---
33
src/dropbox.c          | 3 ---
38
src/nautilus-dropbox.c | 9 +--------
34
src/nautilus-dropbox.c | 9 +--------
39
2 files changed, 1 insertion(+), 11 deletions(-)
35
2 files changed, 1 insertion(+), 11 deletions(-)
(-)a/src/dropbox.c (-3 lines)
Lines 38-46 nautilus_module_initialize (GTypeModule *module) { Link Here
38
  nautilus_dropbox_register_type (module);
38
  nautilus_dropbox_register_type (module);
39
  type_list[0] = NAUTILUS_TYPE_DROPBOX;
39
  type_list[0] = NAUTILUS_TYPE_DROPBOX;
40
40
41
  dropbox_use_nautilus_submenu_workaround
42
    = (NAUTILUS_VERSION_MAJOR < 2 ||
43
       (NAUTILUS_VERSION_MAJOR == 2 && NAUTILUS_VERSION_MINOR <= 22));
44
  dropbox_use_operation_in_progress_workaround = TRUE;
41
  dropbox_use_operation_in_progress_workaround = TRUE;
45
}
42
}
46
43
(-)a/src/nautilus-dropbox.c (-9 / +1 lines)
Lines 47-53 Link Here
47
static char *emblems[] = {"dropbox-uptodate", "dropbox-syncing", "dropbox-unsyncable"};
47
static char *emblems[] = {"dropbox-uptodate", "dropbox-syncing", "dropbox-unsyncable"};
48
gchar *DEFAULT_EMBLEM_PATHS[2] = { EMBLEMDIR , NULL };
48
gchar *DEFAULT_EMBLEM_PATHS[2] = { EMBLEMDIR , NULL };
49
49
50
gboolean dropbox_use_nautilus_submenu_workaround;
50
51
gboolean dropbox_use_operation_in_progress_workaround;
51
gboolean dropbox_use_operation_in_progress_workaround;
52
52
53
static GType dropbox_type = 0;
53
static GType dropbox_type = 0;
Lines 628-640 nautilus_dropbox_parse_menu(gchar **options, Link Here
628
	g_object_set_property (G_OBJECT(item), "sensitive", &sensitive);
628
	g_object_set_property (G_OBJECT(item), "sensitive", &sensitive);
629
      }
629
      }
630
630
631
      /* taken from nautilus-file-repairer (http://repairer.kldp.net/):
632
       * this code is a workaround for a bug of nautilus
633
       * See: http://bugzilla.gnome.org/show_bug.cgi?id=508878 */
634
      if (dropbox_use_nautilus_submenu_workaround) {
635
	toret = g_list_append(toret, item);
636
      }
637
638
      g_object_unref(item);
631
      g_object_unref(item);
639
      g_string_free(new_action_string, TRUE);
632
      g_string_free(new_action_string, TRUE);
640
      ret++;
633
      ret++;
641
--
642
src/nautilus-dropbox.c | 14 ++++++--------
634
src/nautilus-dropbox.c | 14 ++++++--------
643
1 file changed, 6 insertions(+), 8 deletions(-)
635
1 file changed, 6 insertions(+), 8 deletions(-)
(-)a/src/nautilus-dropbox.c (-9 / +6 lines)
Lines 768-781 add_emblem_paths(GHashTable* emblem_paths_response) Link Here
768
768
769
  gchar **emblem_paths_list;
769
  gchar **emblem_paths_list;
770
  int i;
770
  int i;
771
771
  GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
772
  GtkIconTheme *theme = gtk_icon_theme_get_default();
773
772
774
  if (emblem_paths_response &&
773
  if (emblem_paths_response &&
775
      (emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) {
774
      (emblem_paths_list = g_hash_table_lookup(emblem_paths_response, "path"))) {
776
      for (i = 0; emblem_paths_list[i] != NULL; i++) {
775
      for (i = 0; emblem_paths_list[i] != NULL; i++) {
777
	if (emblem_paths_list[i][0])
776
	if (emblem_paths_list[i][0])
778
	  gtk_icon_theme_append_search_path(theme, emblem_paths_list[i]);
777
	  gtk_icon_theme_add_search_path(theme, emblem_paths_list[i]);
779
      }
778
      }
780
  }
779
  }
781
  g_hash_table_unref(emblem_paths_response);
780
  g_hash_table_unref(emblem_paths_response);
Lines 794-808 remove_emblem_paths(GHashTable* emblem_paths_response) Link Here
794
      goto exit;
793
      goto exit;
795
794
796
  // We need to remove the old paths.
795
  // We need to remove the old paths.
797
  GtkIconTheme * icon_theme = gtk_icon_theme_get_default();
798
  gchar ** paths;
796
  gchar ** paths;
799
  gint path_count;
797
  GtkIconTheme *theme = gtk_icon_theme_get_for_display (gdk_display_get_default ());
800
798
801
  gtk_icon_theme_get_search_path(icon_theme, &paths, &path_count);
799
  paths = gtk_icon_theme_get_search_path(theme);
802
800
803
  gint i, j, out = 0;
801
  gint i, j, out = 0;
804
  gboolean found = FALSE;
802
  gboolean found = FALSE;
805
  for (i = 0; i < path_count; i++) {
803
  for (i = 0; paths[i] != NULL; i++) {
806
      gboolean keep = TRUE;
804
      gboolean keep = TRUE;
807
      for (j = 0; emblem_paths_list[j] != NULL; j++) {
805
      for (j = 0; emblem_paths_list[j] != NULL; j++) {
808
	  if (emblem_paths_list[j][0]) {
806
	  if (emblem_paths_list[j][0]) {
Lines 824-830 remove_emblem_paths(GHashTable* emblem_paths_response) Link Here
824
     accomodate the changes */
822
     accomodate the changes */
825
  if (found) {
823
  if (found) {
826
    paths[out] = NULL; /* Clear the last one */
824
    paths[out] = NULL; /* Clear the last one */
827
    gtk_icon_theme_set_search_path(icon_theme, (const gchar **)paths, out);
825
    gtk_icon_theme_set_search_path(theme, (const gchar **)paths);
828
  }
826
  }
829
827
830
  g_strfreev(paths);
828
  g_strfreev(paths);
831
--
832
dropbox.in | 3 ---
829
dropbox.in | 3 ---
833
1 file changed, 3 deletions(-)
830
1 file changed, 3 deletions(-)
834
mode change 100755 => 100644 dropbox.in
831
mode change 100755 => 100644 dropbox.in
(-)a/dropbox.in (-4 lines)
Lines 294-307 if GUI_AVAILABLE: Link Here
294
        import gi
294
        import gi
295
        gi.require_version('Gdk', '3.0')
295
        gi.require_version('Gdk', '3.0')
296
        gi.require_version('Gtk', '3.0')
296
        gi.require_version('Gtk', '3.0')
297
        from gi.repository import GObject
298
        from gi.repository import Gdk
297
        from gi.repository import Gdk
299
        from gi.repository import Gtk
298
        from gi.repository import Gtk
300
        from gi.repository import Pango
299
        from gi.repository import Pango
301
        import webbrowser
300
        import webbrowser
302
301
303
        GObject.threads_init()
304
305
        load_serialized_images()
302
        load_serialized_images()
306
303
307
        global FatalVisibleError
304
        global FatalVisibleError
308
GLib.idle_add
305
GLib.idle_add
309
--
310
dropbox.in | 7 ++++---
306
dropbox.in | 7 ++++---
311
1 file changed, 4 insertions(+), 3 deletions(-)
307
1 file changed, 4 insertions(+), 3 deletions(-)
(-)a/dropbox.in (-4 / +4 lines)
Lines 294-299 if GUI_AVAILABLE: Link Here
294
        import gi
294
        import gi
295
        gi.require_version('Gdk', '3.0')
295
        gi.require_version('Gdk', '3.0')
296
        gi.require_version('Gtk', '3.0')
296
        gi.require_version('Gtk', '3.0')
297
        from gi.repository import GLib
297
        from gi.repository import Gdk
298
        from gi.repository import Gdk
298
        from gi.repository import Gtk
299
        from gi.repository import Gtk
299
        from gi.repository import Pango
300
        from gi.repository import Pango
Lines 328-344 if GUI_AVAILABLE: Link Here
328
                            ret = ()
329
                            ret = ()
329
                        if not isinstance(ret, tuple):
330
                        if not isinstance(ret, tuple):
330
                            ret = (ret,)
331
                            ret = (ret,)
331
                        GObject.idle_add(self.loop_callback, *ret)
332
                        GLib.idle_add(self.loop_callback, *ret)
332
333
333
                        if self._stopped:
334
                        if self._stopped:
334
                            _thread.exit()
335
                            _thread.exit()
335
                except Exception as e:
336
                except Exception as e:
336
                    print(e)
337
                    print(e)
337
                    if self.on_exception is not None:
338
                    if self.on_exception is not None:
338
                        GObject.idle_add(self.on_exception, e)
339
                        GLib.idle_add(self.on_exception, e)
339
                else:
340
                else:
340
                    if self.on_done is not None:
341
                    if self.on_done is not None:
341
                        GObject.idle_add(self.on_done)
342
                        GLib.idle_add(self.on_done)
342
343
343
            def start(self, *args, **kwargs):
344
            def start(self, *args, **kwargs):
344
                t = threading.Thread(target=self._run, args=args, kwargs=kwargs)
345
                t = threading.Thread(target=self._run, args=args, kwargs=kwargs)
345
--
346
dropbox.in | 3 +--
346
dropbox.in | 3 +--
347
1 file changed, 1 insertion(+), 2 deletions(-)
347
1 file changed, 1 insertion(+), 2 deletions(-)
(-)a/dropbox.in (-3 / +1 lines)
Lines 342-349 if GUI_AVAILABLE: Link Here
342
                        GLib.idle_add(self.on_done)
342
                        GLib.idle_add(self.on_done)
343
343
344
            def start(self, *args, **kwargs):
344
            def start(self, *args, **kwargs):
345
                t = threading.Thread(target=self._run, args=args, kwargs=kwargs)
345
                t = threading.Thread(target=self._run, args=args, kwargs=kwargs, daemon=True)
346
                t.setDaemon(True)
347
                t.start()
346
                t.start()
348
347
349
            def stop(self):
348
            def stop(self):
350
--
351
dropbox.in | 4 ++--
349
dropbox.in | 4 ++--
352
1 file changed, 2 insertions(+), 2 deletions(-)
350
1 file changed, 2 insertions(+), 2 deletions(-)
(-)a/dropbox.in (-2 / +2 lines)
Lines 447-458 if GUI_AVAILABLE: Link Here
447
                self.user_cancelled = False
447
                self.user_cancelled = False
448
                self.task = None
448
                self.task = None
449
449
450
                self.ok = ok = Gtk.Button(stock=Gtk.STOCK_OK)
450
                self.ok = ok = Gtk.Button.new_with_mnemonic("_OK")
451
                ok.connect('clicked', self.handle_ok)
451
                ok.connect('clicked', self.handle_ok)
452
                self.action_area.add(ok)
452
                self.action_area.add(ok)
453
                ok.show()
453
                ok.show()
454
454
455
                cancel = Gtk.Button(stock=Gtk.STOCK_CANCEL)
455
                cancel = Gtk.Button.new_with_mnemonic("_Cancel")
456
                cancel.connect('clicked', self.handle_cancel)
456
                cancel.connect('clicked', self.handle_cancel)
457
                self.action_area.add(cancel)
457
                self.action_area.add(cancel)
458
                cancel.show()
458
                cancel.show()

Return to bug 882575