static void panel_struts_get_monitor_geometry (GdkScreen *screen, int monitor, int *x, int *y, int *width, int *height) { *x = panel_multiscreen_x (screen, monitor); *y = panel_multiscreen_y (screen, monitor); *width = panel_multiscreen_width (screen, monitor); *height = panel_multiscreen_height (screen, monitor); }
static void panel_run_dialog_setup_entry (PanelRunDialog *dialog, GtkBuilder *gui) { GdkScreen *screen; int width_request; GtkWidget *entry; dialog->combobox = PANEL_GTK_BUILDER_GET (gui, "comboboxentry"); entry = gtk_bin_get_child (GTK_BIN (dialog->combobox)); gtk_entry_set_activates_default (GTK_ENTRY (entry), TRUE); gtk_combo_box_set_model (GTK_COMBO_BOX (dialog->combobox), _panel_run_get_recent_programs_list (dialog)); gtk_combo_box_set_entry_text_column (GTK_COMBO_BOX (dialog->combobox), 0); screen = gtk_window_get_screen (GTK_WINDOW (dialog->run_dialog)); /* 1/4 the width of the first monitor should be a good value */ width_request = panel_multiscreen_width (screen, 0) / 4; g_object_set (G_OBJECT (dialog->combobox), "width_request", width_request, NULL); g_signal_connect (entry, "key-press-event", G_CALLBACK (entry_event), dialog); dialog->changed_id = g_signal_connect (dialog->combobox, "changed", G_CALLBACK (combobox_changed), dialog); gtk_drag_dest_unset (dialog->combobox); gtk_drag_dest_set (dialog->combobox, GTK_DEST_DEFAULT_MOTION|GTK_DEST_DEFAULT_HIGHLIGHT, NULL, 0, GDK_ACTION_COPY); gtk_drag_dest_add_uri_targets (dialog->combobox); g_signal_connect (dialog->combobox, "drag_data_received", G_CALLBACK (entry_drag_data_received), dialog); }