Subversion Repositories basico

Rev

Rev 272 | Rev 278 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 272 Rev 277
Line 33... Line 33...
33
        # ~ tool.connect('toggled', self.srvclb.gui_toggle_menu_view)
33
        # ~ tool.connect('toggled', self.srvclb.gui_toggle_menu_view)
34
        # ~ tool.set_active(False)
34
        # ~ tool.set_active(False)
35
        # ~ tool.set_hexpand(False)
35
        # ~ tool.set_hexpand(False)
36
        # ~ self.tool_bar.insert(tool, -1)
36
        # ~ self.tool_bar.insert(tool, -1)
37
37
38
        # View combobox button/popover
-
 
39
        tool = Gtk.ToolItem.new()
-
 
40
        lhbox = Gtk.HBox()
-
 
41
        menuviews = self.srvgui.add_widget('gtk_button_menu_views', Gtk.Button())
-
 
42
        hbox = Gtk.HBox()
-
 
43
        label = self.srvgui.add_widget('gtk_label_current_view', Gtk.Label())
-
 
44
        label.set_xalign(0.0)
-
 
45
        image = self.srvgui.add_widget('gtk_image_current_view', Gtk.Image())
-
 
46
        hbox.pack_start(image, False, False, 3)
-
 
47
        hbox.pack_start(label, True, True, 3)
-
 
48
        menuviews.add(hbox)
-
 
49
        lhbox.pack_start(menuviews, True, True, 3)
-
 
50
        lhbox.show_all()
-
 
51
        tool.add(lhbox)
-
 
52
        tool.set_tooltip_markup('<b>Choose another view</b>')
-
 
53
        tool.set_expand(False)
-
 
54
        self.tool_bar.insert(tool, -1)
-
 
55
-
 
56
        ### Popover menuviews
-
 
57
        popover = self.srvgui.add_widget('gtk_popover_button_menu_views', Gtk.Popover.new(menuviews))
-
 
58
        menuviews.connect('clicked', self.srvclb.gui_show_popover, popover)
-
 
59
        box = Gtk.Box(spacing = 0, orientation="vertical")
-
 
60
        popover.add(box)
-
 
61
-
 
62
-
 
63
        # ~ box.pack_start(self.srvuif.create_menuview_button('annotation'), False, False, 0)
-
 
64
        box.pack_start(self.srvuif.create_menuview_button('collection'), False, False, 0)
-
 
65
        separator = Gtk.Separator(orientation = Gtk.Orientation.HORIZONTAL)
-
 
66
        box.pack_start(separator, False, False, 0)
-
 
67
        box.pack_start(self.srvuif.create_menuview_button('component'), False, False, 0)
-
 
68
        box.pack_start(self.srvuif.create_menuview_button('description'), False, False, 0)
-
 
69
        box.pack_start(self.srvuif.create_menuview_button('bookmarks'), False, False, 0)
-
 
70
        box.pack_start(self.srvuif.create_menuview_button('category'), False, False, 0)
-
 
71
        box.pack_start(self.srvuif.create_menuview_button('chronologic'), False, False, 0)
-
 
72
        box.pack_start(self.srvuif.create_menuview_button('priority'), False, False, 0)
-
 
73
        box.pack_start(self.srvuif.create_menuview_button('type'), False, False, 0)
-
 
74
38
75
        # Import button
39
        # Import button
76
        tool = Gtk.ToolButton()
40
        tool = Gtk.ToolButton()
77
        tool.set_icon_name('basico-add')
41
        tool.set_icon_name('basico-add')
78
        tool.set_tooltip_markup('<b>Download or find SAP Notes (if they were already downloaded)</b>')
42
        tool.set_tooltip_markup('<b>Download or find SAP Notes (if they were already downloaded)</b>')
Line 149... Line 113...
149
        # ~ Separator
113
        # ~ Separator
150
        tool = Gtk.SeparatorToolItem.new()
114
        tool = Gtk.SeparatorToolItem.new()
151
        tool.set_draw(False)
115
        tool.set_draw(False)
152
        tool.set_expand(True)
116
        tool.set_expand(True)
153
        self.tool_bar.insert(tool, -1)
117
        self.tool_bar.insert(tool, -1)
-
 
118
-
 
119
        # View combobox button/popover
-
 
120
        tool = Gtk.ToolItem.new()
-
 
121
        lhbox = Gtk.HBox()
-
 
122
        menuviews = self.srvgui.add_widget('gtk_button_menu_views', Gtk.Button())
-
 
123
        menuviews.set_relief(Gtk.ReliefStyle.NONE)
-
 
124
        hbox = Gtk.HBox()
-
 
125
        label = self.srvgui.add_widget('gtk_label_current_view', Gtk.Label())
-
 
126
        label.set_xalign(0.0)
-
 
127
        image = self.srvgui.add_widget('gtk_image_current_view', Gtk.Image())
-
 
128
        hbox.pack_start(image, False, False, 3)
-
 
129
        hbox.pack_start(label, True, True, 3)
-
 
130
        menuviews.add(hbox)
-
 
131
        lhbox.pack_start(menuviews, True, True, 3)
-
 
132
        lhbox.show_all()
-
 
133
        tool.add(lhbox)
-
 
134
        tool.set_tooltip_markup('<b>Choose another view</b>')
-
 
135
        tool.set_expand(False)
-
 
136
        self.tool_bar.insert(tool, -1)
-
 
137
-
 
138
        ### Popover menuviews
-
 
139
        popover = self.srvgui.add_widget('gtk_popover_button_menu_views', Gtk.Popover.new(menuviews))
-
 
140
        menuviews.connect('clicked', self.srvclb.gui_show_popover, popover)
-
 
141
        box = Gtk.Box(spacing = 0, orientation="vertical")
-
 
142
        popover.add(box)
-
 
143
-
 
144
        box.pack_start(self.srvuif.create_menuview_button('collection'), False, False, 0)
-
 
145
        separator = Gtk.Separator(orientation = Gtk.Orientation.HORIZONTAL)
-
 
146
        box.pack_start(separator, False, False, 0)
-
 
147
        box.pack_start(self.srvuif.create_menuview_button('component'), False, False, 0)
-
 
148
        box.pack_start(self.srvuif.create_menuview_button('description'), False, False, 0)
-
 
149
        box.pack_start(self.srvuif.create_menuview_button('bookmarks'), False, False, 0)
-
 
150
        box.pack_start(self.srvuif.create_menuview_button('category'), False, False, 0)
-
 
151
        box.pack_start(self.srvuif.create_menuview_button('chronologic'), False, False, 0)
-
 
152
        box.pack_start(self.srvuif.create_menuview_button('priority'), False, False, 0)
-
 
153
        box.pack_start(self.srvuif.create_menuview_button('type'), False, False, 0)
154
154
155
        # Button Total SAP Notes
155
        # Button Total SAP Notes
156
        tool = Gtk.ToolItem()
156
        tool = Gtk.ToolItem()
157
        tool.set_expand(False)
157
        tool.set_expand(False)
158
        label = self.srvgui.add_widget('gtk_label_total_notes', Gtk.Label())
158
        label = self.srvgui.add_widget('gtk_label_total_notes', Gtk.Label())
159
        hbox = Gtk.HBox()
159
        hbox = Gtk.HBox()
160
        hbox.pack_start(label, False, False, 0)
160
        hbox.pack_start(label, False, False, 0)
161
        tool.add(hbox)
161
        tool.add(hbox)
162
        self.tool_bar.insert(tool, -1)
162
        self.tool_bar.insert(tool, -1)
163
        # ~ button = self.srvgui.add_widget('gtk_button_total_notes', Gtk.Button())
-
 
164
        # ~ button.set_relief(Gtk.ReliefStyle.NONE)
-
 
165
        # ~ popover = self.srvgui.add_widget('gtk_popover_button_total_notes', Gtk.Popover.new(button)
-
 
166
        # ~ button.add(hbox)
-
 
167
        # ~ button.connect('clicked', self.srvclb.gui_show_popover, popover)
-
 
168
        ## Popover body
-
 
169
        # ~ box = self.build_popover(popover)
-
 
170
        # ~ popover.add(box)
-
 
-
 
163
171
164
172
        # Fullscreen toggle button
165
        # Fullscreen toggle button
173
        tool = Gtk.ToolItem()
166
        tool = Gtk.ToolItem()
174
        tool.set_expand(False)
167
        tool.set_expand(False)
175
        icon = self.srvicm.get_new_image_icon('basico-fullscreen', 24, 24)
168
        icon = self.srvicm.get_new_image_icon('basico-fullscreen', 24, 24)
Line 203... Line 196...
203
        model = completion.get_model()
196
        model = completion.get_model()
204
        text = model.get_value(iter, 0)
197
        text = model.get_value(iter, 0)
205
        if key.upper() in text.upper():
198
        if key.upper() in text.upper():
206
            return True
199
            return True
207
        return False
200
        return False
208
-
 
209
201
210
202
211
    def build_popover(self, popover):
203
    def build_popover(self, popover):
212
        box = Gtk.Box(spacing = 3, orientation="vertical")
204
        box = Gtk.Box(spacing = 3, orientation="vertical")
213
        sid = '0000000000'
205
        sid = '0000000000'