当前位置: 首页>>代码示例>>Python>>正文


Python SimpleGladeApp.SimpleGladeApp类代码示例

本文整理汇总了Python中SimpleGladeApp.SimpleGladeApp的典型用法代码示例。如果您正苦于以下问题:Python SimpleGladeApp类的具体用法?Python SimpleGladeApp怎么用?Python SimpleGladeApp使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了SimpleGladeApp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

 def __init__(self, parent, path="gui.glade", root="UpcomingWindow", domain=app_name, **kwargs):
     path = os.path.join(glade_dir, path)
     SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
     # set the application icon
     self.get_widget('UpcomingWindow').set_icon_from_file("monkey.gif")
     self.parent = parent
     
     # set up the treeview in GUI
     col = gtk.TreeViewColumn("Completed", gtk.CellRendererText(), text=1)
     col.set_sort_column_id(1)
     self.treeview.append_column(col)
     col = gtk.TreeViewColumn("Title", gtk.CellRendererText(), text=2)
     col.set_sort_column_id(2)
     self.treeview.append_column(col)
     col = gtk.TreeViewColumn("Date", gtk.CellRendererText(), text=3)
     col.set_sort_column_id(4)
     self.treeview.append_column(col)
     
     # display upcoming tasks
     self.get_tasks_and_display()
     
     # grey out the delete button 
     self.get_widget('delete_button').set_sensitive(False)
     #connect to the selection handler (could not do this by glade... so i connect manually)
     selection = self.treeview.get_selection()
     selection.connect('changed', self.on_tree_selection_changed)
开发者ID:gecko,项目名称:taskmonkee,代码行数:26,代码来源:taskmonkee.py

示例2: __init__

 def __init__(self, datadir, parent, multiple_items_list, name, remove):
     SimpleGladeApp.__init__(self,
                             path=datadir+"/gnome-app-install.glade",
                             root="dialog_multiple_apps",
                             domain="gnome-app-install")
     self.store = gtk.ListStore(gobject.TYPE_STRING,
                                gobject.TYPE_PYOBJECT,
                                gobject.TYPE_INT)
     for elm in multiple_items_list:
         self.store.append((elm.name, elm, 0))
     self.dialog_multiple_apps.set_transient_for(parent)
     # Setup the application list
     self.treeview_apps = AppListView(style=1)
     self.scrolledwindow_multiple_apps.add(self.treeview_apps)
     self.treeview_apps.set_headers_visible(False)
     self.treeview_apps.set_model(self.store)
     self.treeview_apps.show()
     # Create the dialog message text
     if remove == True:
         header = (_("Remove %s and bundled applications?") % name)
         msg = _("%s is part of a software collection. If you remove "
                 "%s, you will remove all bundled applications as well.") %\
               (name, name)
         label = _("_Remove All")
     else:
         header = (_("Install %s and bundled applications?") % name)
         msg = _("%s is part of a software collection. If you install "
                 "%s, you will install all bundled applications as well.") %\
               (name, name)
         label = _("_Install All")
     self.label_multiple.set_markup("<b><big>%s</big></b>\n\n%s" %\
                                    (header, msg))
     self.button_multiple_action.set_label(label)
开发者ID:guadalinex-archive,项目名称:guadalinex-v7,代码行数:33,代码来源:DialogMultipleApps.py

示例3: __init__

    def __init__(self, *args):
        self.buffer = gtk.TextBuffer()
        #Highlighted username tag
        self.buffer.create_tag("user", weight=pango.WEIGHT_BOLD, foreground="blue")
	
        SimpleGladeApp.__init__(self, "chat.glade")
        self.received_text.set_buffer(self.buffer)
开发者ID:mcolyer,项目名称:nearby,代码行数:7,代码来源:main.py

示例4: __init__

    def __init__(self, glade_path="zapys.glade", root="window", domain=None):
        glade_path = os.path.join(glade_dir, glade_path)
        SimpleGladeApp.__init__(self, glade_path, root, domain)

        # lets create preview control
        if webkit_preview:
            self.browser = webkit.WebView()
            self.scrollbrowser.add(self.browser)
            self.browser.show()


        #create source view widget
        if sourceview:
            self.textview=gtksourceview.View()
            self.textview.set_tab_width(4)
            self.textview.set_wrap_mode(gtk.WRAP_WORD)
            self.textview.set_auto_indent(True)
            #create source buffer to replace text buffer
            source_buffer=gtksourceview.Buffer()
            self.textview.set_buffer(source_buffer)
        else:
            self.textview=gtk.TextView()

        self.scrolltext.add(self.textview)
        self.textview.show()
开发者ID:tymofij,项目名称:zapys,代码行数:25,代码来源:zapys.py

示例5: __init__

 def __init__(self, path="autitux.glade",
              root="mainWindow",
              domain=app_name, **kwargs):
     path = os.path.join(glade_dir, path)
     SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
     gobject.threads_init()
     self.coma = autituxhelper.relayCommand()
开发者ID:skalanux,项目名称:autitux,代码行数:7,代码来源:autitux.py

示例6: __init__

 def __init__(self, datadir, parent, to_add, to_rm):
     SimpleGladeApp.__init__(self,
                             path=datadir+"/gnome-app-install.glade",
                             root="dialog_pending_changes",
                             domain="gnome-app-install")
     self.add_store = gtk.ListStore(gobject.TYPE_STRING,
                                    gobject.TYPE_PYOBJECT,
                                    gobject.TYPE_INT)
     self.remove_store = gtk.ListStore(gobject.TYPE_STRING,
                                       gobject.TYPE_PYOBJECT,
                                       gobject.TYPE_INT)
     for elm in to_add:
         self.add_store.append([elm.name, elm, 0])
     for elm in to_rm:
         self.remove_store.append([elm.name, elm ,0])
     self.dialog_pending_changes.realize()
     self.dialog_pending_changes.set_transient_for(parent)
     self.button_confirm_changes.grab_default()
     self.dialog_pending_changes.window.set_functions(gtk.gdk.FUNC_MOVE)
     # Setup the app list viewers
     self.treeview_add = AppListView(style=1)
     self.treeview_remove = AppListView(style=1)
     self.scrolledwindow_add.add(self.treeview_add)
     self.scrolledwindow_remove.add(self.treeview_remove)
     self.treeview_add.set_headers_visible(False)
     self.treeview_remove.set_headers_visible(False)
     self.treeview_add.set_model(self.add_store)
     self.treeview_remove.set_model(self.remove_store)
     self.treeview_add.show()
     self.treeview_remove.show()
开发者ID:guadalinex-archive,项目名称:guadalinex-v7,代码行数:30,代码来源:DialogPendingChanges.py

示例7: __init__

    def __init__(self, path="ui/glade/gmusictagger.glade",
                 root="GMusicTagger",
                 domain=env.APP_NAME,
                 **kwargs):
        """ Intialize the Glade Files and the extra Widget.
        Also initialize the log, the core helpers and the text domain """        
        SimpleGladeApp.__init__(self, path, root, domain, **kwargs)             
        
        # Set Application Icon
        self.GMusicTagger.set_icon_from_file(env.ICON_GMUSICTAGGER)
        
        # Set menu icons
        self.image_add.set_from_pixbuf(env.ADD_BUF32)
        self.image_remove.set_from_pixbuf(env.REMOVE_BUF32)
        self.image_update.set_from_pixbuf(env.UPDATE_BUF32)
        self.image_fill.set_from_pixbuf(env.FILL_BUF32)
        self.image_play.set_from_pixbuf(env.PLAY_BUF32)
        self.image_settings.set_from_pixbuf(env.SETTINGS_BUF32)
        
        self.image_export_apic.set_from_pixbuf(env.EXPORT_APIC_BUF16)
        self.image_remove_apic.set_from_pixbuf(env.REMOVE_APIC_BUF16)
        
        self.image_mp3_up.set_from_pixbuf(env.ARROW_UP_BUF16)
        self.image_mp3_down.set_from_pixbuf(env.ARROW_DOWN_BUF16)
        self.image_edited_mp3.set_from_pixbuf(env.EDITED_TRACK_BUF24)
        
        # Load preferences in config        
        config_file = os.path.join(env.CONFIG_PATH,env.CONFIG_FILE)
        self.prefparser = preferences.Config(config_file) 
        self.config = self.prefparser.load()                                              

        # Initialize log
        self.initialize_log()
        self.log = logging.getLogger(self.__class__.__name__)
        self.log.info("%s %s" % (env.APP_NAME,env.APP_VERSION))
        self.log.info("Session started")
               
        # Initialize ProgressBar
        self.progressbarbox = progressbar.ProgressBarBox()                                    
        self.vbox_buttons.pack_end(self.progressbarbox)
                
        # Initialize Mp3 Tree
        self.initialize_mp3_tree()            

        # Initialize Cover
        self.mp3_apic.set_from_pixbuf(env.EMPTY_APIC_BUF160)
        self.btn_apic.set_sensitive(False)
        self.btn_export_apic.set_sensitive(False)
        self.btn_remove_apic.set_sensitive(False)

        # Initialize Generic Tagging
        self.generic_tag_cover = None
        self.generic_tag_mode_active = False
        self.initialize_generic_tagging()
        self.update_generic_tagging_view()
        
        # Initialize the settings dialog
        settingsglade = os.path.join(env.GLADE_PATH,env.GLADE_SETTINGS)
        self.dialog_settings = settings.DialogSettings(path=settingsglade)        
开发者ID:gguerrero,项目名称:GMusicTagger,代码行数:59,代码来源:app.py

示例8: __init__

 def __init__(self, filename=None, root=None):
     SimpleGladeApp.__init__(self, filename, root)
     PrefixActions.__init__(self)
     self.add_prefix_actions(self)
     for dialog in self.get_widgets():
         if isinstance(dialog, gtk.Dialog):
             dialog.connect('key-release-event', self.hide_dialog)
     self.check_widgets()
开发者ID:esanmartin,项目名称:agro,代码行数:8,代码来源:GladeConnect.py

示例9: __init__

	def __init__( self,  gjlib, path=glade_filename, root=None, domain=app_name, **kwargs ):
		path = os.path.join(glade_dir, path)
		
		self.gjlib = gjlib
		self.edita = {}
		self.camps_editats = {}
		
		SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
开发者ID:BackupTheBerlios,项目名称:gesjo-svn,代码行数:8,代码来源:appbase.py

示例10: __init__

	def __init__(self, data_path = None, tracks = None, okmethod = None, gpx = None):
		logging.debug(">>")
		self.data_path = data_path
		self.okmethod = okmethod
		self.tracks = tracks
		self.gpx = gpx
		root="selecttrackdialog"
		SimpleGladeApp.__init__(self, data_path+"glade/selecttrackdialog.glade", root, None)
		logging.debug("<<")
开发者ID:MrBricodage,项目名称:pytrainer,代码行数:9,代码来源:dialogselecttrack.py

示例11: __init__

    def __init__(self):
        SimpleGladeApp.__init__(self, os.path.dirname(__file__) + "/ui.glade")

        store = FavoritesStore()

        self.wxIconView.set_model(store)
        self.wxIconView.set_text_column(1)
        self.wxIconView.set_pixbuf_column(0)

        gtk.window_set_default_icon(load_icon(WINDOW_ICON))
开发者ID:Artanis,项目名称:UNRFavorites,代码行数:10,代码来源:ui.py

示例12: __init__

 def __init__(self, path="xamppcontrolpanel.glade", root="PrefsWindow", domain=None, **kwargs):
     path = os.path.join(glade_dir, path)
     SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
     self.pathTextBox.set_text(self.parent.get_xampp_path())
     self.HTTPD = self.parent.get_xampp_path().strip() + '/etc/httpd.conf'
     self.MySQL = self.parent.get_xampp_path().strip() + '/etc/my.cnf'
     self.BACKUP = self.parent.get_xampp_path().strip() + '/etc/bu_httpd.conf'
     self.get_Apache_Setting()
     self.sqlFile = iniFile(self.MySQL)
     self.get_SQL_Setting()
     self.modified = False
开发者ID:navelpluisje,项目名称:xampp-control,代码行数:11,代码来源:xampp-control-panel.py

示例13: __init__

 def __init__(self, sport_service, data_path = None, parent=None, pytrainer_main=None):
     glade_path="glade/profile.glade"
     root = "newprofile"
     domain = None
     self.parent = parent
     self.pytrainer_main = pytrainer_main
     self.data_path = data_path
     SimpleGladeApp.__init__(self, data_path+glade_path, root, domain)
     self.conf_options = parent.profile_options
     self.stored_color = pytrainer.lib.color.Color(0)
     self._sport_service = sport_service
开发者ID:azapletal,项目名称:pytrainer,代码行数:11,代码来源:windowprofile.py

示例14: __init__

 def __init__(self, path="ui/glade/settings.glade",
              root="aboutdialog_gmusictagger",
              domain=env.APP_NAME,
              **kwargs):
     """ Intialize the Glade Files and the extra Widget.
     Also initialize the log, the core helpers and the text domain """        
     SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
     
     # Icon Images
     self.aboutdialog_gmusictagger.set_icon_from_file(env.ICON_GMUSICTAGGER)
     self.aboutdialog_gmusictagger.set_logo(env.GMUSICTAGGER_BUF)
开发者ID:gguerrero,项目名称:GMusicTagger,代码行数:11,代码来源:settings.py

示例15: __init__

	def __init__(self, path="calix.glade", root="window", domain=app_name, **kwargs):
		path = os.path.join(glade_dir, path)
		SimpleGladeApp.__init__(self, path, root, domain, **kwargs)
		self.red,self.green,self.blue = self.get_current_gamma()
		self.ored = self.red
		self.ogreen = self.green
		self.oblue = self.blue
		self.set_gamma(1.0,1.0,1.0)
		self.button_back.hide()
		self.button_next.show()
		self.button_done.hide()
开发者ID:creationix,项目名称:Calix,代码行数:11,代码来源:calix.py


注:本文中的SimpleGladeApp.SimpleGladeApp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。