Skip to content

Commit

Permalink
code clean
Browse files Browse the repository at this point in the history
  • Loading branch information
KeithDHedger committed Mar 26, 2016
1 parent 5016d68 commit 72f0d14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 33 deletions.
2 changes: 0 additions & 2 deletions gtk-kkedit/KKEdit/src/callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,6 @@ void setSensitive(void)
if(sessionBusy==true)
return;


gtk_widget_set_sensitive((GtkWidget*)goBackMenu,history->canGoBack());
text=gtk_label_get_text((GtkLabel*)page->tabName);
#ifdef _BUGGED_
Expand All @@ -536,7 +535,6 @@ void setSensitive(void)
#endif
gtk_widget_set_sensitive((GtkWidget*)saveMenu,gtk_text_buffer_get_modified(GTK_TEXT_BUFFER(page->buffer)));
gtk_widget_set_sensitive((GtkWidget*)goBackMenu,history->canGoBack());
//gtk_text_buffer_set_modified(GTK_TEXT_BUFFER(page->buffer),FALSE);

//tab
if(text[0]=='*')
Expand Down
31 changes: 0 additions & 31 deletions gtk-kkedit/KKEdit/src/guis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1478,11 +1478,8 @@ void buildMainGui(void)
mainRightUserVBox=creatNewBox(NEWVBOX,false,0);
mainBottomUserVBox=creatNewBox(NEWVBOX,false,0);
// mainWindowHBox=gtk_hbox_new(false,0);
mainWindowHBox=creatNewBox(NEWHBOX,false,0);
// mainWindowHPane=gtk_hpaned_new();
// secondWindowHPane=gtk_hpaned_new();
#ifdef _USEGTK3_
mainWindowHPane=gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
secondWindowHPane=gtk_paned_new(GTK_ORIENTATION_HORIZONTAL);
Expand All @@ -1508,7 +1505,6 @@ void buildMainGui(void)
g_signal_connect(G_OBJECT(mainNotebook),"page-reordered",G_CALLBACK(switchPage),NULL);
menuBar=gtk_menu_bar_new();
//toolBarBox=gtk_hbox_new(true,0);
toolBarBox=creatNewBox(NEWHBOX,true,0);
toolBar=(GtkToolbar*)gtk_toolbar_new();
Expand Down Expand Up @@ -1779,7 +1775,6 @@ void buildMainGui(void)
gtk_menu_shell_append(GTK_MENU_SHELL(menuBar),helpMenu);
//tooloutputwindow
//mainVPane=gtk_vpaned_new();
#ifdef _USEGTK3_
mainVPane=gtk_paned_new(GTK_ORIENTATION_VERTICAL);
#else
Expand All @@ -1788,7 +1783,6 @@ void buildMainGui(void)
gtk_container_set_border_width(GTK_CONTAINER(mainVPane),0);
gtk_paned_add1(GTK_PANED(mainVPane),mainNotebookVBox);
//toolOutVBox=gtk_vbox_new(false,0);
toolOutVBox=creatNewBox(NEWVBOX,false,0);
gtk_paned_add2(GTK_PANED(mainVPane),toolOutVBox);
Expand All @@ -1798,10 +1792,7 @@ void buildMainGui(void)
toolOutputView=gtk_text_view_new_with_buffer(toolOutputBuffer);
gtk_container_add(GTK_CONTAINER(mainWindowScrollbox),(GtkWidget*)toolOutputView);
// gtk_box_pack_start ((GtkBox*)mainWindowScrollbox,toolOutputView,true,true,10);
// gtk_container_add(GTK_CONTAINER(mainWindowScrollbox),(GtkWidget*)toolOutputView);
gtk_box_pack_start((GtkBox*)toolOutVBox,mainWindowScrollbox,true,true,0);
// gtk_container_add(GTK_CONTAINER(toolOutVBox),(GtkWidget*)mainWindowScrollbox);
//add main vbox to mainWindow
gtk_container_add((GtkContainer*)mainWindow,mainWindowVBox);
Expand All @@ -1823,8 +1814,6 @@ void buildMainGui(void)
gtk_paned_pack2((GtkPaned*)secondWindowHPane,mainRightUserVBox,false,true);
//vpanes top and bottom
//mainWindowVPane=gtk_vpaned_new();
//secondWindowVPane=gtk_vpaned_new();
#ifdef _USEGTK3_
mainWindowVPane=gtk_paned_new(GTK_ORIENTATION_VERTICAL);
secondWindowVPane=gtk_paned_new(GTK_ORIENTATION_VERTICAL);
Expand Down Expand Up @@ -1912,16 +1901,13 @@ void buildFindReplace(void)
content_area=gtk_dialog_get_content_area(GTK_DIALOG(findReplaceDialog));
gtk_dialog_set_default_response((GtkDialog*)findReplaceDialog,FINDNEXT);
//vbox=gtk_vbox_new(true,0);
vbox=creatNewBox(NEWVBOX,true,0);
//hbox=gtk_hbox_new(false,0);
hbox=creatNewBox(NEWHBOX,false,0);
label=gtk_label_new(gettext("Find"));
gtk_container_add(GTK_CONTAINER(content_area),label);
gtk_widget_show(label);
findDropBox=gtk_combo_box_text_new_with_entry();
findBox=gtk_bin_get_child((GtkBin*)findDropBox);
gtk_entry_set_activates_default((GtkEntry*)findBox,true);
Expand Down Expand Up @@ -1956,7 +1942,6 @@ void buildFindReplace(void)
gtk_box_pack_start(GTK_BOX(vbox),hbox,true,true,0);
gtk_widget_show_all(vbox);
//line2
//hbox=gtk_hbox_new(false,0);
hbox=creatNewBox(NEWHBOX,false,0);
item=gtk_check_button_new_with_label(gettext("Wrap"));
Expand Down Expand Up @@ -2019,9 +2004,7 @@ void buildWordCheck(int documentCheck)
spellCheckWord=gtk_dialog_new();
gtk_window_set_title((GtkWindow*)spellCheckWord,gettext("Spell check word"));
//vbox=gtk_vbox_new(false,0);
vbox=creatNewBox(NEWVBOX,false,0);
//hbox=gtk_hbox_new(true,0);
hbox=creatNewBox(NEWHBOX,true,0);
sprintf((char*)&labeltext,gettext("Change <i><b>%s</b></i> to: "),badWord);
Expand All @@ -2040,9 +2023,7 @@ void buildWordCheck(int documentCheck)
gtk_box_pack_start(GTK_BOX(vbox),gtk_hseparator_new(),true,true,8);
#endif
//hbox=gtk_hbox_new(true,0);
hbox=creatNewBox(NEWHBOX,true,0);
//button=gtk_button_new_from_stock(GTK_STOCK_APPLY);
button=createNewStockButton(GTK_STOCK_APPLY,GTK_STOCK_APPLY);
gtk_box_pack_start(GTK_BOX(hbox),button,true,true,0);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(doChangeWord),(gpointer)(long)docflag);
Expand All @@ -2053,12 +2034,10 @@ void buildWordCheck(int documentCheck)
gtk_box_pack_start(GTK_BOX(hbox),button,true,true,0);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(doAddIgnoreWord),(gpointer)1);
//button=gtk_button_new_from_stock(GTK_STOCK_ADD);
button=createNewStockButton(GTK_STOCK_ADD,gettext("_Add"));
gtk_box_pack_start(GTK_BOX(hbox),button,true,true,0);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(doAddIgnoreWord),(gpointer)2);
//button=gtk_button_new_from_stock(GTK_STOCK_CANCEL);
button=createNewStockButton(GTK_STOCK_CANCEL,GTK_STOCK_CANCEL);
gtk_box_pack_start(GTK_BOX(hbox),button,true,true,0);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(doCancelCheck),NULL);
Expand Down Expand Up @@ -2129,9 +2108,7 @@ void buildGtkDocViewer(void)
if(docWindowX!=-1 && docWindowY!=-1)
gtk_window_move((GtkWindow *)docView,docWindowX,docWindowY);
//vbox=gtk_vbox_new(false,0);
vbox=creatNewBox(NEWVBOX,false,0);
//hbox=gtk_hbox_new(false,4);
hbox=creatNewBox(NEWHBOX,false,4);
webView=WEBKIT_WEB_VIEW(webkit_web_view_new());
Expand All @@ -2149,19 +2126,15 @@ void buildGtkDocViewer(void)
gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolledWindow),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC);
gtk_container_add(GTK_CONTAINER(scrolledWindow),GTK_WIDGET(webView));
// gtk_container_add(GTK_CONTAINER(vbox),scrolledWindow);
// gtk_container_add(GTK_CONTAINER(vbox),scrolledWindow);
gtk_box_pack_start((GtkBox*)vbox,scrolledWindow,true,true,0);
//button=gtk_button_new_from_stock(GTK_STOCK_GO_BACK);
button=createNewStockButton(GTK_STOCK_GO_BACK,GTK_STOCK_GO_BACK3);
gtk_box_pack_start(GTK_BOX(hbox),button,false,false,4);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(webKitGoBack),(void*)webView);
//spacer
gtk_box_pack_start(GTK_BOX(hbox),gtk_label_new(" "),true,false,0);
//button=gtk_button_new_from_stock(GTK_STOCK_HOME);
button=createNewStockButton(GTK_STOCK_HOME,GTK_STOCK_HOME3);
gtk_box_pack_start(GTK_BOX(hbox),button,false,false,4);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(webKitGoHome),(void*)webView);
Expand All @@ -2170,28 +2143,24 @@ void buildGtkDocViewer(void)
gtk_box_pack_start(GTK_BOX(hbox),gtk_label_new(" "),true,false,0);
entry=gtk_entry_new();
//findbutton=gtk_button_new_from_stock(GTK_STOCK_FIND);
findbutton=createNewStockButton(GTK_STOCK_FIND,GTK_STOCK_FIND3);
gtk_box_pack_start(GTK_BOX(hbox),findbutton,false,false,0);
g_signal_connect(G_OBJECT(findbutton),"clicked",G_CALLBACK(docSearchFromBar),(void*)entry);
gtk_box_pack_start(GTK_BOX(hbox),entry,false,true,0);
g_signal_connect_after(G_OBJECT(entry),"activate",G_CALLBACK(docSearchFromBar),(void*)entry);
// findnextinpage=gtk_button_new_from_stock(GTK_STOCK_GO_DOWN);
findnextinpage=createNewStockButton(GTK_STOCK_GO_DOWN,GTK_STOCK_GO_DOWN3);
gtk_box_pack_start(GTK_BOX(hbox),findnextinpage,false,false,0);
g_signal_connect(G_OBJECT(findnextinpage),"clicked",G_CALLBACK(docSearchInPageFoward),(void*)entry);
// findbutton=gtk_button_new_from_stock(GTK_STOCK_GO_UP);
findbutton=createNewStockButton(GTK_STOCK_GO_UP,GTK_STOCK_GO_UP3);
gtk_box_pack_start(GTK_BOX(hbox),findbutton,false,false,0);
g_signal_connect(G_OBJECT(findbutton),"clicked",G_CALLBACK(docSearchInPageBack),(void*)entry);
//spacer
gtk_box_pack_start(GTK_BOX(hbox),gtk_label_new(" "),true,false,0);
// button=gtk_button_new_from_stock(GTK_STOCK_GO_FORWARD);
button=createNewStockButton(GTK_STOCK_GO_FORWARD,GTK_STOCK_GO_FORWARD3);
gtk_box_pack_start(GTK_BOX(hbox),button,false,false,4);
g_signal_connect(G_OBJECT(button),"clicked",G_CALLBACK(webKitGoForward),(void*)webView);
Expand Down

0 comments on commit 72f0d14

Please sign in to comment.