parent
							
								
									c8b31dffbb
								
							
						
					
					
						commit
						52e09cf526
					
				
					 3 changed files with 10 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -182,8 +182,8 @@ class GajimApplication(Gtk.Application):
 | 
			
		|||
 | 
			
		||||
        # Set Application Menu
 | 
			
		||||
        app.app = self
 | 
			
		||||
        from gajim import gtkgui_helpers
 | 
			
		||||
        builder = gtkgui_helpers.get_gtk_builder('application_menu.ui')
 | 
			
		||||
        from gajim.gtk.util import get_builder
 | 
			
		||||
        builder = get_builder('application_menu.ui')
 | 
			
		||||
        menubar = builder.get_object("menubar")
 | 
			
		||||
        appmenu = builder.get_object("appmenu")
 | 
			
		||||
        if app.prefers_app_menu():
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -68,7 +68,10 @@ def get_builder(file_name, widget=None):
 | 
			
		|||
        if widget is not None:
 | 
			
		||||
            builder.add_objects_from_string(xml_text, [widget])
 | 
			
		||||
        else:
 | 
			
		||||
            builder.add_from_string(xml_text)
 | 
			
		||||
            # Workaround
 | 
			
		||||
            # https://gitlab.gnome.org/GNOME/pygobject/issues/255
 | 
			
		||||
            Gtk.Builder.__mro__[1].add_from_string(
 | 
			
		||||
                builder, xml_text, len(xml_text.encode("utf-8")))
 | 
			
		||||
    else:
 | 
			
		||||
        if widget is not None:
 | 
			
		||||
            builder.add_objects_from_file(file_path, [widget])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -140,7 +140,10 @@ def get_gtk_builder(file_name, widget=None):
 | 
			
		|||
        if widget is not None:
 | 
			
		||||
            builder.add_objects_from_string(xml_text, [widget])
 | 
			
		||||
        else:
 | 
			
		||||
            builder.add_from_string(xml_text)
 | 
			
		||||
            # Workaround
 | 
			
		||||
            # https://gitlab.gnome.org/GNOME/pygobject/issues/255
 | 
			
		||||
            Gtk.Builder.__mro__[1].add_from_string(
 | 
			
		||||
                builder, xml_text, len(xml_text.encode("utf-8")))
 | 
			
		||||
    else:
 | 
			
		||||
        if widget is not None:
 | 
			
		||||
            builder.add_objects_from_file(file_path, [widget])
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue