[Pkg-privacy-commits] [msva-perl] 121/356: add marginalUI spike in perl

Ximin Luo infinity0 at moszumanska.debian.org
Mon Aug 24 07:41:47 UTC 2015


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch debian
in repository msva-perl.

commit 72f9d5e1c5d1f27245b13eaf8b6b922832470bb6
Author: Elliot Winard <enw at caveteen.com>
Date:   Sat Oct 2 17:18:05 2010 -0400

    add marginalUI spike in perl
---
 marginalUI.glade | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 marginalUI.pl    | 55 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 123 insertions(+)

diff --git a/marginalUI.glade b/marginalUI.glade
new file mode 100644
index 0000000..fe3bb9e
--- /dev/null
+++ b/marginalUI.glade
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+<glade-interface>
+  <!-- interface-requires gtk+ 2.16 -->
+  <!-- interface-naming-policy project-wide -->
+  <widget class="GtkDialog" id="dialog">
+    <property name="visible">True</property>
+    <property name="border_width">5</property>
+    <property name="type_hint">normal</property>
+    <property name="has_separator">False</property>
+    <child internal-child="vbox">
+      <widget class="GtkVBox" id="dialog-vbox1">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="spacing">2</property>
+        <child>
+          <widget class="GtkLabel" id="messageLabel">
+            <property name="visible">True</property>
+            <property name="use_markup">True</property>
+          </widget>
+          <packing>
+            <property name="position">1</property>
+          </packing>
+        </child>
+        <child internal-child="action_area">
+          <widget class="GtkHButtonBox" id="dialog-action_area1">
+            <property name="visible">True</property>
+            <property name="layout_style">end</property>
+            <child>
+              <widget class="GtkButton" id="yesButton">
+                <property name="label">gtk-yes</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_yesButton_clicked"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">0</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="GtkButton" id="noButton">
+                <property name="label">gtk-no</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">True</property>
+                <property name="use_stock">True</property>
+                <signal name="clicked" handler="on_noButton_clicked" object="no"/>
+              </widget>
+              <packing>
+                <property name="expand">False</property>
+                <property name="fill">False</property>
+                <property name="position">1</property>
+              </packing>
+            </child>
+          </widget>
+          <packing>
+            <property name="expand">False</property>
+            <property name="pack_type">end</property>
+            <property name="position">0</property>
+          </packing>
+        </child>
+      </widget>
+    </child>
+  </widget>
+</glade-interface>
diff --git a/marginalUI.pl b/marginalUI.pl
new file mode 100755
index 0000000..0714423
--- /dev/null
+++ b/marginalUI.pl
@@ -0,0 +1,55 @@
+#!/usr/bin/perl -w
+
+#----------------------------------------------------------------------
+# marginalUI
+#
+# TODO: make the $heredoc a fucntion that takes the following args -
+#    end entity uid - string
+#    certifiers - list of certifiers
+#
+#----------------------------------------------------------------------
+
+use strict;
+use warnings;
+
+use Gtk2 '-init'; # auto-initializes Gtk2
+use Gtk2::GladeXML;
+
+my $glade;
+my $label;
+
+# populate UI from 
+$glade = Gtk2::GladeXML->new("marginalUI.glade");
+
+# Connect the signals
+$glade->signal_autoconnect_from_package('main');
+
+$label = $glade->get_widget('messageLabel');
+my $labeltxt = <<'END';
+pub   4096R/E27BAABC 2007-01-08 [expires: 2012-01-07] 
+uid       [  full  ] Jameson Graef Rollins <jrollins at finestructure.net> 
+uid       [  full  ] Jameson Graef Rollins <jrollins at phys.columbia.edu>
+uid       [  full  ] Jameson Graef Rollins <jrollins at fifthhorseman.net>
+uid       [  full  ] Jameson Graef Rollins <jrollins at astro.columbia.edu>
+uid       [  full  ] Jameson Rollins <jrollins at fifthhorseman.net>
+uid       [  full  ] Jameson Graef Rollins <jameson.rollins at ligo.org>
+uid       [  full  ] [jpeg image of size 4097]
+uid       [marginal] Jameson Rollins <jrollins at finestructure.net>
+sub   4096R/1321E689 2007-01-09 [expires: 2012-01-08]
+sub   2048R/4414A10A 2008-06-18 [expires: 2013-06-17]
+
+Do you trust this dude?
+END
+$label->set_text($labeltxt);
+
+# Start it up
+Gtk2->main;
+
+exit 0;
+
+sub on_yesButton_clicked {
+    exit 0;
+}
+sub on_noButton_clicked {
+    exit 1;
+}

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/msva-perl.git



More information about the Pkg-privacy-commits mailing list