~ubuntu-branches/ubuntu/trusty/nautilus/trusty-proposed

« back to all changes in this revision

Viewing changes to .pc/15_use-ubuntu-help.patch/src/nautilus-view.c

  • Committer: Package Import Robot
  • Author(s): Tim Lunn
  • Date: 2014-01-02 16:50:06 UTC
  • mfrom: (1.17.43)
  • Revision ID: package-import@ubuntu.com-20140102165006-1ghk9ropzitdc8pp
Tags: 1:3.10.1-0ubuntu1
* New upstream release
* debian/control.in: bump depend on gtk+ 3.9.11
* debian/patches:
  - Dropped git patches, that are included in new version
  - 06_never_exec_nonexec_launchers.patch, refreshed
  - disconnect-extra-location-widgets.patch, dropped included in new version
  - 16_unity_new_documents.patch, refreshed
  - ubuntu_show_titlebar.patch, disable CSD titlebar on non-GNOME sessions
  - ubuntu_titlebar_css.patch, theme fixes (LP: #1272602)

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include "nautilus-previewer.h"
40
40
#include "nautilus-properties-window.h"
41
41
 
 
42
#if ENABLE_EMPTY_VIEW
 
43
#include "nautilus-empty-view.h"
 
44
#endif
 
45
 
42
46
#include <gdk/gdkx.h>
43
47
#include <gdk/gdkkeysyms.h>
44
48
#include <gtk/gtk.h>
963
967
                                                   "This will open %'d separate windows.", count), count);
964
968
        }
965
969
        dialog = eel_show_yes_no_dialog (prompt, detail, 
966
 
                                         GTK_STOCK_OK, GTK_STOCK_CANCEL,
 
970
                                         _("_OK"), _("_Cancel"),
967
971
                                         parent_window);
968
972
        g_free (detail);
969
973
 
1126
1130
        nautilus_file_list_free (selection);
1127
1131
}
1128
1132
 
 
1133
static void
 
1134
action_open_item_location_callback (GtkAction *action,
 
1135
                                    gpointer callback_data)
 
1136
{
 
1137
        NautilusView *view;
 
1138
        GList *selection;
 
1139
        NautilusFile *item;
 
1140
        GFile *activation_location;
 
1141
        NautilusFile *activation_file;
 
1142
        NautilusFile *location;
 
1143
 
 
1144
        view = NAUTILUS_VIEW (callback_data);
 
1145
        selection = nautilus_view_get_selection (view);
 
1146
 
 
1147
        item = NAUTILUS_FILE (selection->data);
 
1148
        activation_location = nautilus_file_get_activation_location (item);
 
1149
        activation_file = nautilus_file_get (activation_location);
 
1150
        location = nautilus_file_get_parent (activation_file);
 
1151
 
 
1152
        nautilus_view_activate_file (view, location, 0);
 
1153
 
 
1154
        nautilus_file_unref (location);
 
1155
        nautilus_file_unref (activation_file);
 
1156
        g_object_unref (activation_location);
 
1157
        nautilus_file_list_free (selection);
 
1158
}
 
1159
 
1129
1160
 
1130
1161
static void
1131
1162
action_open_alternate_callback (GtkAction *action,
1460
1491
        dialog = gtk_dialog_new_with_buttons (_("Select Items Matching"),
1461
1492
                                              nautilus_view_get_containing_window (view),
1462
1493
                                              GTK_DIALOG_DESTROY_WITH_PARENT,
1463
 
                                              GTK_STOCK_HELP,
 
1494
                                              _("_Help"),
1464
1495
                                              GTK_RESPONSE_HELP,
1465
 
                                              GTK_STOCK_CANCEL,
 
1496
                                              _("_Cancel"),
1466
1497
                                              GTK_RESPONSE_CANCEL,
1467
 
                                              GTK_STOCK_OK,
 
1498
                                              _("_OK"),
1468
1499
                                              GTK_RESPONSE_OK,
1469
1500
                                              NULL);
1470
1501
        gtk_dialog_set_default_response (GTK_DIALOG (dialog),
1582
1613
                dialog = gtk_dialog_new_with_buttons (_("Save Search as"),
1583
1614
                                                      nautilus_view_get_containing_window (directory_view),
1584
1615
                                                      0,
1585
 
                                                      GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 
1616
                                                      _("_Cancel"), GTK_RESPONSE_CANCEL,
1586
1617
                                                      NULL);
1587
1618
                save_button = gtk_dialog_add_button (GTK_DIALOG (dialog),
1588
 
                                                     GTK_STOCK_SAVE, GTK_RESPONSE_OK);
 
1619
                                                     _("_Save"), GTK_RESPONSE_OK);
1589
1620
                gtk_dialog_set_default_response (GTK_DIALOG (dialog),
1590
1621
                                                 GTK_RESPONSE_OK);
1591
1622
                gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
2225
2256
        }
2226
2257
}
2227
2258
 
 
2259
static void
 
2260
show_hidden_files_changed_callback (gpointer callback_data)
 
2261
{
 
2262
        NautilusView *view;
 
2263
        gboolean preference_value;
 
2264
 
 
2265
        view = NAUTILUS_VIEW (callback_data);
 
2266
 
 
2267
        preference_value =
 
2268
                g_settings_get_boolean (gtk_filechooser_preferences, NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES);
 
2269
 
 
2270
        nautilus_view_set_show_hidden_files (view, preference_value);
 
2271
}
 
2272
 
2228
2273
static gboolean
2229
2274
set_up_scripts_directory_global (void)
2230
2275
{
2672
2717
                                  G_CALLBACK (schedule_update_menus), view);
2673
2718
        g_signal_connect_swapped (nautilus_preferences,
2674
2719
                                  "changed::" NAUTILUS_PREFERENCES_CLICK_POLICY,
2675
 
                                  G_CALLBACK(click_policy_changed_callback),
 
2720
                                  G_CALLBACK (click_policy_changed_callback),
2676
2721
                                  view);
2677
2722
        g_signal_connect_swapped (nautilus_preferences,
2678
2723
                                  "changed::" NAUTILUS_PREFERENCES_SORT_DIRECTORIES_FIRST, 
2679
 
                                  G_CALLBACK(sort_directories_first_changed_callback), view);
 
2724
                                  G_CALLBACK (sort_directories_first_changed_callback), view);
 
2725
        g_signal_connect_swapped (gtk_filechooser_preferences,
 
2726
                                  "changed::" NAUTILUS_PREFERENCES_SHOW_HIDDEN_FILES, 
 
2727
                                  G_CALLBACK (show_hidden_files_changed_callback), view);
2680
2728
        g_signal_connect_swapped (gnome_lockdown_preferences,
2681
2729
                                  "changed::" NAUTILUS_PREFERENCES_LOCKDOWN_COMMAND_LINE,
2682
2730
                                  G_CALLBACK (schedule_update_menus), view);
2794
2842
                                              click_policy_changed_callback, view);
2795
2843
        g_signal_handlers_disconnect_by_func (nautilus_preferences,
2796
2844
                                              sort_directories_first_changed_callback, view);
 
2845
        g_signal_handlers_disconnect_by_func (gtk_filechooser_preferences,
 
2846
                                              show_hidden_files_changed_callback, view);
2797
2847
        g_signal_handlers_disconnect_by_func (nautilus_window_state,
2798
2848
                                              nautilus_view_display_selection_info, view);
2799
2849
 
4664
4714
}
4665
4715
 
4666
4716
static GdkPixbuf *
4667
 
get_menu_icon_for_file (NautilusFile *file)
 
4717
get_menu_icon_for_file (NautilusFile *file,
 
4718
                        GtkWidget    *widget)
4668
4719
{
4669
4720
        NautilusIconInfo *info;
4670
4721
        GdkPixbuf *pixbuf;
4671
 
        int size;
 
4722
        int size, scale;
4672
4723
 
4673
4724
        size = nautilus_get_icon_size_for_stock_size (GTK_ICON_SIZE_MENU);
 
4725
        scale = gtk_widget_get_scale_factor (widget);
4674
4726
        
4675
 
        info = nautilus_file_get_icon (file, size, 0);
 
4727
        info = nautilus_file_get_icon (file, size, scale, 0);
4676
4728
        pixbuf = nautilus_icon_info_get_pixbuf_nodefault_at_size (info, size);
4677
4729
        g_object_unref (info);
4678
4730
        
4703
4755
                                 NULL);
4704
4756
 
4705
4757
        if (icon != NULL) {
4706
 
                pixbuf = nautilus_ui_get_menu_icon (icon);
 
4758
                pixbuf = nautilus_ui_get_menu_icon (icon, GTK_WIDGET (view));
4707
4759
                if (pixbuf != NULL) {
4708
4760
                        gtk_action_set_gicon (action, G_ICON (pixbuf));
4709
4761
                        g_object_unref (pixbuf);
5095
5147
                                 tip,
5096
5148
                                 NULL);
5097
5149
 
5098
 
        pixbuf = get_menu_icon_for_file (file);
 
5150
        pixbuf = get_menu_icon_for_file (file, GTK_WIDGET (directory_view));
5099
5151
        if (pixbuf != NULL) {
5100
5152
                gtk_action_set_gicon (action, G_ICON (pixbuf));
5101
5153
                g_object_unref (pixbuf);
5162
5214
        ui_manager = nautilus_view_get_ui_manager (directory_view);
5163
5215
        uri = nautilus_file_get_uri (file);
5164
5216
        name = nautilus_file_get_display_name (file);
5165
 
        pixbuf = get_menu_icon_for_file (file);
 
5217
        pixbuf = get_menu_icon_for_file (file, GTK_WIDGET (directory_view));
5166
5218
        add_submenu (ui_manager, action_group, merge_id, menu_path, uri, name, pixbuf, TRUE);
5167
5219
        add_submenu (ui_manager, action_group, merge_id, popup_path, uri, name, pixbuf, FALSE);
5168
5220
        add_submenu (ui_manager, action_group, merge_id, popup_bg_path, uri, name, pixbuf, FALSE);
5349
5401
                                 tip,
5350
5402
                                 NULL);
5351
5403
        
5352
 
        pixbuf = get_menu_icon_for_file (file);
 
5404
        pixbuf = get_menu_icon_for_file (file, GTK_WIDGET (directory_view));
5353
5405
        if (pixbuf != NULL) {
5354
5406
                gtk_action_set_gicon (action, G_ICON (pixbuf));
5355
5407
                g_object_unref (pixbuf);
5940
5992
        dialog = gtk_file_chooser_dialog_new (_("Select Destination"),
5941
5993
                                              GTK_WINDOW (nautilus_view_get_window (view)),
5942
5994
                                              GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER,
5943
 
                                              GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 
5995
                                              _("_Cancel"), GTK_RESPONSE_CANCEL,
5944
5996
                                              _("_Select"), GTK_RESPONSE_OK,
5945
5997
                                              NULL);
5946
5998
        gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE);
7098
7150
  /* name, stock id, label */  { NAUTILUS_ACTION_NEW_DOCUMENTS, "document-new", N_("New _Document") },
7099
7151
  /* name, stock id, label */  { NAUTILUS_ACTION_OPEN_WITH, NULL, N_("Open Wit_h"),
7100
7152
                                 NULL, N_("Choose a program with which to open the selected item") },
7101
 
  /* name, stock id */         { NAUTILUS_ACTION_PROPERTIES, GTK_STOCK_PROPERTIES,
 
7153
  /* name, stock id */         { NAUTILUS_ACTION_PROPERTIES, NULL,
7102
7154
  /* label, accelerator */       N_("P_roperties"), "<alt>Return",
7103
7155
  /* tooltip */                  N_("View or modify the properties of each selected item"),
7104
7156
                                 G_CALLBACK (action_properties_callback) },
7122
7174
  /* label, accelerator */       "OpenAccel", "<alt>Down",
7123
7175
  /* tooltip */                  NULL,
7124
7176
                                 G_CALLBACK (action_open_callback) },
 
7177
  /* name, stock id */         { NAUTILUS_ACTION_OPEN_ITEM_LOCATION, NULL,
 
7178
  /* label, accelerator */       N_("Open _Item Location"), "<control><alt>o",
 
7179
  /* tooltip */                  N_("Open the selected item's location in this window"),
 
7180
                                 G_CALLBACK (action_open_item_location_callback) },
7125
7181
  /* name, stock id */         { NAUTILUS_ACTION_OPEN_ALTERNATE, NULL,
7126
7182
  /* label, accelerator */       N_("Open in Navigation Window"), "<control><shift>o",
7127
7183
  /* tooltip */                  N_("Open each selected item in a navigation window"),
7146
7202
  /* label, accelerator */       N_("E_mpty Trash"), NULL,
7147
7203
  /* tooltip */                  N_("Delete all items in the Trash"),
7148
7204
                                 G_CALLBACK (action_empty_trash_callback) },
7149
 
  /* name, stock id */         { NAUTILUS_ACTION_CUT, GTK_STOCK_CUT,
7150
 
  /* label, accelerator */       NULL, NULL,
 
7205
  /* name, stock id */         { NAUTILUS_ACTION_CUT, NULL,
 
7206
  /* label, accelerator */       N_("Cu_t"), "<control>X",
7151
7207
  /* tooltip */                  N_("Prepare the selected files to be moved with a Paste command"),
7152
7208
                                 G_CALLBACK (action_cut_files_callback) },
7153
 
  /* name, stock id */         { NAUTILUS_ACTION_COPY, GTK_STOCK_COPY,
7154
 
  /* label, accelerator */       NULL, NULL,
 
7209
  /* name, stock id */         { NAUTILUS_ACTION_COPY, NULL,
 
7210
  /* label, accelerator */       N_("_Copy"), "<control>C",
7155
7211
  /* tooltip */                  N_("Prepare the selected files to be copied with a Paste command"),
7156
7212
                                 G_CALLBACK (action_copy_files_callback) },
7157
 
  /* name, stock id */         { NAUTILUS_ACTION_PASTE, GTK_STOCK_PASTE,
7158
 
  /* label, accelerator */       NULL, NULL,
 
7213
  /* name, stock id */         { NAUTILUS_ACTION_PASTE, NULL,
 
7214
  /* label, accelerator */       N_("_Paste"), "<control>V",
7159
7215
  /* tooltip */                  N_("Move or copy files previously selected by a Cut or Copy command"),
7160
7216
                                 G_CALLBACK (action_paste_files_callback) },
7161
 
  /* We make accelerator "" instead of null here to not inherit the stock
7162
 
     accelerator for paste */
7163
 
  /* name, stock id */         { NAUTILUS_ACTION_PASTE_FILES_INTO, GTK_STOCK_PASTE,
7164
 
  /* label, accelerator */       N_("_Paste Into Folder"), "",
 
7217
  /* name, stock id */         { NAUTILUS_ACTION_PASTE_FILES_INTO, NULL,
 
7218
  /* label, accelerator */       N_("_Paste Into Folder"), NULL,
7165
7219
  /* tooltip */                  N_("Move or copy files previously selected by a Cut or Copy command into the selected folder"),
7166
7220
                                 G_CALLBACK (action_paste_files_into_callback) },
7167
7221
  /* name, stock id */         { NAUTILUS_ACTION_COPY_TO, NULL,
7212
7266
  /* label, accelerator */       N_("_Restore"), NULL,
7213
7267
                                 NULL,
7214
7268
                 G_CALLBACK (action_restore_from_trash_callback) },
7215
 
 /* name, stock id */          { NAUTILUS_ACTION_UNDO, GTK_STOCK_UNDO,
 
7269
 /* name, stock id */          { NAUTILUS_ACTION_UNDO, NULL,
7216
7270
 /* label, accelerator */        N_("_Undo"), "<control>Z",
7217
7271
 /* tooltip */                   N_("Undo the last action"),
7218
7272
                                 G_CALLBACK (action_undo_callback) },
7219
 
 /* name, stock id */          { NAUTILUS_ACTION_REDO, GTK_STOCK_REDO,
7220
 
 /* label, accelerator */        N_("_Redo"), "<control>Y",
 
7273
 /* name, stock id */          { NAUTILUS_ACTION_REDO, NULL,
 
7274
 /* label, accelerator */        N_("_Redo"), "<shift><control>Z",
7221
7275
 /* tooltip */                   N_("Redo the last undone action"),
7222
7276
                                 G_CALLBACK (action_redo_callback) },
7223
7277
  /*
7293
7347
 
7294
7348
  /* Location-specific actions */
7295
7349
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_OPEN_ALTERNATE, NULL,
7296
 
  /* label, accelerator */       N_("Open in Navigation Window"), "",
 
7350
  /* label, accelerator */       N_("Open in Navigation Window"), NULL,
7297
7351
  /* tooltip */                  N_("Open this folder in a navigation window"),
7298
7352
                                 G_CALLBACK (action_location_open_alternate_callback) },
7299
7353
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_OPEN_IN_NEW_TAB, NULL,
7300
 
  /* label, accelerator */       N_("Open in New _Tab"), "",
 
7354
  /* label, accelerator */       N_("Open in New _Tab"), NULL,
7301
7355
  /* tooltip */                  N_("Open this folder in a new tab"),
7302
7356
                                 G_CALLBACK (action_location_open_in_new_tab_callback) },
7303
7357
 
7304
 
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_CUT, GTK_STOCK_CUT,
7305
 
  /* label, accelerator */       NULL, "",
 
7358
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_CUT, NULL,
 
7359
  /* label, accelerator */       N_("Cu_t"), NULL,
7306
7360
  /* tooltip */                  N_("Prepare this folder to be moved with a Paste command"),
7307
7361
                                 G_CALLBACK (action_location_cut_callback) },
7308
 
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_COPY, GTK_STOCK_COPY,
7309
 
  /* label, accelerator */       NULL, "",
 
7362
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_COPY, NULL,
 
7363
  /* label, accelerator */       N_("_Copy"), NULL,
7310
7364
  /* tooltip */                  N_("Prepare this folder to be copied with a Paste command"),
7311
7365
                                 G_CALLBACK (action_location_copy_callback) },
7312
 
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_PASTE_FILES_INTO, GTK_STOCK_PASTE,
7313
 
  /* label, accelerator */       N_("_Paste Into Folder"), "",
 
7366
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_PASTE_FILES_INTO, NULL,
 
7367
  /* label, accelerator */       N_("_Paste Into Folder"), NULL,
7314
7368
  /* tooltip */                  N_("Move or copy files previously selected by a Cut or Copy command into this folder"),
7315
7369
                                 G_CALLBACK (action_location_paste_files_into_callback) },
7316
7370
 
7317
7371
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_TRASH, NULL,
7318
 
  /* label, accelerator */       N_("Mo_ve to Trash"), "",
 
7372
  /* label, accelerator */       N_("Mo_ve to Trash"), NULL,
7319
7373
  /* tooltip */                  N_("Move this folder to the Trash"),
7320
7374
                                 G_CALLBACK (action_location_trash_callback) },
7321
7375
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_DELETE, NAUTILUS_ICON_DELETE,
7322
 
  /* label, accelerator */       N_("_Delete"), "",
 
7376
  /* label, accelerator */       N_("_Delete"), NULL,
7323
7377
  /* tooltip */                  N_("Delete this folder, without moving to the Trash"),
7324
7378
                                 G_CALLBACK (action_location_delete_callback) },
7325
7379
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_RESTORE_FROM_TRASH, NULL,
7351
7405
  /* tooltip */                  N_("Detect media in the selected drive"),
7352
7406
                                 G_CALLBACK (action_location_detect_media_callback) },
7353
7407
 
7354
 
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_PROPERTIES, GTK_STOCK_PROPERTIES,
 
7408
  /* name, stock id */         { NAUTILUS_ACTION_LOCATION_PROPERTIES, NULL,
7355
7409
  /* label, accelerator */       N_("P_roperties"), NULL,
7356
7410
  /* tooltip */                  N_("View or modify the properties of this folder"),
7357
7411
                                 G_CALLBACK (action_location_properties_callback) },
8386
8440
        gboolean selection_contains_special_link;
8387
8441
        gboolean selection_contains_desktop_or_home_dir;
8388
8442
        gboolean selection_contains_recent;
 
8443
        gboolean selection_contains_search;
8389
8444
        gboolean can_create_files;
8390
8445
        gboolean can_delete_files;
8391
8446
        gboolean can_move_files;
8412
8467
        selection_contains_special_link = special_link_in_selection (view);
8413
8468
        selection_contains_desktop_or_home_dir = desktop_or_home_dir_in_selection (view);
8414
8469
        selection_contains_recent = showing_recent_directory (view);
 
8470
        selection_contains_search = view->details->model &&
 
8471
                NAUTILUS_IS_SEARCH_DIRECTORY (view->details->model);
8415
8472
 
8416
8473
        can_create_files = nautilus_view_supports_creating_files (view);
8417
8474
        can_delete_files =
8453
8510
        }
8454
8511
 
8455
8512
        action = gtk_action_group_get_action (view->details->dir_action_group,
 
8513
                                              NAUTILUS_ACTION_OPEN_ITEM_LOCATION);
 
8514
        if (selection_count == 1 &&
 
8515
            (selection_contains_recent || selection_contains_search))
 
8516
        {
 
8517
                gtk_action_set_visible (action, TRUE);
 
8518
        } else {
 
8519
                gtk_action_set_visible (action, FALSE);
 
8520
        }
 
8521
 
 
8522
        action = gtk_action_group_get_action (view->details->dir_action_group,
8456
8523
                                              NAUTILUS_ACTION_NEW_FOLDER);
8457
8524
        gtk_action_set_sensitive (action, can_create_files);
8458
8525
        gtk_action_set_visible (action, !selection_contains_recent);
8533
8600
                                                   GTK_IMAGE_MENU_ITEM (menuitem), app_icon != NULL);
8534
8601
 
8535
8602
        if (app_icon == NULL) {
8536
 
                app_icon = g_themed_icon_new (GTK_STOCK_OPEN);
 
8603
                app_icon = g_themed_icon_new ("gtk-open");
8537
8604
        }
8538
8605
 
8539
8606
        gtk_action_set_gicon (action, app_icon);
8685
8752
        show_save_search = FALSE;
8686
8753
        save_search_sensitive = FALSE;
8687
8754
        show_save_search_as = FALSE;
8688
 
        if (view->details->model &&
8689
 
            NAUTILUS_IS_SEARCH_DIRECTORY (view->details->model)) {
 
8755
        if (selection_contains_search) {
8690
8756
                NautilusSearchDirectory *search;
8691
8757
 
8692
8758
                search = NAUTILUS_SEARCH_DIRECTORY (view->details->model);
9843
9909
                                      "delete", 0);
9844
9910
}
9845
9911
 
 
9912
NautilusView *
 
9913
nautilus_view_new (const gchar          *id,
 
9914
                   NautilusWindowSlot   *slot)
 
9915
{
 
9916
        NautilusView *view = NULL;
 
9917
 
 
9918
        if (g_strcmp0 (id, NAUTILUS_CANVAS_VIEW_ID) == 0) {
 
9919
                view = nautilus_canvas_view_new (slot);
 
9920
        } else if (g_strcmp0 (id, NAUTILUS_LIST_VIEW_ID) == 0) {
 
9921
                view = nautilus_list_view_new (slot);
 
9922
        } else if (g_strcmp0 (id, NAUTILUS_DESKTOP_CANVAS_VIEW_ID) == 0) {
 
9923
                view = nautilus_desktop_canvas_view_new (slot);
 
9924
        }
 
9925
#if ENABLE_EMPTY_VIEW
 
9926
        else if (g_strcmp0 (id, NAUTILUS_EMPTY_VIEW_ID) == 0) {
 
9927
                view = nautilus_empty_view_new (slot);
 
9928
        }
 
9929
#endif
 
9930
 
 
9931
        if (view == NULL) {
 
9932
                g_critical ("Unknown view type ID: %s", id);
 
9933
        } else if (g_object_is_floating (view)) {
 
9934
                g_object_ref_sink (view);
 
9935
        }
 
9936
 
 
9937
        return view;
 
9938
}