gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-


From: Sandro Santilli
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_start-428-gf280478
Date: Tue, 29 Mar 2011 22:27:57 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  f28047893bce2ee9958e1f71f563dbd7faeca44c (commit)
      from  9c79a4142f841cb587053fa68a77aea12a3d8eb0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=f28047893bce2ee9958e1f71f563dbd7faeca44c


commit f28047893bce2ee9958e1f71f563dbd7faeca44c
Author: Sandro Santilli <address@hidden>
Date:   Wed Mar 30 00:27:18 2011 +0200

    Implement yesno for GTK gui. Visible effect: you now get a popup when 
script execution takes over the time limit (default: 15 secs).

diff --git a/gui/gtk/gtk.cpp b/gui/gtk/gtk.cpp
index 85c9f74..06fcb4f 100644
--- a/gui/gtk/gtk.cpp
+++ b/gui/gtk/gtk.cpp
@@ -2116,6 +2116,37 @@ GtkGui::checkX11Extension(const std::string& ext)
     return false;
 }
 
+bool
+GtkGui::yesno(const std::string& question)
+{
+    bool ret = true;
+
+    GtkWidget *dialog;
+
+    dialog = gtk_message_dialog_new(
+        GTK_WINDOW(_window),
+        GTK_DIALOG_MODAL,
+        GTK_MESSAGE_QUESTION,
+        GTK_BUTTONS_YES_NO,
+        question.c_str());
+
+    switch(gtk_dialog_run(GTK_DIALOG(dialog)))
+    {
+      case GTK_RESPONSE_YES:
+        ret = true;
+        break;
+      case GTK_RESPONSE_NO:
+        ret = false;
+        break;
+      default:
+        break;
+    }
+
+    gtk_widget_destroy(dialog);
+
+    return ret;
+}
+
 
 /// Anonymous namespace for callbacks, local functions, event handlers etc.
 namespace {
diff --git a/gui/gtk/gtksup.h b/gui/gtk/gtksup.h
index e8ce39e..02db3a1 100644
--- a/gui/gtk/gtksup.h
+++ b/gui/gtk/gtksup.h
@@ -73,6 +73,8 @@ public:
     
     virtual void hideMenu();
 
+    virtual bool yesno(const std::string& question);
+
     /// For System.capabilities information.
     virtual double getPixelAspectRatio() const;
     virtual std::pair<int, int> screenResolution() const;

-----------------------------------------------------------------------

Summary of changes:
 gui/gtk/gtk.cpp  |   31 +++++++++++++++++++++++++++++++
 gui/gtk/gtksup.h |    2 ++
 2 files changed, 33 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]