Ticket #55275: patch-browser-demo-revert-add-copy-to-clipboard-button.diff
File patch-browser-demo-revert-add-copy-to-clipboard-button.diff, 1.8 KB (added by mojca (Mojca Miklavec), 7 years ago) |
---|
-
demos/icon-browser/iconbrowserwin.c
old new 301 301 return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar), event); 302 302 } 303 303 304 static void305 copy_to_clipboard (GtkButton *button,306 IconBrowserWindow *win)307 {308 GtkClipboard *clipboard;309 310 clipboard = gtk_clipboard_get_default (gdk_display_get_default ());311 gtk_clipboard_set_text (clipboard, gtk_window_get_title (GTK_WINDOW (win->details)), -1);312 }313 314 304 static gboolean 315 305 icon_visible_func (GtkTreeModel *model, 316 306 GtkTreeIter *iter, … … 528 518 gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed); 529 519 gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled); 530 520 gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), key_press_event_cb); 531 gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), copy_to_clipboard);532 521 } 533 522 534 523 IconBrowserWindow * -
demos/icon-browser/window.ui
old new 340 340 </child> 341 341 </object> 342 342 </child> 343 <child>344 <object class="GtkButton">345 <property name="visible">True</property>346 <property name="label" translatable="yes">Copy to Clipboard</property>347 <property name="halign">center</property>348 <property name="valign">center</property>349 <property name="margin">20</property>350 <signal name="clicked" handler="copy_to_clipboard"/>351 </object>352 </child>353 343 <child> 354 344 <object class="GtkLabel" id="description"> 355 345 <property name="margin">10</property>