[problem help] Python appindicator label
Tofloor
poster avatar
DeepDIVE
deepin
2024-04-14 20:13
Author

I have a python script using gi-repository app indicator to display text as indicator label and icon alongside. Script works on xfce panel, gnome dash to dock panel and unity dock. In dde-dock only icon shows. Is there a way to set text as indicator label?

Reply Favorite View the author
All Replies
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2024-04-15 11:54
#1

excuse,

Can you take a screenshot and compare it?

Reply View the author
DeepDIVE
deepin
2024-04-15 18:22
#2
把一切操作变成GUI

excuse,

Can you take a screenshot and compare it?

sorry for not providing screenshots.this image on gnome

Screenshot_select-area_20240415191751.png

and this image is on dde-dock
Screenshot_dde-dock_20240415190614.png

Reply View the author
DeepDIVE
deepin
2024-04-15 18:28
#3

@berners my python code is as follows. only indicatror part

def set_date_label(self):
        self.indicator.set_label(self.nep_date.get_today_bs_label(True), "")
        return True

    def main(self):
        self.nep_date = NepaliDateConverter()
        self.indicator.set_label(self.nep_date.get_today_bs_label(True), "")
        GObject.timeout_add_seconds(300, self.set_date_label)
        self.menu.append(self.to_bs_menu)
        self.menu.append(self.to_ad_menu)
        self.menu.append(self.quit_item)
        Gtk.main()

and full code is here

Reply View the author
a***[email protected]
deepin
2024-04-17 21:52
#4
It has been deleted!