#include <gdk/gdkkeysyms.h>
-#include <gtk/gtk.h>
#include "gtkutil/dialog.h"
#include "gtkutil/closure.h"
#include "gtkutil/window.h"
#include "gtkdlgs.h"
-void Build_refreshMenu( GtkMenu* menu );
+void Build_refreshMenu( ui::Menu menu );
-void BSPCommandList_Construct( GtkListStore* store, Project& project ){
- gtk_list_store_clear( store );
+void BSPCommandList_Construct( ui::ListStore store, Project& project ){
+ store.clear();
for ( Project::iterator i = project.begin(); i != project.end(); ++i )
{
{
public:
Project& m_project;
-GtkListStore* m_store;
+ui::ListStore m_store{nullptr};
bool m_changed;
ProjectList( Project& project ) : m_project( project ), m_changed( false ){
}
Build* g_current_build = 0;
-gboolean project_selection_changed( GtkTreeSelection* selection, GtkListStore* store ){
+gboolean project_selection_changed( GtkTreeSelection* selection, ui::ListStore store ){
Project& project = g_build_project;
gtk_list_store_clear( store );
return FALSE;
}
-gboolean commands_cell_edited( GtkCellRendererText* cell, gchar* path_string, gchar* new_text, GtkListStore* store ){
+gboolean commands_cell_edited( GtkCellRendererText* cell, gchar* path_string, gchar* new_text, ui::ListStore store ){
if ( g_current_build == 0 ) {
return FALSE;
}
return FALSE;
}
-gboolean commands_key_press( ui::Widget widget, GdkEventKey* event, GtkListStore* store ){
+gboolean commands_key_press( ui::Widget widget, GdkEventKey* event, ui::ListStore store ){
if ( g_current_build == 0 ) {
return FALSE;
}
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( scr ) );
{
- GtkListStore* store = gtk_list_store_new( 1, G_TYPE_STRING );
+ auto store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
ui::Widget view = ui::TreeView( ui::TreeModel(GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
- gtk_widget_show( view );
+ view.show();
buildView = view;
projectList.m_store = store;
gtk_container_add( GTK_CONTAINER( frame ), GTK_WIDGET( scr ) );
{
- GtkListStore* store = gtk_list_store_new( 1, G_TYPE_STRING );
+ ui::ListStore store = ui::ListStore(gtk_list_store_new( 1, G_TYPE_STRING ));
ui::Widget view = ui::TreeView(ui::TreeModel( GTK_TREE_MODEL( store ) ));
gtk_tree_view_set_headers_visible( GTK_TREE_VIEW( view ), FALSE );
GtkTreeSelection* selection = gtk_tree_view_get_selection( GTK_TREE_VIEW( view ) );
gtk_tree_selection_set_mode( selection, GTK_SELECTION_BROWSE );
- gtk_widget_show( view );
+ view.show();
gtk_container_add( GTK_CONTAINER( scr ), view );
BuildMenuItems g_BuildMenuItems;
-GtkMenu* g_bsp_menu;
+ui::Menu g_bsp_menu{nullptr};
-void Build_constructMenu( GtkMenu* menu ){
+void Build_constructMenu( ui::Menu menu ){
for ( Project::iterator i = g_build_project.begin(); i != g_build_project.end(); ++i )
{
g_BuildMenuItems.push_back( BuildMenuItem( ( *i ).first.c_str(), 0 ) );
}
-void Build_refreshMenu( GtkMenu* menu ){
+void Build_refreshMenu( ui::Menu menu ){
for ( BuildMenuItems::iterator i = g_BuildMenuItems.begin(); i != g_BuildMenuItems.end(); ++i )
{
- gtk_container_remove( GTK_CONTAINER( menu ), GTK_WIDGET( ( *i ).m_item ) );
+ gtk_container_remove( menu, GTK_WIDGET( ( *i ).m_item ) );
}
g_BuildMenuItems.clear();