/** * gva_main_progress_bar_hide: * * Hides the progress bar in the main window's status bar and sets the * mouse cursor back to normal. Generally useful after completing a * long-running foreground task. **/ void gva_main_progress_bar_hide (void) { GtkWindow *window; window = GTK_WINDOW (GVA_WIDGET_MAIN_WINDOW); gtk_window_set_has_resize_grip (window, TRUE); gtk_widget_hide (GVA_WIDGET_MAIN_PROGRESS_BAR); gva_main_cursor_normal (); }
static void wnck_weak_notify_cb (WnckScreen *screen, GObject *where_the_process_was) { /* The process exited before we could match a window to it. */ g_signal_handlers_disconnect_matched ( screen, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, where_the_process_was); window_opened_handler_id = 0; gva_main_cursor_normal (); }
static void wnck_window_opened_cb (WnckScreen *screen, WnckWindow *window, GvaProcess *process) { GPid pid; /* XXX This is totally non-portable. */ pid = (GPid) wnck_window_get_pid (window); /* XXX The process ID for SDLMAME windows currently comes back 0. * We can use this as a heuristic for matching SDLMAME windows * to SDLMAME processes. But it's not perfect. */ if (pid != gva_process_get_pid (process) && pid != 0) return; /*** From this point forward, assume we have a match. ***/ /* Exchange the weak reference for a real reference. */ g_object_weak_unref ( g_object_ref (process), (GWeakNotify) wnck_weak_notify_cb, screen); /* Bind the referenced process to the window. */ g_object_set_data_full ( G_OBJECT (window), "process", process, (GDestroyNotify) g_object_unref); /* No need to be notified of new windows anymore. */ g_signal_handler_disconnect (screen, window_opened_handler_id); window_opened_handler_id = 0; wnck_window_initialize (window); g_signal_connect ( window, "geometry-changed", G_CALLBACK (wnck_window_timeout_reset), NULL); g_signal_connect ( window, "state-changed", G_CALLBACK (wnck_window_timeout_reset), NULL); g_signal_connect ( screen, "window-closed", G_CALLBACK (wnck_window_closed_cb), NULL); gva_main_cursor_normal (); }
/** * gva_main_progress_bar_hide: * * Hides the progress bar in the main window's status bar and sets the * mouse cursor back to normal. Generally useful after completing a * long-running foreground task. **/ void gva_main_progress_bar_hide (void) { gtk_widget_hide (GVA_WIDGET_MAIN_PROGRESS_BAR); gva_main_cursor_normal (); }