static void impl_gth_application_load_image (PortableServer_Servant _servant, const CORBA_char *uri, CORBA_Environment *ev) { if (*uri == '\0') uri = NULL; if (UseViewer) { GtkWidget *viewer = gth_viewer_get_current_viewer (); if (viewer == NULL) { show_grabbing_focus (gth_viewer_new (uri)); } else { gth_viewer_load_from_uri (GTH_VIEWER (viewer), uri); show_grabbing_focus (viewer); } } else { GtkWidget *browser = gth_browser_get_current_browser (); if (browser == NULL) { show_grabbing_focus (gth_browser_new (uri)); } else { gth_browser_load_uri (GTH_BROWSER (browser), uri); show_grabbing_focus (browser); } } }
static void import_photos_from_location (GFile *location) { GtkWidget *window; window = gth_browser_new (NULL, NULL); gth_browser_set_close_with_task (GTH_BROWSER (window), TRUE); gth_hook_invoke ("import-photos", window, location, NULL); }
static void impl_gth_application_open_browser (PortableServer_Servant _servant, const CORBA_char *uri, CORBA_Environment *ev) { if (*uri == '\0') uri = NULL; show_grabbing_focus (gth_browser_new (uri)); }
void gth_application_activate_new_window (GSimpleAction *action, GVariant *parameter, gpointer user_data) { GApplication *application = user_data; GtkWidget *browser; GtkWidget *window; browser = _gth_application_get_current_window (application); window = gth_browser_new (gth_browser_get_location (GTH_BROWSER (browser)), NULL); gtk_window_present (GTK_WINDOW (window)); }
void gth_browser_activate_open_folder_in_new_window (GSimpleAction *action, GVariant *parameter, gpointer user_data) { GthBrowser *browser = GTH_BROWSER (user_data); GthFileData *file_data; GtkWidget *new_browser; file_data = gth_browser_get_folder_popup_file_data (browser); if (file_data == NULL) return; new_browser = gth_browser_new (file_data->file, NULL); gtk_window_present (GTK_WINDOW (new_browser)); g_object_unref (file_data); }
static void open_browser_window (const char *uri, gboolean show_window, gboolean use_factory, GNOME_GThumb_Application app, CORBA_Environment *env) { GtkWidget *current_window; if (use_factory) { if (uri == NULL) uri = ""; GNOME_GThumb_Application_open_browser (app, uri, env); return; } current_window = gth_browser_new (uri); if (show_window) gtk_widget_show (current_window); if (first_window == NULL) first_window = current_window; }
static void open_browser_window (GFile *location, GFile *file_to_select, gboolean force_new_window) { gboolean reuse_active_window; GtkWidget *window; if (! force_new_window) { GSettings *settings; settings = g_settings_new (GTHUMB_BROWSER_SCHEMA); reuse_active_window = g_settings_get_boolean (settings, PREF_BROWSER_REUSE_ACTIVE_WINDOW); g_object_unref (settings); } else reuse_active_window = FALSE; window = NULL; if (reuse_active_window) { GList *windows = gtk_application_get_windows (Main_Application); if (windows != NULL) window = windows->data; } if (window == NULL) window = gth_browser_new (location, file_to_select); else if (file_to_select != NULL) gth_browser_go_to (GTH_BROWSER (window), location, file_to_select); else gth_browser_load_location (GTH_BROWSER (window), location); if (! StartSlideshow) gtk_window_present (GTK_WINDOW (window)); }