Compare commits
No commits in common. "59af3b7e7b9f73de9ff80ae91cd42085b26d840d" and "8fdf9e2bc3433932878c9f6a15ea411f9a2b0f61" have entirely different histories.
59af3b7e7b
...
8fdf9e2bc3
@ -53,29 +53,16 @@ fiv_sidebar_dispose(GObject *gobject)
|
|||||||
G_OBJECT_CLASS(fiv_sidebar_parent_class)->dispose(gobject);
|
G_OBJECT_CLASS(fiv_sidebar_parent_class)->dispose(gobject);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
fiv_sidebar_realize(GtkWidget *widget)
|
|
||||||
{
|
|
||||||
GTK_WIDGET_CLASS(fiv_sidebar_parent_class)->realize(widget);
|
|
||||||
|
|
||||||
// Fucking GTK+. With no bookmarks, the revealer takes up space anyway.
|
|
||||||
FivSidebar *self = FIV_SIDEBAR(widget);
|
|
||||||
gtk_places_sidebar_set_drop_targets_visible(self->places, TRUE, NULL);
|
|
||||||
gtk_places_sidebar_set_drop_targets_visible(self->places, FALSE, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fiv_sidebar_class_init(FivSidebarClass *klass)
|
fiv_sidebar_class_init(FivSidebarClass *klass)
|
||||||
{
|
{
|
||||||
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
GObjectClass *object_class = G_OBJECT_CLASS(klass);
|
||||||
object_class->dispose = fiv_sidebar_dispose;
|
object_class->dispose = fiv_sidebar_dispose;
|
||||||
|
|
||||||
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
|
|
||||||
widget_class->realize = fiv_sidebar_realize;
|
|
||||||
|
|
||||||
// You're giving me no choice, Adwaita.
|
// You're giving me no choice, Adwaita.
|
||||||
// Your style is hardcoded to match against the class' CSS name.
|
// Your style is hardcoded to match against the class' CSS name.
|
||||||
// And I need replicate the internal widget structure.
|
// And I need replicate the internal widget structure.
|
||||||
|
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass);
|
||||||
gtk_widget_class_set_css_name(widget_class, "placessidebar");
|
gtk_widget_class_set_css_name(widget_class, "placessidebar");
|
||||||
|
|
||||||
// TODO(p): Consider a return value, and using it.
|
// TODO(p): Consider a return value, and using it.
|
||||||
@ -133,20 +120,6 @@ on_breadcrumb_drag_data_get(G_GNUC_UNUSED GtkWidget *widget,
|
|||||||
g_free(*uris);
|
g_free(*uris);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
|
||||||
on_breadcrumb_drag_begin(G_GNUC_UNUSED GtkWidget *widget,
|
|
||||||
GdkDragContext *context, gpointer user_data)
|
|
||||||
{
|
|
||||||
gtk_places_sidebar_set_drop_targets_visible(user_data, TRUE, context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void
|
|
||||||
on_breadcrumb_drag_end(G_GNUC_UNUSED GtkWidget *widget,
|
|
||||||
GdkDragContext *context, gpointer user_data)
|
|
||||||
{
|
|
||||||
gtk_places_sidebar_set_drop_targets_visible(user_data, FALSE, context);
|
|
||||||
}
|
|
||||||
|
|
||||||
static GtkWidget *
|
static GtkWidget *
|
||||||
create_row(FivSidebar *self, GFile *file, const char *icon_name)
|
create_row(FivSidebar *self, GFile *file, const char *icon_name)
|
||||||
{
|
{
|
||||||
@ -205,10 +178,6 @@ create_row(FivSidebar *self, GFile *file, const char *icon_name)
|
|||||||
G_CALLBACK(on_breadcrumb_release), row);
|
G_CALLBACK(on_breadcrumb_release), row);
|
||||||
g_signal_connect(revealer, "drag-data-get",
|
g_signal_connect(revealer, "drag-data-get",
|
||||||
G_CALLBACK(on_breadcrumb_drag_data_get), row);
|
G_CALLBACK(on_breadcrumb_drag_data_get), row);
|
||||||
g_signal_connect(revealer, "drag-begin",
|
|
||||||
G_CALLBACK(on_breadcrumb_drag_begin), self->places);
|
|
||||||
g_signal_connect(revealer, "drag-end",
|
|
||||||
G_CALLBACK(on_breadcrumb_drag_end), self->places);
|
|
||||||
|
|
||||||
gtk_container_add(GTK_CONTAINER(row), revealer);
|
gtk_container_add(GTK_CONTAINER(row), revealer);
|
||||||
gtk_widget_show_all(row);
|
gtk_widget_show_all(row);
|
||||||
|
@ -83,7 +83,7 @@ if gdkpixbuf.found()
|
|||||||
dependencies : [dependencies, gdkpixbuf])
|
dependencies : [dependencies, gdkpixbuf])
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# XXX: With gdk-pixbuf, this even depends on currently installed modules.
|
# XXX: With gdk-pixbuf, this even dependens on currently installed modules.
|
||||||
if meson.is_cross_build()
|
if meson.is_cross_build()
|
||||||
install_data('fiv.desktop',
|
install_data('fiv.desktop',
|
||||||
install_dir : get_option('datadir') + '/applications')
|
install_dir : get_option('datadir') + '/applications')
|
||||||
@ -93,7 +93,7 @@ else
|
|||||||
output : 'fiv.desktop',
|
output : 'fiv.desktop',
|
||||||
input : 'fiv.desktop',
|
input : 'fiv.desktop',
|
||||||
command : ['sh', '-c', '''awk '/^MimeType=/ { $0 = "MimeType=";
|
command : ['sh', '-c', '''awk '/^MimeType=/ { $0 = "MimeType=";
|
||||||
while (((exe " --list-supported-media-types") | getline type) > 0)
|
while ((exe " --list-supported-media-types" | getline type) > 0)
|
||||||
$0 = $0 type ";" } 1' "exe=$1" "$2"''', 'sh', exe, '@INPUT@'],
|
$0 = $0 type ";" } 1' "exe=$1" "$2"''', 'sh', exe, '@INPUT@'],
|
||||||
capture : true,
|
capture : true,
|
||||||
install : true,
|
install : true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user