~ubuntu-branches/ubuntu/raring/nautilus/raring

« back to all changes in this revision

Viewing changes to src/nautilus-application.c

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher, Jeremy Bicha
  • Date: 2012-01-31 13:45:01 UTC
  • mfrom: (1.17.25)
  • Revision ID: package-import@ubuntu.com-20120131134501-yn7mqny7fgzx9fao
Tags: 1:3.3.4-0ubuntu1
* New upstream version which fixes:
  - "Opening Popupmenu in Context of Folder with List-View impossible?"
    (lp: #126540)
  - "'Create folder in here' context menu option for nautilus" (lp: #61786)
  - the file count and the size count change in opposite direction.
    (lp: #503330)
  - the mounts in the place menu should have a properties entry.
    (lp: #846289)
  - add command line option to select file (lp: #575719)
  - Media in 'Places' side bar should have same context menu as in 
    'Computer' (lp: #230098)
* debian/nautilus-data.install:
  - updated, ui and icons have been moved into gresources
* debian/patches/05_desktop_menu_export.patch:
   - updated to correctly include the gresources desktop definition

[ Jeremy Bicha ]
* New upstream release.
* debian/control.in:
  - Bump minimum GTK and glib
* Refreshed patches
* Dropped upstream patches:
  - 17_dont_allow_new_tab_on_desktop.patch
  - 18_fix_crash_in_get_current_uri.patch
  - 19_lazily_initialize_notification_service.patch
  - git_sideplace_sorting.patch
  - git_next_row.patch
  - git_dont_document_browser_option.patch
  - git_browser_compat.patch
  - git_bookmarks_reordering.patch
  - git_listview_context_menus.patch
  - git_use_gtk_grid.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
 
37
37
#include "nautilus-desktop-icon-view.h"
38
38
#include "nautilus-desktop-window.h"
 
39
#include "nautilus-freedesktop-dbus.h"
39
40
#include "nautilus-icon-view.h"
40
41
#include "nautilus-image-properties-page.h"
41
42
#include "nautilus-list-view.h"
71
72
#include <glib/gi18n.h>
72
73
#include <gio/gio.h>
73
74
#include <eel/eel-gtk-extensions.h>
74
 
#include <eel/eel-gtk-macros.h>
75
75
#include <eel/eel-stock-dialogs.h>
76
76
#include <libnotify/notify.h>
77
77
#include <gdk/gdkx.h>
670
670
        /* Handle the windows in the close list. */
671
671
        for (node = close_list; node != NULL; node = node->next) {
672
672
                slot = node->data;
673
 
                window = slot->pane->window;
674
673
 
675
674
                if (slot != force_no_close_slot) {
676
675
                        nautilus_window_pane_slot_close (slot->pane, slot);
733
732
        }
734
733
}
735
734
 
 
735
void
 
736
nautilus_application_open_location (NautilusApplication *application,
 
737
                                    GFile *location,
 
738
                                    GFile *selection,
 
739
                                    const char *startup_id)
 
740
{
 
741
        NautilusWindow *window;
 
742
        GList *sel_list = NULL;
 
743
 
 
744
        window = nautilus_application_create_window (application, gdk_screen_get_default ());
 
745
        gtk_window_set_startup_id (GTK_WINDOW (window), startup_id);
 
746
 
 
747
        if (selection != NULL) {
 
748
                sel_list = g_list_prepend (sel_list, nautilus_file_get (selection));
 
749
        }
 
750
 
 
751
        nautilus_window_slot_open_location (nautilus_window_get_active_slot (window),
 
752
                                            location,
 
753
                                            0,
 
754
                                            sel_list);
 
755
 
 
756
        if (sel_list != NULL) {
 
757
                nautilus_file_list_free (sel_list);
 
758
        }
 
759
}
 
760
 
736
761
static void
737
762
nautilus_application_open (GApplication *app,
738
763
                           GFile **files,
771
796
static void
772
797
nautilus_application_init (NautilusApplication *application)
773
798
{
774
 
        GSimpleActionGroup *action_group;
775
799
        GSimpleAction *action;
776
800
 
777
801
        application->priv =
778
802
                G_TYPE_INSTANCE_GET_PRIVATE (application, NAUTILUS_TYPE_APPLICATION,
779
803
                                             NautilusApplicationPriv);
780
804
 
781
 
        action_group = g_simple_action_group_new ();
782
805
        action = g_simple_action_new ("quit", NULL);
783
 
        g_simple_action_group_insert (action_group, G_ACTION (action));
784
806
 
785
 
        g_application_set_action_group (G_APPLICATION (application),
786
 
                                        G_ACTION_GROUP (action_group));
 
807
        g_action_map_add_action (G_ACTION_MAP (application), G_ACTION (action));
787
808
 
788
809
        g_signal_connect_swapped (action, "activate",
789
810
                                  G_CALLBACK (nautilus_application_quit), application);
790
811
 
791
 
        g_object_unref (action_group);
792
812
        g_object_unref (action);
793
813
}
794
814
 
808
828
        g_free (application->priv->geometry);
809
829
 
810
830
        nautilus_dbus_manager_stop ();
 
831
        nautilus_freedesktop_dbus_stop ();
811
832
        notify_uninit ();
812
833
 
813
834
        G_OBJECT_CLASS (nautilus_application_parent_class)->finalize (object);
1110
1131
 
1111
1132
        /* create DBus manager */
1112
1133
        nautilus_dbus_manager_start (app);
 
1134
        nautilus_freedesktop_dbus_start (self);
1113
1135
 
1114
1136
        /* initialize preferences and create the global GSettings objects */
1115
1137
        nautilus_global_preferences_init ();