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)

New patch for gtk3 +quartz

  • demos/icon-browser/iconbrowserwin.c

    old new  
    301301  return gtk_search_bar_handle_event (GTK_SEARCH_BAR (win->searchbar), event);
    302302}
    303303
    304 static void
    305 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 
    314304static gboolean
    315305icon_visible_func (GtkTreeModel *model,
    316306                   GtkTreeIter  *iter,
     
    528518  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), selected_context_changed);
    529519  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (class), symbolic_toggled);
    530520  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);
    532521}
    533522
    534523IconBrowserWindow *
  • demos/icon-browser/window.ui

    old new  
    340340            </child>
    341341          </object>
    342342        </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>
    353343        <child>
    354344          <object class="GtkLabel" id="description">
    355345            <property name="margin">10</property>