xapp-icon-chooser-dialog: use XAppGtkWindow as a parent class,
make the default window size slightly taller to prevent a category
scroll bar under typical situations, remove the skip-taskbar hint
in the test script.
Michael Webster
5 years ago
36 | 36 |
|
37 | 37 |
struct _XAppIconChooserDialog
|
38 | 38 |
{
|
39 | |
GtkWindow parent_instance;
|
|
39 |
XAppGtkWindow parent_instance;
|
40 | 40 |
};
|
41 | 41 |
|
42 | 42 |
typedef struct
|
|
121 | 121 |
|
122 | 122 |
static guint signals[LAST_SIGNAL] = {0, };
|
123 | 123 |
|
124 | |
G_DEFINE_TYPE_WITH_PRIVATE (XAppIconChooserDialog, xapp_icon_chooser_dialog, GTK_TYPE_WINDOW)
|
|
124 |
G_DEFINE_TYPE_WITH_PRIVATE (XAppIconChooserDialog, xapp_icon_chooser_dialog, XAPP_TYPE_GTK_WINDOW)
|
125 | 125 |
|
126 | 126 |
static void on_category_selected (GtkListBox *list_box,
|
127 | 127 |
XAppIconChooserDialog *dialog);
|
|
262 | 262 |
g_signal_connect (priv->icon_store, "row-inserted",
|
263 | 263 |
G_CALLBACK (on_icon_store_icons_added), dialog);
|
264 | 264 |
|
265 | |
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 400);
|
|
265 |
gtk_window_set_default_size (GTK_WINDOW (dialog), 600, 450);
|
266 | 266 |
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dialog), TRUE);
|
267 | 267 |
gtk_window_set_type_hint (GTK_WINDOW (dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
|
268 | 268 |
|
3 | 3 |
#include <glib-object.h>
|
4 | 4 |
#include <gtk/gtk.h>
|
5 | 5 |
|
|
6 |
#include "xapp-gtk-window.h"
|
|
7 |
|
6 | 8 |
G_BEGIN_DECLS
|
7 | 9 |
|
8 | 10 |
#define XAPP_TYPE_ICON_CHOOSER_DIALOG (xapp_icon_chooser_dialog_get_type ())
|
9 | 11 |
|
10 | |
G_DECLARE_FINAL_TYPE (XAppIconChooserDialog, xapp_icon_chooser_dialog, XAPP, ICON_CHOOSER_DIALOG, GtkWindow)
|
|
12 |
G_DECLARE_FINAL_TYPE (XAppIconChooserDialog, xapp_icon_chooser_dialog, XAPP, ICON_CHOOSER_DIALOG, XAppGtkWindow)
|
11 | 13 |
|
12 | 14 |
typedef enum
|
13 | 15 |
{
|
6 | 6 |
from gi.repository import Gtk, XApp, Gdk
|
7 | 7 |
|
8 | 8 |
import argparse
|
|
9 |
import signal
|
|
10 |
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
9 | 11 |
|
10 | 12 |
if __name__ == '__main__':
|
11 | 13 |
parser = argparse.ArgumentParser()
|
|
26 | 28 |
args = parser.parse_args()
|
27 | 29 |
|
28 | 30 |
dialog = XApp.IconChooserDialog(allow_paths=args.paths)
|
|
31 |
dialog.set_skip_taskbar_hint(False)
|
29 | 32 |
if args.category:
|
30 | 33 |
response = dialog.run_with_category(args.category)
|
31 | 34 |
elif args.icon:
|