Marcin Kasperski avatar Marcin Kasperski committed d44aff8

Cleaning up dead work

Comments (0)

Files changed (5)

src/mekk/nozbe2xmind/gui/__init__.py

-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-"""
-Skrypcik prezentujący okienko
-"""
-
-from twisted.internet import gtk2reactor
-gtk2reactor.install()
-
-from twisted.internet import reactor
-
-import pygtk
-import gtk, gtk.glade
-
-# Patrz /usr/share/doc/python-gtk2-tutorial/html/
-# Patrz przede wszystkim pygtk-demo
-
-
-# Pliki glade - edycja przy pomocy glade-3
-
-
-class MainWindow(object):
-
-    def __init__(self):
-        self.gladefile = "nozbe2xmind.glade"
-        self.wTree = gtk.glade.XML(self.gladefile)
-        self.window = self.wTree.get_widget("MainWindow")
-        if (self.window):
-            self.window.connect("destroy", self.close)
-            self.window.show()
-
-    def close(self, widget, data=None):
-        reactor.stop()
-
-
-if __name__ == "__main__":
-    hwg = MainWindow()
-    #gtk.main()
-    reactor.run()

src/mekk/nozbe2xmind/gui/main.py

-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-from twisted.internet import gtk2reactor
-gtk2reactor.install()
-
-from twisted.internet import reactor
-
-import pygtk
-import gtk, gtk.glade
-
-from widgets import wTree
-
-class MainWindow(object):
-    def __init__(self):
-        self.win = wTree.get_widget("MainWindow")
-        wTree.signal_autoconnect(self)
-        self.win.show()
-
-def close_reactor(widget, data=None):
-    reactor.stop()
-
-if __name__ == "__main__":
-    apref = MainWindow()
-    apref.win.connect("destroy", close_reactor)
-    reactor.run()

src/mekk/nozbe2xmind/gui/nozbe2xmind.glade

-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
-<!--Generated with glade3 3.4.5 on Fri Dec 26 22:02:46 2008 -->
-<glade-interface>
-  <widget class="GtkDialog" id="AuthPrefsWindow">
-    <property name="border_width">5</property>
-    <property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
-    <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
-    <property name="has_separator">False</property>
-    <child internal-child="vbox">
-      <widget class="GtkVBox" id="dialog-vbox1">
-        <property name="visible">True</property>
-        <property name="spacing">2</property>
-        <child>
-          <widget class="GtkVBox" id="vbox1">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkHBox" id="hbox2">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkLabel" id="apilabel">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Your Nozbe API Key:</property>
-                  </widget>
-                </child>
-                <child>
-                  <placeholder/>
-                </child>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkEntry" id="api_key_entry">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkHBox" id="hbox1">
-                <property name="visible">True</property>
-                <child>
-                  <placeholder/>
-                </child>
-                <child>
-                  <widget class="GtkCheckButton" id="save">
-                    <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="label" translatable="yes">save_permanently</property>
-                    <property name="response_id">0</property>
-                    <property name="draw_indicator">True</property>
-                  </widget>
-                  <packing>
-                    <property name="position">1</property>
-                  </packing>
-                </child>
-              </widget>
-              <packing>
-                <property name="position">2</property>
-              </packing>
-            </child>
-          </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">GTK_BUTTONBOX_END</property>
-            <child>
-              <widget class="GtkButton" id="btn_ok">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="can_default">True</property>
-                <property name="has_default">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-ok</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-            </child>
-            <child>
-              <widget class="GtkButton" id="btn_cancel">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">gtk-cancel</property>
-                <property name="use_stock">True</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-          </widget>
-          <packing>
-            <property name="expand">False</property>
-            <property name="pack_type">GTK_PACK_END</property>
-          </packing>
-        </child>
-      </widget>
-    </child>
-  </widget>
-  <widget class="GtkWindow" id="MainWindow">
-    <child>
-      <widget class="GtkHBox" id="hbox3">
-        <property name="visible">True</property>
-        <child>
-          <placeholder/>
-        </child>
-        <child>
-          <widget class="GtkVBox" id="vbox2">
-            <property name="visible">True</property>
-            <child>
-              <widget class="GtkMenuBar" id="menubar1">
-                <property name="visible">True</property>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem1">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_Plik</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menu1">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem1">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-new</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem2">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-open</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem3">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-save</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem4">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-save-as</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
-                            <property name="visible">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem5">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-quit</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem2">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_Edycja</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menu2">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem6">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-cut</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem7">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-copy</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem8">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-paste</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem9">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-delete</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem3">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">_Widok</property>
-                    <property name="use_underline">True</property>
-                  </widget>
-                </child>
-                <child>
-                  <widget class="GtkMenuItem" id="menuitem4">
-                    <property name="visible">True</property>
-                    <property name="label" translatable="yes">Pomo_c</property>
-                    <property name="use_underline">True</property>
-                    <child>
-                      <widget class="GtkMenu" id="menu3">
-                        <property name="visible">True</property>
-                        <child>
-                          <widget class="GtkImageMenuItem" id="imagemenuitem10">
-                            <property name="visible">True</property>
-                            <property name="label" translatable="yes">gtk-about</property>
-                            <property name="use_underline">True</property>
-                            <property name="use_stock">True</property>
-                          </widget>
-                        </child>
-                      </widget>
-                    </child>
-                  </widget>
-                </child>
-              </widget>
-              <packing>
-                <property name="expand">False</property>
-              </packing>
-            </child>
-            <child>
-              <widget class="GtkButton" id="button1">
-                <property name="visible">True</property>
-                <property name="can_focus">True</property>
-                <property name="receives_default">True</property>
-                <property name="label" translatable="yes">button</property>
-                <property name="response_id">0</property>
-              </widget>
-              <packing>
-                <property name="position">1</property>
-              </packing>
-            </child>
-            <child>
-              <placeholder/>
-            </child>
-          </widget>
-          <packing>
-            <property name="position">1</property>
-          </packing>
-        </child>
-        <child>
-          <placeholder/>
-        </child>
-      </widget>
-    </child>
-  </widget>
-</glade-interface>

src/mekk/nozbe2xmind/gui/prefs.py

-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-"""
-Skrypcik prezentujący okienko
-"""
-
-from twisted.internet import gtk2reactor
-gtk2reactor.install()
-
-from twisted.internet import reactor
-
-import pygtk
-import gtk, gtk.glade
-
-from widgets import wTree
-
-class AuthPrefsWindow(object):
-    def __init__(self):
-        self.dialog = wTree.get_widget("AuthPrefsWindow")
-        wTree.signal_autoconnect(self)
-        self.dialog.show()
-
-def close_reactor(widget, data=None):
-    reactor.stop()
-
-if __name__ == "__main__":
-    apref = AuthPrefsWindow()
-    apref.dialog.connect("destroy", close_reactor)
-    reactor.run()

src/mekk/nozbe2xmind/gui/widgets.py

-#!/usr/bin/python
-# -*- coding: utf-8 -*-
-
-import gtk, gtk.glade
-
-GLADE_FILE = "nozbe2xmind.glade"
-
-# W sumie niepotrzebne, gtk.glade cacheuje i każda klasa może po swojemu.
-# Ale zróbmy to raz a dobrze
-wTree = gtk.glade.XML(GLADE_FILE)
-
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.