/** * gva_main_progress_bar_show: * * Shows the progress bar in the main window's status bar and sets the * mouse cursor to busy. Generally useful before starting a long-running * foreground task. **/ void gva_main_progress_bar_show (void) { gva_main_progress_bar_set_fraction (0.0); gtk_widget_show (GVA_WIDGET_MAIN_PROGRESS_BAR); gva_main_cursor_busy (); }
/** * gva_wnck_listen_for_new_window: * @process: a #GvaProcess * @game: the game that @process is running * * Implements spatial MAME windows. * * This function gets called immediately after a game is started. It uses * libwnck to listen for a new window, and does its best to verify whether * it's a MAME window. If it identifies the window, it restores the size, * position and maximize state of that particular game from the previous * session and records any further window geometry changes. The game * database is used as the storage medium for window geometries. **/ void gva_wnck_listen_for_new_window (GvaProcess *process, const gchar *game) { #ifdef HAVE_WNCK g_return_if_fail (GVA_IS_PROCESS (process)); g_return_if_fail (game != NULL); if (window_opened_handler_id > 0) { g_warning ("GVA can only listen for one new window at a time"); return; } g_object_set_data_full ( G_OBJECT (process), "game", g_strdup (game), (GDestroyNotify) g_free); /* Keep a weak reference on the process until we can match it * to a newly opened window, at which time we'll add a real * reference and bind it to the corresponding WnckWindow. * If the process exits early we'll know to stop listening. */ g_object_weak_ref ( G_OBJECT (process), (GWeakNotify) wnck_weak_notify_cb, wnck_screen_get_default ()); window_opened_handler_id = g_signal_connect ( wnck_screen_get_default (), "window-opened", G_CALLBACK (wnck_window_opened_cb), process); gva_main_cursor_busy (); #endif /* HAVE_WNCK */ }
/** * gva_main_progress_bar_show: * * Shows the progress bar in the main window's status bar and sets the * mouse cursor to busy. Generally useful before starting a long-running * foreground task. **/ void gva_main_progress_bar_show (void) { GtkWindow *window; window = GTK_WINDOW (GVA_WIDGET_MAIN_WINDOW); gtk_window_set_has_resize_grip (window, FALSE); gva_main_progress_bar_set_fraction (0.0); gtk_widget_show (GVA_WIDGET_MAIN_PROGRESS_BAR); gva_main_cursor_busy (); }