示例#1
0
文件: HomePage.py 项目: wzhd/bcloud
 def append_button(self, abspath, name):
     button = Gtk.Button.new_with_label(gutil.ellipse_text(name))
     button.abspath = abspath
     button.set_tooltip_text(name)
     if Gtk.MINOR_VERSION < 12:
         button.set_size_request(45, -1)
     self.pack_start(button, False, False, 0)
     button.connect('clicked', self.on_button_clicked)
示例#2
0
    def append_button(self, abspath, name):
        button = Gtk.Button()
        button.abspath = abspath
        button.set_tooltip_text(name)

        if abspath == '/':
            home_img = Gtk.Image.new_from_icon_name('user-home-symbolic',
                                                    Gtk.IconSize.SMALL_TOOLBAR)
            button.set_image(home_img)
        else:
            button.set_label(gutil.ellipse_text(name))

        if not Config.GTK_GE_312:
            button.set_size_request(32, -1)

        self.path_box.pack_start(button, False, False, 0)
        button.connect('clicked', self.on_button_clicked)
示例#3
0
    def append_button(self, abspath, name):
        button = Gtk.Button()
        button.abspath = abspath
        button.set_tooltip_text(name)

        if abspath == '/':
            home_img = Gtk.Image.new_from_icon_name('user-home-symbolic',
                                                    Gtk.IconSize.SMALL_TOOLBAR)
            button.set_image(home_img)
        else:
            button.set_label(gutil.ellipse_text(name))

        if not Config.GTK_GE_312:
            button.set_size_request(32, -1)

        self.path_box.pack_start(button, False, False, 0)
        button.connect('clicked', self.on_button_clicked)
示例#4
0
 def append_button(self, abspath, name):
     button = Gtk.Button.new_with_label(gutil.ellipse_text(name))
     button.abspath = abspath
     button.set_tooltip_text(name)
     self.pack_start(button, False, False, 0)
     button.connect('clicked', self.on_button_clicked)
示例#5
0
 def append_button(self, abspath, name):
     button = Gtk.Button.new_with_label(gutil.ellipse_text(name))
     button.abspath = abspath
     button.set_tooltip_text(name)
     self.pack_start(button, False, False, 0)
     button.connect('clicked', self.on_button_clicked)