Codebase list virt-viewer / d451d6e
Add Change CD button to toolbar Signed-off-by: Eduardo Lima (Etrunko) <etrunko@redhat.com> Eduardo Lima (Etrunko) 2 years ago
3 changed file(s) with 46 addition(s) and 7 deletion(s). Raw diff Collapse all Expand all
361361 RemoteViewer *self = REMOTE_VIEWER(gtkapp);
362362 VirtViewerWindow *win = g_object_get_data(G_OBJECT(gtkwin), "virt-viewer-window");
363363 GtkBuilder *builder = virt_viewer_window_get_builder(win);
364 GtkWidget *menu = GTK_WIDGET(gtk_builder_get_object(builder, "menu-change-cd"));
365 gtk_widget_set_visible(menu, self->ovirt_foreign_menu != NULL);
364 GtkWidget *button = GTK_WIDGET(gtk_builder_get_object(builder, "toolbar-cd"));
365 gtk_widget_set_visible(button, self->ovirt_foreign_menu != NULL);
366 button = GTK_WIDGET(gtk_builder_get_object(builder, "header-cd"));
367 gtk_widget_set_visible(button, self->ovirt_foreign_menu != NULL);
366368 }
367369
368370 static void
7373 </packing>
7474 </child>
7575 <child>
76 <object class="GtkButton" id="toolbar-cd">
77 <property name="can-focus">True</property>
78 <property name="receives-default">True</property>
79 <property name="tooltip-text" translatable="yes">Change CD</property>
80 <property name="action-name">win.change-cd</property>
81 <child>
82 <object class="GtkImage">
83 <property name="visible">True</property>
84 <property name="can-focus">False</property>
85 <property name="icon-name">drive-optical-symbolic</property>
86 </object>
87 </child>
88 </object>
89 <packing>
90 <property name="position">3</property>
91 </packing>
92 </child>
93 <child>
7694 <object class="GtkMenuButton" id="toolbar-machine">
7795 <property name="visible">True</property>
7896 <property name="can-focus">True</property>
87105 </child>
88106 </object>
89107 <packing>
90 <property name="position">3</property>
108 <property name="position">4</property>
91109 </packing>
92110 </child>
93111 <child>
106124 </object>
107125 <packing>
108126 <property name="pack-type">end</property>
109 <property name="position">4</property>
127 <property name="position">5</property>
110128 </packing>
111129 </child>
112130 </object>
174192 </packing>
175193 </child>
176194 <child>
195 <object class="GtkButton" id="header-cd">
196 <property name="can-focus">True</property>
197 <property name="receives-default">True</property>
198 <property name="tooltip-text" translatable="yes">Change CD</property>
199 <property name="action-name">win.change-cd</property>
200 <child>
201 <object class="GtkImage">
202 <property name="visible">True</property>
203 <property name="can-focus">False</property>
204 <property name="icon-name">drive-optical-symbolic</property>
205 </object>
206 </child>
207 </object>
208 <packing>
209 <property name="position">3</property>
210 </packing>
211 </child>
212 <child>
177213 <object class="GtkMenuButton" id="header-machine">
178214 <property name="visible">True</property>
179215 <property name="can-focus">True</property>
187223 </child>
188224 </object>
189225 <packing>
190 <property name="position">3</property>
226 <property name="position">4</property>
191227 </packing>
192228 </child>
193229 <child>
206242 </object>
207243 <packing>
208244 <property name="pack-type">end</property>
209 <property name="position">4</property>
245 <property name="position">5</property>
210246 </packing>
211247 </child>
212248 </object>
159159 */
160160
161161 gtk_container_add(GTK_CONTAINER(self), self->revealer);
162 gtk_widget_show(self->revealer);
162163 gtk_widget_set_halign(GTK_WIDGET(self), GTK_ALIGN_CENTER);
163164 gtk_widget_set_valign(GTK_WIDGET(self), GTK_ALIGN_START);
164 gtk_widget_show_all(GTK_WIDGET(self));
165 gtk_widget_show(GTK_WIDGET(self));
165166
166167 g_signal_connect(self,
167168 "grab-notify",