void on_exitbuttonclicked(GtkWidget *widget, gpointer data) { TRACEINFO; int posx,posy; sPlayerInterface* player_interf = (sPlayerInterface*)data; //~ gtk_window_set_transient_for(GTK_WINDOW(player_interf->ui->pWebWindow),GTK_WINDOW(player_interf->ui->pTVWindow)); get_window_position(player_interf->ui->pWebWindow, &posx, &posy); resizevideoplayer(player_interf, HBBTV_VIDEO_WIDTH, HBBTV_VIDEO_HEIGHT); set_window_position(player_interf->ui->pTVWindow, posx, posy); gtk_window_set_position(GTK_WINDOW(player_interf->ui->pTVWindow),GTK_WIN_POS_CENTER_ALWAYS); webkit_web_view_load_uri(player_interf->ui->pWebView, player_interf->url); }
static void power_action(const PowerActionData* action) { g_return_if_fail(config.power.enabled && action->get_allow()); if(*action->show_prompt_ptr) { GtkWidget* dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_NONE, "%s", _(action->prompt)); gtk_dialog_add_buttons(GTK_DIALOG(dialog), _("Return to Login"), GTK_RESPONSE_CANCEL, _(action->name), GTK_RESPONSE_OK, NULL); gtk_widget_set_name(dialog, "power_dialog"); gtk_window_set_title(GTK_WINDOW(dialog), action->name); setup_window(GTK_WINDOW(dialog)); if(action->icon && gtk_icon_theme_has_icon(gtk_icon_theme_get_default(), action->icon)) { GtkWidget* image = gtk_image_new_from_icon_name(action->icon, GTK_ICON_SIZE_DIALOG); gtk_message_dialog_set_image(GTK_MESSAGE_DIALOG(dialog), image); } gtk_widget_hide(greeter.ui.login_window); gtk_widget_set_sensitive(greeter.ui.power.widget, FALSE); gtk_widget_show_all(dialog); set_window_position(dialog, &WINDOW_POSITION_CENTER); gboolean result = gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK; gtk_widget_destroy(dialog); gtk_widget_show(greeter.ui.login_window); update_windows_layout(); gtk_widget_set_sensitive(greeter.ui.power.widget, TRUE); if(!result) return; } GError* error = NULL; if(!action->do_action(&error) && error) { g_warning("Action \"%s\" failed with error: %s.", action->name, error->message); show_error(_(action->name), _("Action \"%s\" failed with error: %s."), _(action->name), error->message); g_clear_error(&error); } }
void on_playpausebuttonclicked(GtkWidget *widget, gpointer data) { TRACEINFO; sPlayerInterface* player_interf = (sPlayerInterface*)data; set_window_position(player_interf->ui->pTVWindow, 0, 0); }